diff mbox

[U-Boot] omap: Don't enable GPMC CS0 with nothing attached

Message ID 1402079248-14490-1-git-send-email-ashcharles@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Ash Charles June 6, 2014, 6:27 p.m. UTC
If CONFIG_(NAND|NOR|ONENAND) is not defined, no configuration is set
for GPMC on chip select #0---size is 0.  In this case, the GPMC
configuration should be reset but not enabled.  Enabling causes the
Gumstix DuoVero board to hang when entering Linux.

Signed-off-by: Ash Charles <ashcharles@gmail.com>
---
 arch/arm/cpu/armv7/omap-common/mem-common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Tom Rini June 19, 2014, 10:01 p.m. UTC | #1
On Fri, Jun 06, 2014 at 11:27:28AM -0700, Ash Charles wrote:

> If CONFIG_(NAND|NOR|ONENAND) is not defined, no configuration is set
> for GPMC on chip select #0---size is 0.  In this case, the GPMC
> configuration should be reset but not enabled.  Enabling causes the
> Gumstix DuoVero board to hang when entering Linux.
> 
> Signed-off-by: Ash Charles <ashcharles@gmail.com>

After changing the test to be on 'base' not 'size' (as GPMC_SIZE_256M is
0x0), applied to u-boot-ti/master, thanks!
Ash Charles June 19, 2014, 10:02 p.m. UTC | #2
Thanks for the correction Tom.
--Ash

On Thu, Jun 19, 2014 at 3:01 PM, Tom Rini <trini@ti.com> wrote:
> On Fri, Jun 06, 2014 at 11:27:28AM -0700, Ash Charles wrote:
>
>> If CONFIG_(NAND|NOR|ONENAND) is not defined, no configuration is set
>> for GPMC on chip select #0---size is 0.  In this case, the GPMC
>> configuration should be reset but not enabled.  Enabling causes the
>> Gumstix DuoVero board to hang when entering Linux.
>>
>> Signed-off-by: Ash Charles <ashcharles@gmail.com>
>
> After changing the test to be on 'base' not 'size' (as GPMC_SIZE_256M is
> 0x0), applied to u-boot-ti/master, thanks!
>
> --
> Tom
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/omap-common/mem-common.c b/arch/arm/cpu/armv7/omap-common/mem-common.c
index 944ef84..f3aa268 100644
--- a/arch/arm/cpu/armv7/omap-common/mem-common.c
+++ b/arch/arm/cpu/armv7/omap-common/mem-common.c
@@ -133,5 +133,6 @@  void gpmc_init(void)
 	writel(0, &gpmc_cfg->cs[0].config7);
 	sdelay(1000);
 	/* enable chip-select specific configurations */
-	enable_gpmc_cs_config(gpmc_regs, &gpmc_cfg->cs[0], base, size);
+	if (size != 0)
+		enable_gpmc_cs_config(gpmc_regs, &gpmc_cfg->cs[0], base, size);
 }