Monday, 2020-11-23

*** tpb has joined #litex00:00
*** Dolu has quit IRC00:21
*** lf_ has quit IRC00:49
*** lf has joined #litex00:50
*** Degi has quit IRC01:58
*** Degi has joined #litex02:00
*** peepsalot has joined #litex03:54
*** peeps[zen] has quit IRC03:56
*** sthornington has quit IRC05:10
*** Bertl is now known as Bertl_zZ05:36
*** _whitelogger has quit IRC07:36
*** _whitelogger has joined #litex07:38
*** Nic30 has joined #litex08:45
*** Dolu has joined #litex09:53
*** leons has quit IRC10:34
*** CarlFK[m] has quit IRC10:34
*** apolkosnik[m] has quit IRC10:34
*** xobs has quit IRC10:34
*** powergraphic has quit IRC10:34
*** promach3 has quit IRC10:34
*** sajattack[m] has quit IRC10:34
*** disasm[m] has quit IRC10:34
*** leons has joined #litex10:43
*** CarlFK[m] has joined #litex11:02
*** xobs has joined #litex11:02
*** promach3 has joined #litex11:02
*** DerFetzer[m] has joined #litex11:02
*** disasm[m] has joined #litex11:02
*** powergraphic has joined #litex11:02
*** sajattack[m] has joined #litex11:03
*** mibus[m] has joined #litex11:03
*** abeljj[m] has joined #litex11:03
*** apolkosnik[m] has joined #litex11:03
_florent_iTitou: the CSRStorages need to be part of the Module to be collected (self.A, self.B, self.C instead of A, B, C)12:05
*** Bertl_zZ is now known as Bertl12:50
*** sthornington has joined #litex14:35
sthorningtonAnyone with a ulx3s that can quickly test if the B1 button still works to rst and reload firmware?14:36
*** sthornington has quit IRC14:42
*** sthornington has joined #litex14:57
*** sthornington has quit IRC15:02
*** FFY00 has quit IRC16:10
*** FFY00 has joined #litex16:11
iTitou_florent_: Thx !17:06
somlo_florent_: is there any scenario in which the LiteSDCard gateware would be used with a non-removable card? I'm assuming No, but maybe I'm missing something17:35
somloalso, any scenario where one would want to use GPIO for things like card-detect, instead of the built-in gateware functionality ?17:35
somloI'm also guessing No to this one, but with somewhat less confidence :)17:36
somloAsking because the current Linux driver checks for all of these as part of its card-detect method, and I'd like to simply remove all that dead code (on the assumption it's really *dead*)17:36
Findenot in direct answer but in that theme, I seem to remember that Xilinx's vc707 board doesn't even have a CD pin17:42
somloFinde: IIRC digging through the LiteSDCard gateware sources yesterday the CSR bit dedicated to card-detect is hard-coded to "present" in that case17:45
somlowhatever that is (0 I believe)17:46
Findeyeah that's what we had to do for our sd device17:48
somloalthough in that case detecting eject and re-insert from e.g. Linux will end up being lots and lots of fun17:48
Findewe just assumed it would never be unplugged...17:49
Findebit hard to give any guarantees there17:49
somlomaybe that's where GPIO could come into play in some shape of form? I'm really not a hardware guy, althoug I'm trying hard to keep up ;)17:49
Findeoh like to flick a separate switch after you insert kind of thing?17:50
Findeseems reasonable yeah17:50
somloso you'd specify that in some DT cell in your mmc node, in which case I should probably *NOT* remove that code, as it's *NOT* dead :)17:53
Findemakes sense to me17:53
somloIn its current form, the driver does some trickery w.r.t. inserting a set-bus-width command into the command stream driven by the generic mmc layers *once* at the "right time" in "the beginning"17:54
somloand the "we're done with this part" flag stays set across an eject/reinsert cycle, so the card is never properly re-initialized after being ejected once17:55
somloso I'm trying to hook into the "get_cd" mmc driver method to reset that "we still need to set the bus width" flag17:55
somloso if the card is not removable, there's no problem; If we can rely on the CSR card-detect flag, we're OK; if there isn't a card-detect pin, we punt and make it GPIO's problem to signal us when the card is in/out of its slot (best effort)17:57
somloFinde: thanks for the brainstorm, I think it all starts making sense now ;)17:57
somlo_florent_, Finde: https://github.com/litex-hub/linux/commit/2a99b5a0285edfb0d44f2745737feaacfb3fca14 (latest commit in the litex-rocket-rebase branch)18:48
Findeat the very least your description sounds right to me19:05
somloI'm not a huge fan of how the set_bus_width is done, but given that, the fix I put in works. I'm going to look at the overall driver some more for additional clean-up opportunities :)19:07
somloas it turns out, the trellisboard's built-in sdcard reader doesn't have a card-detect pin either20:25
somlogateware hard-codes a "present" bit in the CSR card-detect register20:26
*** indy has quit IRC21:05
*** indy has joined #litex21:08
*** x56 has quit IRC23:40
*** x56 has joined #litex23:49

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!