Dirk Behme said the following on 10/11/2009 02:54 AM: > Nishanth Menon wrote: > >> gpmc_config should not be a variant as it is board specific >> hence make it a const parameter >> > > Having this in u-boot-ti/next results in > > - All non-SDP3430 boards have > > mem.c: In function 'gpmc_init': > mem.c:250: warning: assignment discards qualifiers from pointer target > type > > - Zoom2 fails to build with > > zoom2.c:54: error: conflicting types for 'enable_gpmc_cs_config' > /include/asm/arch/sys_proto.h:38: error: previous declaration of > 'enable_gpmc_cs_config' was here > > Reverting this patch makes both go away Redone patch attached - MAKEALL tested ONLY. apologies on the noise.
ethernet still pending.. Regards, Nishanth Menon
>From 2199f2aa8d59d81140c34388da5bdc7338bd6c27 Mon Sep 17 00:00:00 2001 From: Nishanth Menon <n...@ti.com> Date: Sat, 10 Oct 2009 19:28:03 -0400 Subject: [PATCH] OMAP3: make gpmc_config as const gpmc_config should not be a variant as it is board specific hence make it a const parameter Fixes issues identified by Dirk: build issue for zoom2 + warnings for all OMAP3 other platforms using nand/onenand etc.. Signed-off-by: Nishanth Menon <n...@ti.com> Cc: David B <davi...@pacbell.net> Cc: Vikram Pandita <vikram.pand...@ti.com> Cc: Richard Woodruff <r-woodru...@ti.com> Cc: Sandeep Paulraj <s-paul...@ti.com> Cc: Tom Rix <tom....@windriver.com> Cc: Dirk Behme <dirk.be...@googlemail.com> --- board/logicpd/zoom2/zoom2.c | 3 --- cpu/arm_cortexa8/omap3/mem.c | 8 ++++---- include/asm-arm/arch-omap3/sys_proto.h | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/board/logicpd/zoom2/zoom2.c b/board/logicpd/zoom2/zoom2.c index d9e2ae5..2dbab28 100644 --- a/board/logicpd/zoom2/zoom2.c +++ b/board/logicpd/zoom2/zoom2.c @@ -50,9 +50,6 @@ * The details of the setting of the serial gpmc setup are not available. * The values were provided by another party. */ -void enable_gpmc_cs_config(u32 *gpmc_config, struct gpmc_cs *cs, u32 base, - u32 size); - static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = { 0x00011000, 0x001F1F01, diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c index fc65f11..5e6d542 100644 --- a/cpu/arm_cortexa8/omap3/mem.c +++ b/cpu/arm_cortexa8/omap3/mem.c @@ -44,7 +44,7 @@ volatile unsigned int boot_flash_env_addr; struct gpmc *gpmc_cfg; #if defined(CONFIG_CMD_NAND) -static u32 gpmc_m_nand[GPMC_MAX_REG] = { +static const u32 gpmc_m_nand[GPMC_MAX_REG] = { M_NAND_GPMC_CONFIG1, M_NAND_GPMC_CONFIG2, M_NAND_GPMC_CONFIG3, @@ -62,7 +62,7 @@ static u32 gpmc_m_nand[GPMC_MAX_REG] = { #endif #if defined(CONFIG_CMD_ONENAND) -static u32 gpmc_onenand[GPMC_MAX_REG] = { +static const u32 gpmc_onenand[GPMC_MAX_REG] = { ONENAND_GPMC_CONFIG1, ONENAND_GPMC_CONFIG2, ONENAND_GPMC_CONFIG3, @@ -193,7 +193,7 @@ void do_sdrc_init(u32 cs, u32 early) writel(0, &sdrc_base->cs[cs].mcfg); } -void enable_gpmc_cs_config(u32 *gpmc_config, struct gpmc_cs *cs, u32 base, +void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base, u32 size) { writel(0, &cs->config7); @@ -221,7 +221,7 @@ void gpmc_init(void) /* putting a blanket check on GPMC based on ZeBu for now */ gpmc_cfg = (struct gpmc *)GPMC_BASE; #if defined(CONFIG_CMD_NAND) || defined(CONFIG_CMD_ONENAND) - u32 *gpmc_config = NULL; + const u32 *gpmc_config = NULL; u32 base = 0; u32 size = 0; #if defined(CONFIG_ENV_IS_IN_NAND) || defined(CONFIG_ENV_IS_IN_ONENAND) diff --git a/include/asm-arm/arch-omap3/sys_proto.h b/include/asm-arm/arch-omap3/sys_proto.h index e59021e..34bd515 100644 --- a/include/asm-arm/arch-omap3/sys_proto.h +++ b/include/asm-arm/arch-omap3/sys_proto.h @@ -34,7 +34,7 @@ void memif_init(void); void sdrc_init(void); void do_sdrc_init(u32, u32); void gpmc_init(void); -void enable_gpmc_cs_config(u32 *gpmc_config, struct gpmc_cs *cs, u32 base, +void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base, u32 size); void watchdog_init(void); -- 1.6.0.4
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot