pinmux
authorchristinaa <kristinaa@tuta.io>
Tue, 3 Jan 2017 09:45:53 +0000 (09:45 +0000)
committerchristinaa <kristinaa@tuta.io>
Tue, 3 Jan 2017 09:45:53 +0000 (09:45 +0000)
arm_chainloader/drivers/sdhost_impl.cc

index f0ae5cf..1b4a5de 100644 (file)
@@ -83,6 +83,8 @@ struct BCM2708GPIO {
                );\r
                uint32_t pin_shift = (pin_num % 10) * 3;\r
 \r
+\r
+\r
        }\r
 };\r
 \r
@@ -159,11 +161,26 @@ struct BCM2708SDHost : BlockDevice {
        void configure_pinmux() {\r
                GP_FSEL4 = 0x24000000;\r
                GP_FSEL5 = 0x924;\r
-               GP_PUD = 2;\r
 \r
-               logf("GPIOs set!\n");\r
+               logf("waiting for pinmux pull update ...\n");\r
 \r
+               GP_PUD = 2;\r
                mfence();\r
+               udelay(500);\r
+               GP_PUD = 0;\r
+\r
+               logf("waiting for pinmux clock update ...\n");\r
+\r
+               /* are these in bank 1 or 2? ah who gives a fuck ... */\r
+               GP_PUDCLK1 = GP_PUDCLK1_PUDCLKn32_SET;\r
+               GP_PUDCLK2 = GP_PUDCLK2_PUDCLKn64_SET;\r
+               udelay(500);\r
+\r
+               logf("ok ...\n");\r
+               GP_PUDCLK1 = 0;\r
+               GP_PUDCLK2 = 0;\r
+\r
+               logf("pinmux configured for aux0\n");\r
        }\r
 \r
        void reset() {\r
This page took 0.027421 seconds and 4 git commands to generate.