]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
karo: tx53: delay GPIO initialization untill after GPIO subsystem has been initialized
authorLothar Waßmann <LW@KARO-electronics.de>
Mon, 15 Jun 2015 07:48:18 +0000 (09:48 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 15 Jun 2015 12:39:48 +0000 (14:39 +0200)
board/karo/tx53/tx53.c

index 26caf9d6e1a58199d6ed723c5b554a6a3df1db4d..3c6873ba5cd9adead5cb78d72ec4b436bdba1eec 100644 (file)
@@ -444,9 +444,6 @@ int board_early_init_f(void)
 {
        struct mxc_ccm_reg *ccm_regs = (void *)CCM_BASE_ADDR;
 
-       gpio_request_array(tx53_gpios, ARRAY_SIZE(tx53_gpios));
-       imx_iomux_v3_setup_multiple_pads(tx53_pads, ARRAY_SIZE(tx53_pads));
-
        writel(0x77777777, AIPS1_BASE_ADDR + 0x00);
        writel(0x77777777, AIPS1_BASE_ADDR + 0x04);
 
@@ -475,6 +472,8 @@ int board_early_init_f(void)
        writel(0xfff00000, &ccm_regs->CCGR7);
        writel(0x00000000, &ccm_regs->cmeor);
 
+       imx_iomux_v3_setup_multiple_pads(tx53_pads, ARRAY_SIZE(tx53_pads));
+
        return 0;
 }
 
@@ -482,6 +481,11 @@ int board_init(void)
 {
        int ret;
 
+       ret = gpio_request_array(tx53_gpios, ARRAY_SIZE(tx53_gpios));
+       if (ret < 0) {
+               printf("Failed to request tx53_gpios: %d\n", ret);
+       }
+
        /* Address of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x1000;