]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
TI OMAP3: make gpmc_config as const
authorNishanth Menon <nm@ti.com>
Tue, 13 Oct 2009 16:49:55 +0000 (12:49 -0400)
committerTom Rix <Tom.Rix@windriver.com>
Sat, 24 Oct 2009 14:55:24 +0000 (09:55 -0500)
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 other OMAP3 platforms using nand/onenand etc

Signed-off-by: Nishanth Menon <nm@ti.com>
board/logicpd/zoom2/zoom2.c
cpu/arm_cortexa8/omap3/mem.c
include/asm-arm/arch-omap3/sys_proto.h

index cd8c9fef1ad52d0db1b03293648b139a579b372b..dadbeb6730c091d618571f95fc9dafe011324e84 100644 (file)
@@ -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,
index 5b41ccbae5b7f5de2e3a79bfe8742947b3cda420..8b8cd6d61776b763a1f7498752a2e2e982c72748 100644 (file)
@@ -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,
@@ -192,7 +192,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);
@@ -220,7 +220,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)
index e59021eb51e5556cb590a9e3b0f2969694c245c2..34bd515b05f4164d207f6fd478672a01bddde333 100644 (file)
@@ -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);