litesdcard: update integration.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 3 Jul 2020 12:43:30 +0000 (14:43 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 3 Jul 2020 12:57:40 +0000 (14:57 +0200)
litex/soc/integration/soc.py
litex/soc/software/liblitesdcard/sdcard.c

index d8570330259b7cc05c8a7329280dc42cb41ade75..acb3322e14b9228822999de6bc2bc0d92b29dd08 100644 (file)
@@ -1261,7 +1261,7 @@ class LiteXSoC(SoC):
         # Core
         if hasattr(sdcard_pads, "rst"):
             self.comb += sdcard_pads.rst.eq(0)
-        self.submodules.sdphy   = SDPHY(sdcard_pads, self.platform.device)
+        self.submodules.sdphy   = SDPHY(sdcard_pads, self.platform.device, self.clk_freq)
         self.submodules.sdcore  = SDCore(self.sdphy)
         self.add_csr("sdphy")
         self.add_csr("sdcore")
index 66a4c876584d554dcc55931f427c1e3430226831..6d5da7de482f1ce7d809094757f8587802477155 100644 (file)
@@ -421,9 +421,6 @@ void sdcard_decode_csd(void) {
 int sdcard_init(void) {
        unsigned short rca;
 
-       /* initialize SD driver parameters */
-       sdcore_timeout_write(1<<19);
-
        /* reset card */
        sdcard_go_idle();
        busy_wait(1);