All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] armv7: make gpmc_cfg const
Date: Fri, 17 Jun 2016 12:04:03 +0200	[thread overview]
Message-ID: <20160617100403.GB19943@localhost.localdomain> (raw)
In-Reply-To: <20160617100013.GA19253@localhost.localdomain>

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 arch/arm/cpu/armv7/omap-common/mem-common.c | 8 +++-----
 arch/arm/include/asm/arch-omap3/sys_proto.h | 4 ++--
 include/linux/mtd/omap_gpmc.h               | 2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/mem-common.c b/arch/arm/cpu/armv7/omap-common/mem-common.c
index fc4290c..136a032 100644
--- a/arch/arm/cpu/armv7/omap-common/mem-common.c
+++ b/arch/arm/cpu/armv7/omap-common/mem-common.c
@@ -21,7 +21,7 @@
 #include <command.h>
 #include <linux/mtd/omap_gpmc.h>
 
-struct gpmc *gpmc_cfg;
+const struct gpmc *gpmc_cfg = (struct gpmc *)GPMC_BASE;
 
 #if defined(CONFIG_OMAP34XX)
 /********************************************************
@@ -50,8 +50,8 @@ u32 mem_ok(u32 cs)
 }
 #endif
 
-void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
-			u32 size)
+void enable_gpmc_cs_config(const u32 *gpmc_config, const struct gpmc_cs *cs,
+				u32 base, u32 size)
 {
 	writel(0, &cs->config7);
 	sdelay(1000);
@@ -75,8 +75,6 @@ void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
  *****************************************************/
 void gpmc_init(void)
 {
-	/* putting a blanket check on GPMC based on ZeBu for now */
-	gpmc_cfg = (struct gpmc *)GPMC_BASE;
 #if defined(CONFIG_NOR)
 /* configure GPMC for NOR */
 	const u32 gpmc_regs[GPMC_MAX_REG] = {	STNOR_GPMC_CONFIG1,
diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h
index 1be2b15..4c5aa99 100644
--- a/arch/arm/include/asm/arch-omap3/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
@@ -43,8 +43,8 @@ void get_board_mem_timings(struct board_sdrc_timings *timings);
 int identify_nand_chip(int *mfr, int *id);
 void emif4_init(void);
 void gpmc_init(void);
-void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
-			u32 size);
+void enable_gpmc_cs_config(const u32 *gpmc_config, const struct gpmc_cs *cs,
+				u32 base, u32 size);
 
 void watchdog_init(void);
 void set_muxconf_regs(void);
diff --git a/include/linux/mtd/omap_gpmc.h b/include/linux/mtd/omap_gpmc.h
index 3a75674..f49ea3d 100644
--- a/include/linux/mtd/omap_gpmc.h
+++ b/include/linux/mtd/omap_gpmc.h
@@ -92,6 +92,6 @@ struct gpmc {
 };
 
 /* Used for board specific gpmc initialization */
-extern struct gpmc *gpmc_cfg;
+extern const struct gpmc *gpmc_cfg;
 
 #endif /* __ASM_OMAP_GPMC_H */
-- 
2.1.4

  parent reply	other threads:[~2016-06-17 10:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17 10:00 [U-Boot] [RFC] omap3: single binary supporting all flash types Ladislav Michl
2016-06-17 10:02 ` [U-Boot] [PATCH] armv7: add reset timeout to identify_nand_chip Ladislav Michl
2016-06-17 10:04 ` Ladislav Michl [this message]
2016-06-17 10:05 ` [U-Boot] [RFC] armv7: Introduce enable_gpmc_cs_config Ladislav Michl
2016-06-17 10:07 ` [U-Boot] (no subject) Ladislav Michl
2016-06-17 10:09 ` Ladislav Michl
2016-06-17 10:17 ` [U-Boot] [PATCH] mtd: OneNAND: allow board init function fail Ladislav Michl
2016-06-18 11:08 ` [U-Boot] [RFC] omap3: single binary supporting all flash types Ladislav Michl
2016-06-18 11:12   ` [U-Boot] [PATCH] armv7: introduce set_gpmc_cs0 Ladislav Michl
2016-06-18 11:13   ` [U-Boot] [PATCH] igep00x0: runtime flash detection Ladislav Michl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160617100403.GB19943@localhost.localdomain \
    --to=ladis@linux-mips.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.