From: dirk.behme at googlemail.com <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH-OMAP3 v2] OMAP3: Fix gpmc_cs_base pointer math in NAND
Date: Mon, 10 Nov 2008 20:58:12 +0100 [thread overview]
Message-ID: <49189255.0c58560a.40c1.fffff5a1@mx.google.com> (raw)
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 |
next reply other threads:[~2008-11-10 19:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-10 19:58 dirk.behme at googlemail.com [this message]
2008-11-19 8:45 ` [U-Boot] [PATCH-OMAP3 v2] OMAP3: Fix gpmc_cs_base pointer math in NAND Jean-Christophe PLAGNIOL-VILLARD
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=49189255.0c58560a.40c1.fffff5a1@mx.google.com \
--to=dirk.behme@googlemail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox