public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH-OMAP3 v2] OMAP3: Fix gpmc_cs_base pointer math in NAND
@ 2008-11-10 19:58 dirk.behme at googlemail.com
  2008-11-19  8:45 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 2+ messages in thread
From: dirk.behme at googlemail.com @ 2008-11-10 19:58 UTC (permalink / raw)
  To: u-boot

gpmc_cs_base is an uint32_t pointer, correct pointer math. Missed after
readl/writel conversion.

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

---

Changes in v2:

- Correct patch header style.

v2 of this patch makes previous version v1 obsolete.

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

 drivers/mtd/nand/omap_gpmc.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Index: u-boot-arm/drivers/mtd/nand/omap_gpmc.c
===================================================================
--- u-boot-arm.orig/drivers/mtd/nand/omap_gpmc.c
+++ u-boot-arm/drivers/mtd/nand/omap_gpmc.c
@@ -48,13 +48,13 @@ static void omap_nand_hwcontrol(struct m
 	 */
 	switch (ctrl) {
 	case NAND_CTRL_CHANGE | NAND_CTRL_CLE:
-		this->IO_ADDR_W = gpmc_cs_base + GPMC_NAND_CMD;
+		this->IO_ADDR_W = gpmc_cs_base + OFFS(GPMC_NAND_CMD);
 		break;
 	case NAND_CTRL_CHANGE | NAND_CTRL_ALE:
-		this->IO_ADDR_W = gpmc_cs_base + GPMC_NAND_ADR;
+		this->IO_ADDR_W = gpmc_cs_base + OFFS(GPMC_NAND_ADR);
 		break;
 	case NAND_CTRL_CHANGE | NAND_NCE:
-		this->IO_ADDR_W = gpmc_cs_base + GPMC_NAND_DAT;
+		this->IO_ADDR_W = gpmc_cs_base + OFFS(GPMC_NAND_DAT);
 		break;
 	}
 
@@ -321,8 +321,8 @@ int board_nand_init(struct nand_chip *na
 	gpmc_config |= 0x10;
 	writel(gpmc_config, gpmc_base + OFFS(GPMC_CONFIG));
 
-	nand->IO_ADDR_R = gpmc_cs_base + GPMC_NAND_DAT;
-	nand->IO_ADDR_W = gpmc_cs_base + GPMC_NAND_CMD;
+	nand->IO_ADDR_R = gpmc_cs_base + OFFS(GPMC_NAND_DAT);
+	nand->IO_ADDR_W = gpmc_cs_base + OFFS(GPMC_NAND_CMD);
 
 	nand->cmd_ctrl = omap_nand_hwcontrol;
 	nand->options = NAND_NO_PADDING | NAND_CACHEPRG | NAND_NO_AUTOINCR |

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

* [U-Boot] [PATCH-OMAP3 v2] OMAP3: Fix gpmc_cs_base pointer math in NAND
  2008-11-10 19:58 [U-Boot] [PATCH-OMAP3 v2] OMAP3: Fix gpmc_cs_base pointer math in NAND dirk.behme at googlemail.com
@ 2008-11-19  8:45 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-11-19  8:45 UTC (permalink / raw)
  To: u-boot

On 20:58 Mon 10 Nov     , dirk.behme at googlemail.com wrote:
> gpmc_cs_base is an uint32_t pointer, correct pointer math. Missed after
> readl/writel conversion.
> 
> Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
> 
> ---
> 
> Changes in v2:
> 
> - Correct patch header style.
> 
> v2 of this patch makes previous version v1 obsolete.
> 
> Jean-Christophe: Would be nice if you could handle this patch with priority
> as it prevents BeagleBoard from starting. Thanks!
> 
>  drivers/mtd/nand/omap_gpmc.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 

I've try to apply it but

OMAP3: Fix error in gpmc_init

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>
--------------------------
Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y
Applying OMAP3: Fix error in gpmc_init
error: patch failed: cpu/arm_cortexa8/omap3/mem.c:233
error: cpu/arm_cortexa8/omap3/mem.c: patch does not apply
fatal: sha1 information is lacking or useless (cpu/arm_cortexa8/omap3/mem.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0003.
When you have resolved this problem run "git-am -i -3 --resolved".
If you would prefer to skip this patch, instead run "git-am -i -3 --skip".

could you rebase it and specify the patch apply order via [PATCH X/X]

Best Regards,
J.

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

end of thread, other threads:[~2008-11-19  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-10 19:58 [U-Boot] [PATCH-OMAP3 v2] OMAP3: Fix gpmc_cs_base pointer math in NAND dirk.behme at googlemail.com
2008-11-19  8:45 ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox