From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Feretich Date: Thu, 24 Feb 2011 15:16:44 -0800 Subject: [U-Boot] [PATCH] OMAP3 Beagle Pin Mux initialization glitch fix Message-ID: <4D66E6DC.8070604@rafresearch.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The below patch reverses the order of two segments in the board file. Output pins need to have their values initialized, before they are exposed to the logic outside the chip. Signed-off-by: Bob Feretich Cc: Wolfgang Denk --- diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c --- a/board/ti/beagle/beagle.c 2011-02-23 17:26:27.000000000 -0800 +++ b/board/ti/beagle/beagle.c 2011-02-23 17:47:44.000000000 -0800 @@ -239,17 +239,17 @@ int misc_init_r(void) twl4030_power_init(); twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); - /* Configure GPIOs to output */ - writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); - writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | - GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); - - /* Set GPIOs */ + /* Set GPIO states before they are made outputs */ writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, &gpio6_base->setdataout); writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout); + /* Configure GPIOs to output */ + writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); + writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | + GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); + dieid_num_r(); return 0; --