fix minor inconsistencies in SdhostImpl and a spelling mistake
authorKristina <tinab@hush.ai>
Tue, 6 Sep 2016 15:23:51 +0000 (16:23 +0100)
committerKristina <tinab@hush.ai>
Tue, 6 Sep 2016 15:23:51 +0000 (16:23 +0100)
arm_chainloader/drivers/sdhost_impl.cc

index a7be4a3..16736ec 100644 (file)
@@ -294,27 +294,15 @@ struct SdhostImpl : BlockDevice {
                return true;\r
        }\r
 \r
-\r
        void drain_fifo() {\r
-               /* fuck me with a rake ... genlty */\r
+               /* fuck me with a rake ... gently */\r
 \r
                wait();\r
 \r
-               int i = 0;\r
-\r
-#ifdef DUMP_READ\r
-               logf("Draining FIFO ...\n");\r
-#endif\r
-\r
                while (SH_HSTS & SH_HSTS_DATA_FLAG_SET) {\r
                        SH_DATA;\r
                        mfence();\r
-                       i++;\r
                }\r
-\r
-#ifdef DUMP_READ\r
-               logf("Drained %d words from the FIFO!\n", i);\r
-#endif\r
        }\r
 \r
        virtual bool read_block(uint32_t sector, uint32_t* buf) override {\r
@@ -339,7 +327,8 @@ struct SdhostImpl : BlockDevice {
 #endif\r
 \r
 #ifdef DUMP_READ\r
-               printf("----------------------------------------------------\n");\r
+               if (buf)\r
+                       printf("----------------------------------------------------\n");\r
 #endif\r
 \r
                /* drain useful data from FIFO */\r
This page took 0.03366 seconds and 4 git commands to generate.