All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH-OMAP3] OMAP3: Fix error in gpmc_init
@ 2008-11-09 18:34 dirk.behme at googlemail.com
  2008-11-09 20:00 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: dirk.behme at googlemail.com @ 2008-11-09 18:34 UTC (permalink / raw)
  To: u-boot

Subject: [PATCH-OMAP3] OMAP3: Fix error in gpmc_init

From: Dirk Behme <dirk.behme@gmail.com>

Fix error in gpmc_init() introduced with readl/writel conversion. Use base addresses + offset, not offset only. Minor clean up by removing unused code.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>

---

Jean-Christophe: Would be nice if you could handle this patch with priority as it prevents BeagleBoard from starting. Thanks!

 cpu/arm_cortexa8/omap3/mem.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

Index: u-boot-arm/cpu/arm_cortexa8/omap3/mem.c
===================================================================
--- u-boot-arm.orig/cpu/arm_cortexa8/omap3/mem.c
+++ u-boot-arm/cpu/arm_cortexa8/omap3/mem.c
@@ -233,18 +233,15 @@ void enable_gpmc_config(u32 *gpmc_config
 void gpmc_init(void)
 {
 	/* putting a blanket check on GPMC based on ZeBu for now */
-	u32 mux = 0, mwidth;
 	u32 *gpmc_config = NULL;
 	u32 *gpmc_base = (u32 *)GPMC_BASE;
+	u32 *gpmc_cs_base = (u32 *)GPMC_CONFIG_CS0_BASE;
 	u32 base = 0;
 	u32 size = 0;
 	u32 f_off = CONFIG_SYS_MONITOR_LEN;
 	u32 f_sec = 0;
 	u32 config = 0;
 
-	mux = BIT9;
-	mwidth = get_gpmc0_width();
-
 	/* global settings */
 	writel(0, gpmc_base + OFFS(GPMC_IRQENABLE)); /* isr's sources masked */
 	writel(0, gpmc_base + OFFS(GPMC_TIMEOUT_CONTROL));/* timeout disable */
@@ -256,7 +253,7 @@ void gpmc_init(void)
 	/* Disable the GPMC0 config set by ROM code
 	 * It conflicts with our MPDB (both at 0x08000000)
 	 */
-	writel(0, GPMC_CONFIG_CS0 + GPMC_CONFIG7);
+	writel(0, gpmc_cs_base + OFFS(GPMC_CONFIG7));
 	sdelay(1000);
 
 #if defined(CONFIG_CMD_NAND)	/* CS 0 */
@@ -280,7 +277,7 @@ void gpmc_init(void)
 
 #if defined(CONFIG_CMD_ONENAND)
 	gpmc_config = gpmc_onenand;
-	onenand_cs_base = (u32 *)(GPMC_CONFIG_CS0 +
+	onenand_cs_base = (u32 *)(GPMC_CONFIG_CS0_BASE +
 				  (GPMC_CS * GPMC_CONFIG_WIDTH));
 	base = PISMO1_ONEN_BASE;
 	size = PISMO1_ONEN_SIZE;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH-OMAP3] OMAP3: Fix error in gpmc_init
  2008-11-09 18:34 [U-Boot] [PATCH-OMAP3] OMAP3: Fix error in gpmc_init dirk.behme at googlemail.com
@ 2008-11-09 20:00 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2008-11-09 20:00 UTC (permalink / raw)
  To: u-boot

Dear dirk.behme at googlemail.com,

In message <49172d35.0437560a.272a.ffffaa8a@mx.google.com> you wrote:
> Subject: [PATCH-OMAP3] OMAP3: Fix error in gpmc_init
> 
> From: Dirk Behme <dirk.behme@gmail.com>

Please get rid of these repeated entries. They are already present in
your mail headers.

> Fix error in gpmc_init() introduced with readl/writel conversion. Use base addresses + offset, not offset only. Minor clean up by removing unused code.

Line too long. There is a strict maximum line length limit for commit
messages.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
                                                      -- Isaac Asimov

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-09 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-09 18:34 [U-Boot] [PATCH-OMAP3] OMAP3: Fix error in gpmc_init dirk.behme at googlemail.com
2008-11-09 20:00 ` Wolfgang Denk

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.