]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/inka4x0/inka4x0.c
* Fix baudrate calculation problem on MPC5200 systems
[karo-tx-uboot.git] / board / inka4x0 / inka4x0.c
index c17b8feb413d38afdd8f15ef8548ef99c494371b..29878f9b44d513c37fa3db89cc88f43188ff496a 100644 (file)
@@ -173,6 +173,7 @@ void flash_preinit(void)
        *(vu_long *)MPC5XXX_BOOTCS_CFG &= ~0x1; /* clear RO */
 }
 
+#define GPIO_WKUP_7    0x80000000UL
 #define GPIO_PSC3_9    0x04000000UL
 
 int misc_init_f (void)
@@ -189,13 +190,13 @@ int misc_init_f (void)
 
        /* Initialize GPIO output pins.
         */
-       /* Configure GPT as GPIO output */
+       /* Configure GPT as GPIO output (and set them as they control low-active LEDs */
        *(vu_long *)MPC5XXX_GPT0_ENABLE =
        *(vu_long *)MPC5XXX_GPT1_ENABLE =
        *(vu_long *)MPC5XXX_GPT2_ENABLE =
        *(vu_long *)MPC5XXX_GPT3_ENABLE =
        *(vu_long *)MPC5XXX_GPT4_ENABLE =
-       *(vu_long *)MPC5XXX_GPT5_ENABLE = 0x24;
+       *(vu_long *)MPC5XXX_GPT5_ENABLE = 0x34;
 
        /* Configure GPT7 as PWM timer, 1kHz, no ints. */
        *(vu_long *)MPC5XXX_GPT7_ENABLE = 0;/* Disable */
@@ -216,6 +217,8 @@ int misc_init_f (void)
        *(vu_long *)MPC5XXX_WU_GPIO_ENABLE |= 0xc4000000;
        *(vu_long *)MPC5XXX_WU_GPIO_DIR |= 0xc4000000;
 
+       /* Set LR mirror bit because it is low-active */
+       *(vu_long *)MPC5XXX_WU_GPIO_DATA    |= GPIO_WKUP_7;
        /*
         * Reset Coral-P graphics controller
         */