From: Lothar Waßmann Date: Mon, 15 Jun 2015 07:48:18 +0000 (+0200) Subject: karo: tx53: delay GPIO initialization untill after GPIO subsystem has been initialized X-Git-Tag: KARO-TXA5-2015-06-26~22 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=58f65bfafc7f1d80212be06a2fb5d0d2d848a6d1 karo: tx53: delay GPIO initialization untill after GPIO subsystem has been initialized --- diff --git a/board/karo/tx53/tx53.c b/board/karo/tx53/tx53.c index 26caf9d6e1..3c6873ba5c 100644 --- a/board/karo/tx53/tx53.c +++ b/board/karo/tx53/tx53.c @@ -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;