[U-Boot] [PATCH 0/7] omap3: zoom1: long pending cleanups :(

A series of patches to add in ethernet and bootz support.
baseline: v2014.04-rc3
Nishanth Menon (7): omap3: zoom1: enable CONFIG_SYS_GENERIC_BOARD OMAP3: zoom1: Configure GPMC for Ethernet OMAP3: zoom1: enable LAN9211 omap3: zoom1: enable common network commands omap3: zoom1: disable JFFS2 and enable FS_GENERIC omap3: zoom1: enable bootz omap3: zoom1: fix default console
board/logicpd/zoom1/zoom1.c | 38 ++++++++++++++++++++++++++++-- board/logicpd/zoom1/zoom1.h | 19 ++++++++++----- include/configs/omap3_zoom1.h | 52 ++++++++++++++++++++++++++++++----------- 3 files changed, 87 insertions(+), 22 deletions(-)

CONFIG_SYS_GENERIC_BOARD should now be enabled for generic functionality Further information in doc/README.generic-board
Signed-off-by: Nishanth Menon nm@ti.com ---
include/configs/omap3_zoom1.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index f0fa96e..c4178d8 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -20,6 +20,7 @@ #define CONFIG_OMAP34XX 1 /* which is a 34XX */ #define CONFIG_OMAP3_ZOOM1 1 /* working with Zoom MDK Rev1 */ #define CONFIG_OMAP_COMMON +#define CONFIG_SYS_GENERIC_BOARD
#define CONFIG_SDRC /* The chip has SDRC controller */

zoom1 uses LAN9211 configured over GPMC Chip Select 1.
Signed-off-by: Nishanth Menon nm@ti.com ---
board/logicpd/zoom1/zoom1.c | 18 ++++++++++++++++++ board/logicpd/zoom1/zoom1.h | 19 +++++++++++++------ 2 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c index 9846f24..56e512f 100644 --- a/board/logicpd/zoom1/zoom1.c +++ b/board/logicpd/zoom1/zoom1.c @@ -18,6 +18,7 @@ #include <netdev.h> #include <twl4030.h> #include <asm/io.h> +#include <asm/arch/mem.h> #include <asm/arch/mmc_host_def.h> #include <asm/arch/mux.h> #include <asm/arch/sys_proto.h> @@ -26,6 +27,20 @@
DECLARE_GLOBAL_DATA_PTR;
+/* gpmc_cfg is initialized by gpmc_init and we use it here */ +extern struct gpmc *gpmc_cfg; + +/* GPMC definitions for Ethenet Controller LAN9211 */ +static const u32 gpmc_lab_enet[] = { + ZOOM1_ENET_GPMC_CONF1, + ZOOM1_ENET_GPMC_CONF2, + ZOOM1_ENET_GPMC_CONF3, + ZOOM1_ENET_GPMC_CONF4, + ZOOM1_ENET_GPMC_CONF5, + ZOOM1_ENET_GPMC_CONF6, + /*CONF7- computed as params */ +}; + /* * Routine: board_init * Description: Early hardware init. @@ -33,6 +48,9 @@ DECLARE_GLOBAL_DATA_PTR; int board_init(void) { gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ + /* CS1 is Ethernet LAN9211 */ + enable_gpmc_cs_config(gpmc_lab_enet, &gpmc_cfg->cs[1], + DEBUG_BASE, GPMC_SIZE_16M); /* board id for Linux */ gd->bd->bi_arch_number = MACH_TYPE_OMAP_LDP; /* boot param addr */ diff --git a/board/logicpd/zoom1/zoom1.h b/board/logicpd/zoom1/zoom1.h index 62ef94f..3a943df 100644 --- a/board/logicpd/zoom1/zoom1.h +++ b/board/logicpd/zoom1/zoom1.h @@ -17,6 +17,13 @@ const omap3_sysinfo sysinfo = { "NAND", };
+#define ZOOM1_ENET_GPMC_CONF1 0x00611000 +#define ZOOM1_ENET_GPMC_CONF2 0x001F1F01 +#define ZOOM1_ENET_GPMC_CONF3 0x00080803 +#define ZOOM1_ENET_GPMC_CONF4 0x1D091D09 +#define ZOOM1_ENET_GPMC_CONF5 0x041D1F1F +#define ZOOM1_ENET_GPMC_CONF6 0x1D0904C4 + /* * IEN - Input Enable * IDIS - Input Disable @@ -94,13 +101,13 @@ const omap3_sysinfo sysinfo = { MUX_VAL(CP(GPMC_D14), (IEN | PTD | DIS | M0)) /*GPMC_D14*/\ MUX_VAL(CP(GPMC_D15), (IEN | PTD | DIS | M0)) /*GPMC_D15*/\ MUX_VAL(CP(GPMC_NCS0), (IDIS | PTU | EN | M0)) /*GPMC_nCS0*/\ - MUX_VAL(CP(GPMC_NCS1), (IDIS | PTU | EN | M7)) /*GPMC_nCS1*/\ - MUX_VAL(CP(GPMC_NCS2), (IDIS | PTU | EN | M7)) /*GPMC_nCS2*/\ - MUX_VAL(CP(GPMC_NCS3), (IDIS | PTU | EN | M7)) /*GPMC_nCS3*/\ - MUX_VAL(CP(GPMC_NCS4), (IDIS | PTU | EN | M7)) /*GPMC_nCS4*/\ - MUX_VAL(CP(GPMC_NCS5), (IDIS | PTD | DIS | M7)) /*GPMC_nCS5*/\ + MUX_VAL(CP(GPMC_NCS1), (IDIS | PTU | EN | M0)) /*GPMC_nCS1*/\ + MUX_VAL(CP(GPMC_NCS2), (IDIS | PTU | DIS | M7)) /*GPMC_nCS2*/\ + MUX_VAL(CP(GPMC_NCS3), (IEN | PTU | DIS | M4)) /*GPMC_nCS3 -> GPIO54*/\ + MUX_VAL(CP(GPMC_NCS4), (IDIS | PTU | DIS | M4)) /*GPMC_nCS4 -> GPIO 55*/\ + MUX_VAL(CP(GPMC_NCS5), (IDIS | PTD | DIS | M4)) /*GPMC_nCS5 -> GPIO 56*/\ MUX_VAL(CP(GPMC_NCS6), (IEN | PTD | DIS | M7)) /*GPMC_nCS6*/\ - MUX_VAL(CP(GPMC_NCS7), (IEN | PTU | EN | M7)) /*GPMC_nCS7*/\ + MUX_VAL(CP(GPMC_NCS7), (IEN | PTU | EN | M1)) /*GPMC_nCS7 -> GPMC_IO_DIR*/\ MUX_VAL(CP(GPMC_CLK), (IDIS | PTD | DIS | M0)) /*GPMC_CLK*/\ MUX_VAL(CP(GPMC_NADV_ALE), (IDIS | PTD | DIS | M0)) /*GPMC_nADV_ALE*/\ MUX_VAL(CP(GPMC_NOE), (IDIS | PTD | DIS | M0)) /*GPMC_nOE*/\

Zoom1 was wrongly setup for LAN91C96. Fix it by enabling LAN9211.
Signed-off-by: Nishanth Menon nm@ti.com ---
board/logicpd/zoom1/zoom1.c | 20 ++++++++++++++++++-- include/configs/omap3_zoom1.h | 10 +++++++++- 2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c index 56e512f..461a852 100644 --- a/board/logicpd/zoom1/zoom1.c +++ b/board/logicpd/zoom1/zoom1.c @@ -102,9 +102,25 @@ int board_mmc_init(bd_t *bis) int board_eth_init(bd_t *bis) { int rc = 0; -#ifdef CONFIG_LAN91C96 - rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE); + +#ifdef CONFIG_SMC911X +#define STR_ENV_ETHADDR "ethaddr" + + struct eth_device *dev; + uchar eth_addr[6]; + + rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); + if (!eth_getenv_enetaddr(STR_ENV_ETHADDR, eth_addr)) { + dev = eth_get_dev_by_index(0); + if (dev) { + eth_setenv_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); + } else { + printf("zoom1: Couldn't get eth device\n"); + rc = -1; + } + } #endif + return rc; } #endif diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index c4178d8..4a4dfd9 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -115,7 +115,7 @@ #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ #undef CONFIG_CMD_IMI /* iminfo */ #undef CONFIG_CMD_IMLS /* List all found images */ -#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ +#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ #undef CONFIG_CMD_NFS /* NFS support */
#define CONFIG_SYS_NO_FLASH @@ -265,4 +265,12 @@
#define CONFIG_SYS_CACHELINE_SIZE 64
+#ifdef CONFIG_CMD_NET +/* Ethernet (LAN9211 from SMSC9118 family) */ +#define CONFIG_SMC911X +#define CONFIG_SMC911X_32_BIT +#define CONFIG_SMC911X_BASE DEBUG_BASE + +#endif + #endif /* __CONFIG_H */

Basic networking commands for usability.
Signed-off-by: Nishanth Menon nm@ti.com ---
include/configs/omap3_zoom1.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 4a4dfd9..4fb3628 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -116,7 +116,9 @@ #undef CONFIG_CMD_IMI /* iminfo */ #undef CONFIG_CMD_IMLS /* List all found images */ #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ -#undef CONFIG_CMD_NFS /* NFS support */ +#define CONFIG_CMD_NFS /* NFS support */ +#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP
#define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_I2C

This is more in line with commits 664979a2a9f764b63b8094458b87247d254b0cc1(omap3_beagle: remove JFFS2 support.) and 102ce9ea7afdda80fe25aa786975e1722196bdb9 (omap3_beagle: enable CMD_FS_GENERIC and simplify load of image/ramdisk)
SigMD_FS_GENERIC allows us to simplify where we load up our image from either from ext2/fat etc. So, lets use that instead of cumbersome options we'd have to use. Sticking with existing conventions, defaults will be: bootfile=uImage bootpart=0:1 (first partition) bootdir=/ (/ in first partition)
Signed-off-by: Nishanth Menon nm@ti.com ---
include/configs/omap3_zoom1.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 4fb3628..110e3db 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -104,7 +104,13 @@
#define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ +#define CONFIG_CMD_FS_GENERIC /* Generic FS support */ +#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define MTDIDS_DEFAULT "nand0=nand" +#define MTDPARTS_DEFAULT "mtdparts=nand:512k(x-loader),"\ + "1920k(u-boot),128k(u-boot-env),"\ + "4m(kernel),-(fs)"
#define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ @@ -143,19 +149,15 @@ /* CS0 */ #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */ /* devices */ -#define CONFIG_JFFS2_NAND -/* nand device jffs2 lives on */ -#define CONFIG_JFFS2_DEV "nand0" -/* start of jffs2 partition */ -#define CONFIG_JFFS2_PART_OFFSET 0x680000 -#define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 */ - /* partition */
/* Environment information */ #define CONFIG_BOOTDELAY 10
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ + "bootfile=uImage\0" \ + "bootdir=/\0" \ + "bootpart=0:1\0" \ "usbtty=cdc_acm\0" \ "console=ttyS2,115200n8\0" \ "mmcdev=0\0" \ @@ -172,7 +174,7 @@ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source ${loadaddr}\0" \ - "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ + "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "bootm ${loadaddr}\0" \ @@ -186,7 +188,7 @@ "if run loadbootscript; then " \ "run bootscript; " \ "else " \ - "if run loaduimage; then " \ + "if run loadimage; then " \ "run mmcboot; " \ "else run nandboot; " \ "fi; " \

On Thu, Apr 03, 2014 at 06:19:24PM -0500, Nishanth Menon wrote:
This is more in line with commits 664979a2a9f764b63b8094458b87247d254b0cc1(omap3_beagle: remove JFFS2 support.) and 102ce9ea7afdda80fe25aa786975e1722196bdb9 (omap3_beagle: enable CMD_FS_GENERIC and simplify load of image/ramdisk)
SigMD_FS_GENERIC allows us to simplify where we load up our image from
Regex gone awry, otherwise looks fine.

Boot from zImage and fdt_file if uImage is not available to maintain the legacy behavior.
Signed-off-by: Nishanth Menon nm@ti.com ---
include/configs/omap3_zoom1.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 110e3db..e0ab1db 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -45,6 +45,7 @@ #define CONFIG_REVISION_TAG 1
#define CONFIG_OF_LIBFDT 1 +#define CONFIG_CMD_BOOTZ 1
/* * Size of malloc() pool @@ -155,7 +156,10 @@
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ + "fdt_high=0xffffffff\0" \ + "fdtaddr=0x80f80000\0" \ "bootfile=uImage\0" \ + "fdtfile=omap3-ldp.dtb\0" \ "bootdir=/\0" \ "bootpart=0:1\0" \ "usbtty=cdc_acm\0" \ @@ -175,9 +179,14 @@ "bootscript=echo Running bootscript from mmc ...; " \ "source ${loadaddr}\0" \ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ + "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "loadzimage=setenv bootfile zImage; if run loadimage; then run loadfdt;fi\0"\ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "bootm ${loadaddr}\0" \ + "mmczboot=echo Booting from mmc ...; " \ + "run mmcargs; " \ + "bootz ${loadaddr} - ${fdtaddr}\0" \ "nandboot=echo Booting from nand ...; " \ "run nandargs; " \ "nand read ${loadaddr} 280000 400000; " \ @@ -190,8 +199,10 @@ "else " \ "if run loadimage; then " \ "run mmcboot; " \ + "else if run loadzimage; then " \ + "run mmczboot; " \ "else run nandboot; " \ - "fi; " \ + "fi; fi;" \ "fi; " \ "else run nandboot; fi"

On Thu, Apr 03, 2014 at 06:19:25PM -0500, Nishanth Menon wrote:
Boot from zImage and fdt_file if uImage is not available to maintain the legacy behavior.
[snip]
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \
- "fdt_high=0xffffffff\0" \
- "fdtaddr=0x80f80000\0" \
OK, how much memory does this board ever have? If less than 512MB, don't do fdt_high. If 256MB or more, please put fdtaddr at base+128MB. Thanks!

On Mon, Apr 7, 2014 at 9:29 AM, Tom Rini trini@ti.com wrote:
On Thu, Apr 03, 2014 at 06:19:25PM -0500, Nishanth Menon wrote:
Boot from zImage and fdt_file if uImage is not available to maintain the legacy behavior.
[snip]
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \
"fdt_high=0xffffffff\0" \
"fdtaddr=0x80f80000\0" \
OK, how much memory does this board ever have? If less than 512MB, don't do fdt_high. If 256MB or more, please put fdtaddr at base+128MB. Thanks!
As per the board dts in kernel, this platform has 128MB. As per the configuration files, CS1 might not be populated on many boards as well. so 128MB seems to be the max memory available here.
just remove fdt_high?
Regards, Nishanth Menon

On Tue, Apr 08, 2014 at 09:35:29AM -0500, Nishanth Menon wrote:
On Mon, Apr 7, 2014 at 9:29 AM, Tom Rini trini@ti.com wrote:
On Thu, Apr 03, 2014 at 06:19:25PM -0500, Nishanth Menon wrote:
Boot from zImage and fdt_file if uImage is not available to maintain the legacy behavior.
[snip]
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \
"fdt_high=0xffffffff\0" \
"fdtaddr=0x80f80000\0" \
OK, how much memory does this board ever have? If less than 512MB, don't do fdt_high. If 256MB or more, please put fdtaddr at base+128MB. Thanks!
As per the board dts in kernel, this platform has 128MB. As per the configuration files, CS1 might not be populated on many boards as well. so 128MB seems to be the max memory available here.
I never trust the dts in the kernel wrt memory size, at least for TI platforms as it's always 128MB and we've always gotten by with a run-time fixup (or people not noticing their board had less memory than it really does). And, aside, they ought to adapt the PowerPC convention of saying 0 for memory size so it's clear that the value is fixed up elsewhere.
just remove fdt_high?
Yup.

On Tue, Apr 8, 2014 at 11:22 AM, Tom Rini trini@ti.com wrote:
On Tue, Apr 08, 2014 at 09:35:29AM -0500, Nishanth Menon wrote:
On Mon, Apr 7, 2014 at 9:29 AM, Tom Rini trini@ti.com wrote:
On Thu, Apr 03, 2014 at 06:19:25PM -0500, Nishanth Menon wrote:
Boot from zImage and fdt_file if uImage is not available to maintain the legacy behavior.
[snip]
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \
"fdt_high=0xffffffff\0" \
"fdtaddr=0x80f80000\0" \
OK, how much memory does this board ever have? If less than 512MB, don't do fdt_high. If 256MB or more, please put fdtaddr at base+128MB. Thanks!
As per the board dts in kernel, this platform has 128MB. As per the configuration files, CS1 might not be populated on many boards as well. so 128MB seems to be the max memory available here.
I never trust the dts in the kernel wrt memory size, at least for TI platforms as it's always 128MB and we've always gotten by with a run-time fixup (or people not noticing their board had less memory than it really does). And, aside, they ought to adapt the PowerPC convention of saying 0 for memory size so it's clear that the value is fixed up elsewhere.
just remove fdt_high?
Yup.
Done in v2.

We do not use ttyS2 anymore in Linux, it changed to ttyO2 a few years back. never too late to update.
Signed-off-by: Nishanth Menon nm@ti.com ---
include/configs/omap3_zoom1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index e0ab1db..b06838c 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -163,7 +163,7 @@ "bootdir=/\0" \ "bootpart=0:1\0" \ "usbtty=cdc_acm\0" \ - "console=ttyS2,115200n8\0" \ + "console=ttyO2,115200n8\0" \ "mmcdev=0\0" \ "videomode=1024x768@60,vxres=1024,vyres=768\0" \ "videospec=omapfb:vram:2M,vram:4M\0" \

On Thu, Apr 03, 2014 at 06:19:19PM -0500, Nishanth Menon wrote:
A series of patches to add in ethernet and bootz support.
baseline: v2014.04-rc3
Nishanth Menon (7): omap3: zoom1: enable CONFIG_SYS_GENERIC_BOARD OMAP3: zoom1: Configure GPMC for Ethernet OMAP3: zoom1: enable LAN9211 omap3: zoom1: enable common network commands omap3: zoom1: disable JFFS2 and enable FS_GENERIC omap3: zoom1: enable bootz omap3: zoom1: fix default console
board/logicpd/zoom1/zoom1.c | 38 ++++++++++++++++++++++++++++-- board/logicpd/zoom1/zoom1.h | 19 ++++++++++----- include/configs/omap3_zoom1.h | 52 ++++++++++++++++++++++++++++++-----------
Can you switch over to include/configs/ti_omap3_common.h as well? I suspect you'll need some of the patches I posted for omap3_evm to do so tho. Thanks!

On Mon, Apr 7, 2014 at 9:25 AM, Tom Rini trini@ti.com wrote:
On Thu, Apr 03, 2014 at 06:19:19PM -0500, Nishanth Menon wrote:
A series of patches to add in ethernet and bootz support.
baseline: v2014.04-rc3
Nishanth Menon (7): omap3: zoom1: enable CONFIG_SYS_GENERIC_BOARD OMAP3: zoom1: Configure GPMC for Ethernet OMAP3: zoom1: enable LAN9211 omap3: zoom1: enable common network commands omap3: zoom1: disable JFFS2 and enable FS_GENERIC omap3: zoom1: enable bootz omap3: zoom1: fix default console
board/logicpd/zoom1/zoom1.c | 38 ++++++++++++++++++++++++++++-- board/logicpd/zoom1/zoom1.h | 19 ++++++++++----- include/configs/omap3_zoom1.h | 52 ++++++++++++++++++++++++++++++-----------
Can you switch over to include/configs/ti_omap3_common.h as well? I suspect you'll need some of the patches I posted for omap3_evm to do so tho. Thanks!
Done as the last patch in the series based on v2014.04-rc3 -> I will repost the series in a few mins. lets see if you want further improvements. Regards, Nishanth Menon

V1: http://lists.denx.de/pipermail/u-boot/2014-April/176867.html changes since v1: - use ti_omap3_common config header - fix typo in commit message - drop fdt_high test log: http://hastebin.com/moqewevulu.xml
Nishanth Menon (8): omap3: zoom1: enable CONFIG_SYS_GENERIC_BOARD OMAP3: zoom1: Configure GPMC for Ethernet OMAP3: zoom1: enable LAN9211 omap3: zoom1: enable common network commands omap3: zoom1: disable JFFS2 and enable FS_GENERIC omap3: zoom1: enable bootz omap3: zoom1: fix default console omap3: zoom1: switch to generic ti_omap3_common config header
board/logicpd/zoom1/config.mk | 1 - board/logicpd/zoom1/zoom1.c | 38 +++++++++- board/logicpd/zoom1/zoom1.h | 19 +++-- include/configs/omap3_zoom1.h | 167 ++++++++++++----------------------------- 4 files changed, 98 insertions(+), 127 deletions(-)

CONFIG_SYS_GENERIC_BOARD should now be enabled for generic functionality Further information in doc/README.generic-board
Signed-off-by: Nishanth Menon nm@ti.com --- include/configs/omap3_zoom1.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index f0fa96e..c4178d8 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -20,6 +20,7 @@ #define CONFIG_OMAP34XX 1 /* which is a 34XX */ #define CONFIG_OMAP3_ZOOM1 1 /* working with Zoom MDK Rev1 */ #define CONFIG_OMAP_COMMON +#define CONFIG_SYS_GENERIC_BOARD
#define CONFIG_SDRC /* The chip has SDRC controller */

zoom1 uses LAN9211 configured over GPMC Chip Select 1.
Signed-off-by: Nishanth Menon nm@ti.com --- board/logicpd/zoom1/zoom1.c | 18 ++++++++++++++++++ board/logicpd/zoom1/zoom1.h | 19 +++++++++++++------ 2 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c index 9846f24..56e512f 100644 --- a/board/logicpd/zoom1/zoom1.c +++ b/board/logicpd/zoom1/zoom1.c @@ -18,6 +18,7 @@ #include <netdev.h> #include <twl4030.h> #include <asm/io.h> +#include <asm/arch/mem.h> #include <asm/arch/mmc_host_def.h> #include <asm/arch/mux.h> #include <asm/arch/sys_proto.h> @@ -26,6 +27,20 @@
DECLARE_GLOBAL_DATA_PTR;
+/* gpmc_cfg is initialized by gpmc_init and we use it here */ +extern struct gpmc *gpmc_cfg; + +/* GPMC definitions for Ethenet Controller LAN9211 */ +static const u32 gpmc_lab_enet[] = { + ZOOM1_ENET_GPMC_CONF1, + ZOOM1_ENET_GPMC_CONF2, + ZOOM1_ENET_GPMC_CONF3, + ZOOM1_ENET_GPMC_CONF4, + ZOOM1_ENET_GPMC_CONF5, + ZOOM1_ENET_GPMC_CONF6, + /*CONF7- computed as params */ +}; + /* * Routine: board_init * Description: Early hardware init. @@ -33,6 +48,9 @@ DECLARE_GLOBAL_DATA_PTR; int board_init(void) { gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ + /* CS1 is Ethernet LAN9211 */ + enable_gpmc_cs_config(gpmc_lab_enet, &gpmc_cfg->cs[1], + DEBUG_BASE, GPMC_SIZE_16M); /* board id for Linux */ gd->bd->bi_arch_number = MACH_TYPE_OMAP_LDP; /* boot param addr */ diff --git a/board/logicpd/zoom1/zoom1.h b/board/logicpd/zoom1/zoom1.h index 62ef94f..3a943df 100644 --- a/board/logicpd/zoom1/zoom1.h +++ b/board/logicpd/zoom1/zoom1.h @@ -17,6 +17,13 @@ const omap3_sysinfo sysinfo = { "NAND", };
+#define ZOOM1_ENET_GPMC_CONF1 0x00611000 +#define ZOOM1_ENET_GPMC_CONF2 0x001F1F01 +#define ZOOM1_ENET_GPMC_CONF3 0x00080803 +#define ZOOM1_ENET_GPMC_CONF4 0x1D091D09 +#define ZOOM1_ENET_GPMC_CONF5 0x041D1F1F +#define ZOOM1_ENET_GPMC_CONF6 0x1D0904C4 + /* * IEN - Input Enable * IDIS - Input Disable @@ -94,13 +101,13 @@ const omap3_sysinfo sysinfo = { MUX_VAL(CP(GPMC_D14), (IEN | PTD | DIS | M0)) /*GPMC_D14*/\ MUX_VAL(CP(GPMC_D15), (IEN | PTD | DIS | M0)) /*GPMC_D15*/\ MUX_VAL(CP(GPMC_NCS0), (IDIS | PTU | EN | M0)) /*GPMC_nCS0*/\ - MUX_VAL(CP(GPMC_NCS1), (IDIS | PTU | EN | M7)) /*GPMC_nCS1*/\ - MUX_VAL(CP(GPMC_NCS2), (IDIS | PTU | EN | M7)) /*GPMC_nCS2*/\ - MUX_VAL(CP(GPMC_NCS3), (IDIS | PTU | EN | M7)) /*GPMC_nCS3*/\ - MUX_VAL(CP(GPMC_NCS4), (IDIS | PTU | EN | M7)) /*GPMC_nCS4*/\ - MUX_VAL(CP(GPMC_NCS5), (IDIS | PTD | DIS | M7)) /*GPMC_nCS5*/\ + MUX_VAL(CP(GPMC_NCS1), (IDIS | PTU | EN | M0)) /*GPMC_nCS1*/\ + MUX_VAL(CP(GPMC_NCS2), (IDIS | PTU | DIS | M7)) /*GPMC_nCS2*/\ + MUX_VAL(CP(GPMC_NCS3), (IEN | PTU | DIS | M4)) /*GPMC_nCS3 -> GPIO54*/\ + MUX_VAL(CP(GPMC_NCS4), (IDIS | PTU | DIS | M4)) /*GPMC_nCS4 -> GPIO 55*/\ + MUX_VAL(CP(GPMC_NCS5), (IDIS | PTD | DIS | M4)) /*GPMC_nCS5 -> GPIO 56*/\ MUX_VAL(CP(GPMC_NCS6), (IEN | PTD | DIS | M7)) /*GPMC_nCS6*/\ - MUX_VAL(CP(GPMC_NCS7), (IEN | PTU | EN | M7)) /*GPMC_nCS7*/\ + MUX_VAL(CP(GPMC_NCS7), (IEN | PTU | EN | M1)) /*GPMC_nCS7 -> GPMC_IO_DIR*/\ MUX_VAL(CP(GPMC_CLK), (IDIS | PTD | DIS | M0)) /*GPMC_CLK*/\ MUX_VAL(CP(GPMC_NADV_ALE), (IDIS | PTD | DIS | M0)) /*GPMC_nADV_ALE*/\ MUX_VAL(CP(GPMC_NOE), (IDIS | PTD | DIS | M0)) /*GPMC_nOE*/\

Zoom1 was wrongly setup for LAN91C96. Fix it by enabling LAN9211.
Signed-off-by: Nishanth Menon nm@ti.com --- board/logicpd/zoom1/zoom1.c | 20 ++++++++++++++++++-- include/configs/omap3_zoom1.h | 10 +++++++++- 2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/board/logicpd/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c index 56e512f..461a852 100644 --- a/board/logicpd/zoom1/zoom1.c +++ b/board/logicpd/zoom1/zoom1.c @@ -102,9 +102,25 @@ int board_mmc_init(bd_t *bis) int board_eth_init(bd_t *bis) { int rc = 0; -#ifdef CONFIG_LAN91C96 - rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE); + +#ifdef CONFIG_SMC911X +#define STR_ENV_ETHADDR "ethaddr" + + struct eth_device *dev; + uchar eth_addr[6]; + + rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); + if (!eth_getenv_enetaddr(STR_ENV_ETHADDR, eth_addr)) { + dev = eth_get_dev_by_index(0); + if (dev) { + eth_setenv_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); + } else { + printf("zoom1: Couldn't get eth device\n"); + rc = -1; + } + } #endif + return rc; } #endif diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index c4178d8..4a4dfd9 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -115,7 +115,7 @@ #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ #undef CONFIG_CMD_IMI /* iminfo */ #undef CONFIG_CMD_IMLS /* List all found images */ -#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ +#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ #undef CONFIG_CMD_NFS /* NFS support */
#define CONFIG_SYS_NO_FLASH @@ -265,4 +265,12 @@
#define CONFIG_SYS_CACHELINE_SIZE 64
+#ifdef CONFIG_CMD_NET +/* Ethernet (LAN9211 from SMSC9118 family) */ +#define CONFIG_SMC911X +#define CONFIG_SMC911X_32_BIT +#define CONFIG_SMC911X_BASE DEBUG_BASE + +#endif + #endif /* __CONFIG_H */

Basic networking commands for usability.
Signed-off-by: Nishanth Menon nm@ti.com --- include/configs/omap3_zoom1.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 4a4dfd9..4fb3628 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -116,7 +116,9 @@ #undef CONFIG_CMD_IMI /* iminfo */ #undef CONFIG_CMD_IMLS /* List all found images */ #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ -#undef CONFIG_CMD_NFS /* NFS support */ +#define CONFIG_CMD_NFS /* NFS support */ +#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP
#define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_I2C

This is more in line with commits 664979a2a9f764b63b8094458b87247d254b0cc1(omap3_beagle: remove JFFS2 support.) and 102ce9ea7afdda80fe25aa786975e1722196bdb9 (omap3_beagle: enable CMD_FS_GENERIC and simplify load of image/ramdisk)
CMD_FS_GENERIC allows us to simplify where we load up our image from either from ext2/fat etc. So, lets use that instead of cumbersome options we'd have to use. Sticking with existing conventions, defaults will be: bootfile=uImage bootpart=0:1 (first partition) bootdir=/ (/ in first partition)
Signed-off-by: Nishanth Menon nm@ti.com --- include/configs/omap3_zoom1.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 4fb3628..110e3db 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -104,7 +104,13 @@
#define CONFIG_CMD_EXT2 /* EXT2 Support */ #define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_JFFS2 /* JFFS2 Support */ +#define CONFIG_CMD_FS_GENERIC /* Generic FS support */ +#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define MTDIDS_DEFAULT "nand0=nand" +#define MTDPARTS_DEFAULT "mtdparts=nand:512k(x-loader),"\ + "1920k(u-boot),128k(u-boot-env),"\ + "4m(kernel),-(fs)"
#define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ @@ -143,19 +149,15 @@ /* CS0 */ #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */ /* devices */ -#define CONFIG_JFFS2_NAND -/* nand device jffs2 lives on */ -#define CONFIG_JFFS2_DEV "nand0" -/* start of jffs2 partition */ -#define CONFIG_JFFS2_PART_OFFSET 0x680000 -#define CONFIG_JFFS2_PART_SIZE 0xf980000 /* size of jffs2 */ - /* partition */
/* Environment information */ #define CONFIG_BOOTDELAY 10
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ + "bootfile=uImage\0" \ + "bootdir=/\0" \ + "bootpart=0:1\0" \ "usbtty=cdc_acm\0" \ "console=ttyS2,115200n8\0" \ "mmcdev=0\0" \ @@ -172,7 +174,7 @@ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source ${loadaddr}\0" \ - "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ + "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "bootm ${loadaddr}\0" \ @@ -186,7 +188,7 @@ "if run loadbootscript; then " \ "run bootscript; " \ "else " \ - "if run loaduimage; then " \ + "if run loadimage; then " \ "run mmcboot; " \ "else run nandboot; " \ "fi; " \

Boot from zImage and fdt_file if uImage is not available to maintain the legacy behavior.
Signed-off-by: Nishanth Menon nm@ti.com --- include/configs/omap3_zoom1.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 110e3db..477fb10 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -45,6 +45,7 @@ #define CONFIG_REVISION_TAG 1
#define CONFIG_OF_LIBFDT 1 +#define CONFIG_CMD_BOOTZ 1
/* * Size of malloc() pool @@ -155,7 +156,9 @@
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ + "fdtaddr=0x80f80000\0" \ "bootfile=uImage\0" \ + "fdtfile=omap3-ldp.dtb\0" \ "bootdir=/\0" \ "bootpart=0:1\0" \ "usbtty=cdc_acm\0" \ @@ -175,9 +178,14 @@ "bootscript=echo Running bootscript from mmc ...; " \ "source ${loadaddr}\0" \ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ + "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "loadzimage=setenv bootfile zImage; if run loadimage; then run loadfdt;fi\0"\ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "bootm ${loadaddr}\0" \ + "mmczboot=echo Booting from mmc ...; " \ + "run mmcargs; " \ + "bootz ${loadaddr} - ${fdtaddr}\0" \ "nandboot=echo Booting from nand ...; " \ "run nandargs; " \ "nand read ${loadaddr} 280000 400000; " \ @@ -190,8 +198,10 @@ "else " \ "if run loadimage; then " \ "run mmcboot; " \ + "else if run loadzimage; then " \ + "run mmczboot; " \ "else run nandboot; " \ - "fi; " \ + "fi; fi;" \ "fi; " \ "else run nandboot; fi"

We do not use ttyS2 anymore in Linux, it changed to ttyO2 a few years back. never too late to update.
Signed-off-by: Nishanth Menon nm@ti.com --- include/configs/omap3_zoom1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 477fb10..4f933d9 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -162,7 +162,7 @@ "bootdir=/\0" \ "bootpart=0:1\0" \ "usbtty=cdc_acm\0" \ - "console=ttyS2,115200n8\0" \ + "console=ttyO2,115200n8\0" \ "mmcdev=0\0" \ "videomode=1024x768@60,vxres=1024,vyres=768\0" \ "videospec=omapfb:vram:2M,vram:4M\0" \

ti_omap3_common contains a lot of common header definitions that help reduce the size of the zoom1 config file. So, use the generic header and customize as needed for the platform (example: no spl).
Signed-off-by: Nishanth Menon nm@ti.com --- board/logicpd/zoom1/config.mk | 1 - include/configs/omap3_zoom1.h | 124 ++++++----------------------------------- 2 files changed, 16 insertions(+), 109 deletions(-)
diff --git a/board/logicpd/zoom1/config.mk b/board/logicpd/zoom1/config.mk index f5a19ed..c7ebfd9 100644 --- a/board/logicpd/zoom1/config.mk +++ b/board/logicpd/zoom1/config.mk @@ -14,4 +14,3 @@ # (mem base + reserved)
# For use with external or internal boots. -CONFIG_SYS_TEXT_BASE = 0x80008000 diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index 4f933d9..7c5540f 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -16,16 +16,22 @@ /* * High Level Configuration Options */ -#define CONFIG_OMAP 1 /* in a TI OMAP core */ -#define CONFIG_OMAP34XX 1 /* which is a 34XX */ #define CONFIG_OMAP3_ZOOM1 1 /* working with Zoom MDK Rev1 */ -#define CONFIG_OMAP_COMMON #define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_SDRC /* The chip has SDRC controller */ - +#define CONFIG_NAND +#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ #include <asm/arch/cpu.h> /* get chip and board defs */ #include <asm/arch/omap3.h> +#include <configs/ti_omap3_common.h> + +/* Remove SPL boot option - we do not support that on LDP yet */ +#undef CONFIG_SPL +#undef CONFIG_SPL_FRAMEWORK +#undef CONFIG_SPL_OS_BOOT + +/* Generic NAND definition conflicts with debug_base */ +#undef CONFIG_SYS_NAND_BASE
/* * Display CPU and Board information @@ -33,58 +39,16 @@ #define CONFIG_DISPLAY_CPUINFO 1 #define CONFIG_DISPLAY_BOARDINFO 1
-/* Clock Defines */ -#define V_OSCK 26000000 /* Clock output from T2 */ -#define V_SCLK (V_OSCK >> 1) - #define CONFIG_MISC_INIT_R
-#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ -#define CONFIG_SETUP_MEMORY_TAGS 1 -#define CONFIG_INITRD_TAG 1 #define CONFIG_REVISION_TAG 1
-#define CONFIG_OF_LIBFDT 1 -#define CONFIG_CMD_BOOTZ 1 - -/* - * Size of malloc() pool - */ #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ - /* Sector */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
/* * Hardware drivers */
-/* - * NS16550 Configuration - */ -#define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */ - -#define CONFIG_SYS_NS16550 -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE (-4) -#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK - -/* - * select serial console configuration - */ -#define CONFIG_CONS_INDEX 3 -#define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3 -#define CONFIG_SERIAL3 3 /* UART3 */ - -/* allow to overwrite serial and ethaddr */ -#define CONFIG_ENV_OVERWRITE -#define CONFIG_BAUDRATE 115200 -#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ - 115200} -#define CONFIG_GENERIC_MMC 1 -#define CONFIG_MMC 1 -#define CONFIG_OMAP_HSMMC 1 -#define CONFIG_DOS_PARTITION 1 - /* USB */ #define CONFIG_MUSB_UDC 1 #define CONFIG_USB_OMAP3 1 @@ -100,23 +64,14 @@ #define CONFIG_USBD_MANUFACTURER "Texas Instruments" #define CONFIG_USBD_PRODUCT_NAME "Zoom1"
-/* commands to include */ -#include <config_cmd_default.h> - -#define CONFIG_CMD_EXT2 /* EXT2 Support */ -#define CONFIG_CMD_FAT /* FAT support */ -#define CONFIG_CMD_FS_GENERIC /* Generic FS support */ -#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ -#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ #define MTDIDS_DEFAULT "nand0=nand" #define MTDPARTS_DEFAULT "mtdparts=nand:512k(x-loader),"\ "1920k(u-boot),128k(u-boot-env),"\ "4m(kernel),-(fs)"
-#define CONFIG_CMD_I2C /* I2C serial bus support */ -#define CONFIG_CMD_MMC /* MMC support */ -#define CONFIG_CMD_NAND /* NAND support */ +#if defined(CONFIG_CMD_NAND) #define CONFIG_CMD_NAND_LOCK_UNLOCK /* Enable lock/unlock support */ +#endif
#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ @@ -127,32 +82,24 @@ #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP
-#define CONFIG_SYS_NO_FLASH -#define CONFIG_SYS_I2C -#define CONFIG_SYS_OMAP24_I2C_SPEED 100000 -#define CONFIG_SYS_OMAP24_I2C_SLAVE 1 +#undef CONFIG_SYS_I2C_OMAP24XX #define CONFIG_SYS_I2C_OMAP34XX
/* * TWL4030 */ -#define CONFIG_TWL4030_POWER 1 #define CONFIG_TWL4030_LED 1
/* * Board NAND Info. */ -#define CONFIG_NAND_OMAP_GPMC #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */ /* to access nand */ #define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */ /* to access nand at */ /* CS0 */ -#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */ - /* devices */
/* Environment information */ -#define CONFIG_BOOTDELAY 10
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ @@ -205,50 +152,13 @@ "fi; " \ "else run nandboot; fi"
-#define CONFIG_AUTO_COMPLETE 1 /* * Miscellaneous configurable options */ -#define CONFIG_SYS_LONGHELP /* undef to save memory */ -#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ -#define CONFIG_SYS_PROMPT "OMAP3 Zoom1 # " -#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ -/* Print Buffer Size */ -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ - sizeof(CONFIG_SYS_PROMPT) + 16) -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ -/* Boot Argument Buffer Size */ -#define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE) - -#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest */ - /* works on */ -#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ +#define CONFIG_SYS_MEMTEST_START (PHYS_SDRAM_1) /* memtest */ +#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_2 + \ 0x01F00000) /* 31MB */
-#define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */ - /* load address */ - -#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 -#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800 -#define CONFIG_SYS_INIT_RAM_SIZE 0x800 -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ - CONFIG_SYS_INIT_RAM_SIZE - \ - GENERATED_GBL_DATA_SIZE) -/* - * OMAP3 has 12 GP timers, they can be driven by the system clock - * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK). - * This rate is divided by a local divisor. - */ -#define CONFIG_SYS_TIMERBASE OMAP34XX_GPT2 -#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */ - -/*----------------------------------------------------------------------- - * Physical Memory Map - */ -#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ -#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 -#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 - /*----------------------------------------------------------------------- * FLASH and environment organization */ @@ -259,8 +169,6 @@ #define PISMO1_NAND_SIZE GPMC_SIZE_128M #define PISMO1_ONEN_SIZE GPMC_SIZE_128M
-#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */ - #if defined(CONFIG_CMD_NAND) #define CONFIG_SYS_FLASH_BASE PISMO1_NAND_BASE #endif

On Tue, Apr 08, 2014 at 09:50:50AM -0500, Nishanth Menon wrote:
V1: http://lists.denx.de/pipermail/u-boot/2014-April/176867.html changes since v1:
- use ti_omap3_common config header
- fix typo in commit message
- drop fdt_high
test log: http://hastebin.com/moqewevulu.xml
Nishanth Menon (8): omap3: zoom1: enable CONFIG_SYS_GENERIC_BOARD OMAP3: zoom1: Configure GPMC for Ethernet OMAP3: zoom1: enable LAN9211 omap3: zoom1: enable common network commands omap3: zoom1: disable JFFS2 and enable FS_GENERIC omap3: zoom1: enable bootz omap3: zoom1: fix default console omap3: zoom1: switch to generic ti_omap3_common config header
Applied to u-boot-ti/master, thanks!
participants (2)
-
Nishanth Menon
-
Tom Rini