*** tpb <[email protected]> has joined #litex | 00:00 | |
shorne | somlo: I have been watching the mmc driver review marathon, good work, do you have an idea of who will be accepting it for upstream? | 02:40 |
---|---|---|
*** Degi <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 04:54 | |
*** Degi <[email protected]> has joined #litex | 04:54 | |
*** ewen <[email protected]> has joined #litex | 07:17 | |
*** ewen <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 08:01 | |
*** FabM <FabM!~FabM@2a03:d604:103:600:70a:8e1a:318f:f8e0> has joined #litex | 08:06 | |
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Remote host closed the connection) | 08:18 | |
*** Martoni <Martoni!~Martoni@2a03:d604:103:600:2ad2:44ff:fe23:2f72> has joined #litex | 08:19 | |
*** zjason` is now known as zjason | 08:30 | |
*** linear_cannon <[email protected]> has joined #litex | 09:19 | |
*** essele <[email protected]> has joined #litex | 09:46 | |
*** Martoni <Martoni!~Martoni@2a03:d604:103:600:2ad2:44ff:fe23:2f72> has quit IRC (Ping timeout: 240 seconds) | 10:33 | |
*** Guest71 <[email protected]> has joined #litex | 10:40 | |
*** Guest71 <[email protected]> has quit IRC (Client Quit) | 10:40 | |
*** essele <[email protected]> has quit IRC (Quit: My MacBook has gone to sleep. ZZZzzz…) | 12:12 | |
*** essele <[email protected]> has joined #litex | 12:13 | |
*** essele <[email protected]> has quit IRC (Ping timeout: 240 seconds) | 12:20 | |
somlo | shorne: marathon is right :) (but that's OK, I like learning about existing kernel infrastructure the slow, hands-on way) | 14:36 |
somlo | no idea who will be accepting it though | 14:36 |
*** essele <[email protected]> has joined #litex | 16:01 | |
*** essele <[email protected]> has quit IRC (Quit: My MacBook has gone to sleep. ZZZzzz…) | 16:44 | |
*** essele <[email protected]> has joined #litex | 16:46 | |
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) | 16:48 | |
*** TMM_ <[email protected]> has joined #litex | 16:49 | |
*** essele <[email protected]> has quit IRC (Quit: My MacBook has gone to sleep. ZZZzzz…) | 16:58 | |
*** gruetzkopf <gruetzkopf!~quassel@wireguard/tunneler/gruetzkopf> has quit IRC (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) | 17:19 | |
*** gruetzkopf <gruetzkopf!~quassel@wireguard/tunneler/gruetzkopf> has joined #litex | 17:20 | |
*** essele <[email protected]> has joined #litex | 17:44 | |
*** essele <[email protected]> has quit IRC (Quit: My MacBook has gone to sleep. ZZZzzz…) | 18:20 | |
*** essele <[email protected]> has joined #litex | 18:21 | |
*** essele <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 18:25 | |
*** essele <[email protected]> has joined #litex | 18:48 | |
*** essele <[email protected]> has quit IRC (Ping timeout: 240 seconds) | 18:53 | |
*** Martoni <Martoni!~Martoni@2a03:d604:103:600:2ad2:44ff:fe23:2f72> has joined #litex | 18:53 | |
*** essele <[email protected]> has joined #litex | 18:54 | |
*** essele <[email protected]> has quit IRC (Ping timeout: 240 seconds) | 18:58 | |
*** essele <[email protected]> has joined #litex | 19:05 | |
*** essele <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 19:10 | |
*** essele <[email protected]> has joined #litex | 19:26 | |
*** Martoni <Martoni!~Martoni@2a03:d604:103:600:2ad2:44ff:fe23:2f72> has quit IRC (Ping timeout: 240 seconds) | 20:03 | |
*** essele <[email protected]> has quit IRC (Quit: My MacBook has gone to sleep. ZZZzzz…) | 20:08 | |
shorne | somlo: I am trying to bring up the new litex mmc driver now. It doesn't seem to work. Maybe related to litex_sys_clk which doesnt exist in openrisc. Ill try to see what can be done. | 22:18 |
somlo | shorne: look at litex commits b4fb3ea9 and d108d2ad for the relevant DTS updates the driver ended up relying on during review | 22:40 |
shorne | somlo: thanks, I am using the latest litex and generated what looks like a correct dts.. tracing the boot process it seems I am never getting to litex_mmc_probe | 22:52 |
shorne | mmc0: mmc@e0005000 { | 22:53 |
shorne | compatible = "litex,mmc"; | 22:53 |
shorne | reg = <0xe0005000 0x100>, | 22:53 |
shorne | <0xe0003800 0x100>, | 22:53 |
shorne | <0xe0003000 0x100>, | 22:53 |
shorne | <0xe0004800 0x100>, | 22:53 |
shorne | <0xe0004000 0x100>; | 22:53 |
shorne | reg-names = "phy", "core", "reader", "writer", "irq"; | 22:53 |
shorne | clocks = <&sys_clk>; | 22:53 |
shorne | bus-width = <0x04>; | 22:53 |
shorne | interrupts = <3>; | 22:53 |
shorne | status = "okay"; | 22:53 |
shorne | }; | 22:53 |
shorne | for example | 22:53 |
somlo | that looks fine, here's mine for comparison: | 22:54 |
somlo | mmc0: mmc@12005000 { | 22:54 |
somlo | compatible = "litex,mmc"; | 22:54 |
somlo | reg = <0x12005000 0x100>, | 22:54 |
somlo | <0x12003800 0x100>, | 22:54 |
somlo | <0x12003000 0x100>, | 22:54 |
somlo | <0x12004800 0x100>, | 22:54 |
somlo | <0x12004000 0x100>; | 22:54 |
somlo | reg-names = "phy", "core", "reader", "writer", "irq"; | 22:54 |
somlo | clocks = <&sys_clk>; | 22:54 |
somlo | interrupt-parent = <&L1>; | 22:54 |
somlo | interrupts = <4>; | 22:54 |
somlo | }; | 22:55 |
shorne | during boot with enabling initcall_debug I see... | 22:56 |
shorne | [ 5.620000] calling mmc_blk_init+0x0/0x170 @ 1 | 22:56 |
shorne | [ 5.630000] initcall mmc_blk_init+0x0/0x170 returned 0 after 3355 usecs | 22:56 |
shorne | [ 5.630000] calling litex_mmc_driver_init+0x0/0x30 @ 1 | 22:56 |
shorne | [ 5.640000] initcall litex_mmc_driver_init+0x0/0x30 returned 0 after 2016 usecs | 22:56 |
somlo | btw, I also had to drop the `of_match_ptr()` wrapper from around `litex_match` -- can that have anything to do with it? | 22:57 |
shorne | that doesn't tell much, but I also added a dev_info(dev, "Initializing litex mmc"); to the top of litex_mmc_probe | 22:57 |
shorne | yeah, it could be... I saw that change, let me see | 22:58 |
shorne | I am adding back of_match_ptr to see if it helps | 22:59 |
shorne | hmm, I don't think it will, of_match_ptr is just #define of_match_ptr(_ptr) (_ptr) | 23:01 |
somlo | oh, it's a no-op | 23:02 |
somlo | sorry it broke for you, hopefully we can figure out why | 23:07 |
somlo | somewhat orthogonally, I'm going to push out v11 in a few minutes, a few additional bits of polish to the sources (unlikely to make a difference for the better in your case, though, sadly) | 23:08 |
shorne | Yeah, Ill figure it out. | 23:09 |
shorne | I am just debugging/printffing/tracing the init process to see where its going wrong | 23:10 |
*** nelgau <[email protected]> has joined #litex | 23:11 | |
somlo | wondering if publishing all the intermediate versions (which I've kept as separate branches) in litex-hub/linux could be of any help to you, to do a "meta-bisect" of sorts ? | 23:11 |
somlo | you could of course just `git-am` them from all the emails, but that'd be more of a PITA | 23:12 |
somlo | but yeah, it'd be interesting to know how come it's failing to even call into litex_mmc_probe() for you | 23:13 |
shorne | yeah, likely something simple, I may have to meta-bisect it but that may be a last resort | 23:16 |
somlo | there's only 10 revisions, so about 3 or 4 places to try :) | 23:30 |
somlo | oh, and once it gets past probe, please LMK re. https://github.com/litex-hub/linux/blob/litex-rebase/drivers/mmc/host/litex_mmc.c#L165 | 23:33 |
somlo | that used to be four litex_read32()'s, but it seemed like memcpy_fromio() doesn't play weird endianness swaps on BE the way readl() does (so that I have to undo that with another le32_to_cpu in _read_litex_subregister() | 23:35 |
somlo | and it'd be nice to have a successful test on BE just as a sanity check | 23:36 |
somlo | I also had to do some changes to the Kconfig wizardry, but I don't think there's more to it beyond whether you get the option to select the driver or not during build, and you obviously are building it, so that wouldn't likely be it either | 23:38 |
shorne | ok, the BE thing might be interesting, that always gives us issues | 23:40 |
shorne | alright, now debugging shows something | 23:41 |
shorne | [ 6.350000] bus: 'platform': __driver_probe_device: matched device e0005000.mmc with driver litex-mmc | 23:41 |
shorne | [ 6.360000] probe of e0005000.mmc returned -517 after 293 usecs | 23:41 |
a3f | shorne: clock missing? might be a good occasion to use dev_err_probe, so /sys/kernel/debug/devices_deferred can give some useful info on what deferred the probe indefinitely | 23:42 |
shorne | I think the probe is being called, for some reason these dev_info logger statements are not being outputted | 23:43 |
a3f | Do you have dev_info first thing in the function or later on? | 23:44 |
shorne | first thing, I think I need to enabled dynamic debug | 23:44 |
a3f | hmm, perhaps driver core tries to request some resource for you? I saw that with power domains, I think. if they are not yet loaded, they defer probe even before it runs | 23:49 |
somlo | shorne: what's your `sys_clk` entry in DTS look like? | 23:50 |
somlo | I have: | 23:52 |
somlo | ... | 23:52 |
somlo | clocks { | 23:52 |
somlo | sys_clk: litex_sys_clk { | 23:52 |
somlo | #clock-cells = <0>; | 23:52 |
somlo | compatible = "fixed-clock"; | 23:52 |
somlo | clock-frequency = <50000000>; | 23:52 |
somlo | }; | 23:53 |
somlo | }; | 23:53 |
somlo | ... | 23:53 |
somlo | L12: soc { | 23:53 |
somlo | ... | 23:53 |
somlo | mmc0: mmc@12005000 { | 23:53 |
somlo | compatible = "litex,mmc"; | 23:53 |
somlo | ... | 23:53 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!