From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH] Fix broken NAND on Amstrad Delta Date: Tue, 20 Oct 2009 17:51:35 -0700 Message-ID: <20091021005134.GE16230@atomide.com> References: <200910210239.55194.jkrzyszt@tis.icnet.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:62933 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752341AbZJUAve (ORCPT ); Tue, 20 Oct 2009 20:51:34 -0400 Content-Disposition: inline In-Reply-To: <200910210239.55194.jkrzyszt@tis.icnet.pl> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Janusz Krzysztofik Cc: "linux-omap@vger.kernel.org" , e3-hacking@earth.li * Janusz Krzysztofik [091020 17:42]: > Hi, > I found that with commit 15ac408ee5a509053a765b816e9179515329369f, "OMAP: > UART: drop OMAP_TAG_UART, enable all UARTs, auto-disabled on idle", NAND got > not accessible on Amstrad Delta (E3). That seems to be caused by unnecessary > omap_cfg_reg() calls for UART ports 2 and 3, that were never used on that > machine before and now are initilalized and supposed to be auto-disabled. > > I can suspect that similiar problems may exist for other OMAP1510 based > boards. Furthermore, since mux code is going to be reorganized, the right > solution would probably be to remove those cpu_is_omap1510() specific bits > completely from arch/arm/mach-omap1/serial.c and push them into board specific > files where applicable. However, not being familiar with any OMAP hardware > other that my amsdelta, I provide a patch that solves the problem for that > machine only. I have locked out the bits for UART1 as well as those look not > really required, as far as I can understand > http://focus.ti.com/lit/ds/symlink/omap5910.pdf. Oops. That happened as a nasty side effect when we removed the OMAP_TAG_UART in commit 15ac408ee5a509053a765b816e9179515329369f. Let's just remove the omap_cfg_reg() calls from mach-omap1/serial.c, and add them to the board-*.c files like you suggest above. We should be able to find which ports to mux by looking at the enabled_uarts mask in the commit mentioned above. Regards, Tony > Created and tested against linux-2.6.32-r5. > > Thanks, > Janusz > > Signed-off-by: Janusz Krzysztofik > > --- > --- linux-2.6.32-rc5/arch/arm/mach-omap1/serial.c.orig 2009-10-20 22:38:38.000000000 +0200 > +++ linux-2.6.32-rc5/arch/arm/mach-omap1/serial.c 2009-10-21 01:26:51.000000000 +0200 > @@ -143,7 +143,7 @@ void __init omap_serial_init(void) > if (cpu_is_omap15xx()) > clk_set_rate(uart1_ck, 12000000); > } > - if (cpu_is_omap15xx()) { > + if (cpu_is_omap15xx() && !(machine_is_ams_delta())) { > omap_cfg_reg(UART1_TX); > omap_cfg_reg(UART1_RTS); > if (machine_is_omap_innovator()) { > @@ -165,7 +165,7 @@ void __init omap_serial_init(void) > else > clk_set_rate(uart2_ck, 48000000); > } > - if (cpu_is_omap15xx()) { > + if (cpu_is_omap15xx() && !(machine_is_ams_delta())) { > omap_cfg_reg(UART2_TX); > omap_cfg_reg(UART2_RTS); > if (machine_is_omap_innovator()) { > @@ -185,7 +185,7 @@ void __init omap_serial_init(void) > if (cpu_is_omap15xx()) > clk_set_rate(uart3_ck, 12000000); > } > - if (cpu_is_omap15xx()) { > + if (cpu_is_omap15xx() && !(machine_is_ams_delta())) { > omap_cfg_reg(UART3_TX); > omap_cfg_reg(UART3_RX); > }