[U-Boot] [U-Boot, v1, 3/3] ARM: omap: merge GPMC initialization code for all platform

Gupta, Pekon pekon at ti.com
Tue Jul 8 08:19:49 CEST 2014


Hi Ash,

>From: ashcharles at gmail.com
>Hi,
>
>I'm actually seeing some breakage from this commit
>(a0a37183bd75e74608bc78c8d0e2a34454f95a91).  When booting the DuoVero
>board (no NAND/NOR/ONENAND but a network card on GPMC), it hangs as it
>enters the kernel.
>
>These lines in gpmc_init() in arch/arm/cpu/armv7/omap-common/mem-common.c
>...
>        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);
>...
>seem to be the source of the issue.  Even though we have nothing
>connected on CS0, the last line of enable_gpmc_cs_config() enables the
>interface despite it being disabled right before in writel(0,
>&gpmc_cfg->cs[0].config7);
>
Sorry seeing this bit late. Were you able to root cause the issue ?
All Ethernet related GPMC configurations are defined by following macros
File: $U-BOOT/arch/arm/include/asm/arch-omap3/mem.h
#define NET_GPMC_CONFIG1	0x00001000
#define NET_GPMC_CONFIG2	0x001e1e01
#define NET_GPMC_CONFIG3	0x00080300
#define NET_GPMC_CONFIG4	0x1c091c09
#define NET_GPMC_CONFIG5	0x04181f1f
#define NET_GPMC_CONFIG6	0x00000FCF
#define NET_GPMC_CONFIG7	0x00000f6c
OR
/* GPMC CS configuration for an SMSC LAN9221 ethernet controller */
#define NET_LAN9221_GPMC_CONFIG1    0x00001000
#define NET_LAN9221_GPMC_CONFIG2    0x00060700
#define NET_LAN9221_GPMC_CONFIG3    0x00020201
#define NET_LAN9221_GPMC_CONFIG4    0x06000700
#define NET_LAN9221_GPMC_CONFIG5    0x0006090A
#define NET_LAN9221_GPMC_CONFIG6    0x87030000
#define NET_LAN9221_GPMC_CONFIG7    0x00000f6c

I havn't touched these values, except for moving some of them
from one header-file to other.

Also, the change in u-boot, should not affect the kernel.
That means kernel's GPMC driver was depending on some pre-configured
value, which is wrong. 
There were couple of fixes for SMSC controller pushed in 3.16 kernel,
Are following in your tree ?
fb677ef  tony at atomide.com  ARM: OMAP2+: Fix GPMC remap for devices using an offset
efe8072  tony at atomide.com  ARM: OMAP2+: Fix oops for GPMC free


with regards, pekon


More information about the U-Boot mailing list