Skip to contentSkip to conversation

OMAP3: Fix gpmc_cs_base pointer math in NAND

U-Boot dirk.behme at googlemail.com 2 participants 2 messages Nov 9, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: [PATCH-OMAP3] OMAP3: Fix gpmc_cs_base pointer math in NAND

From: Dirk Behme <[email protected]>

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

---

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(-)
drivers/mtd/nand/omap_gpmc.c +5 -5
Index: 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 |
#1 lore raw

Dear dirk.behme at googlemail.com,

Quoted 3 lines · In message <[email protected]> you wrote:

Subject: [PATCH-OMAP3] OMAP3: Fix gpmc_cs_base pointer math in NAND

From: Dirk Behme <[email protected]>

Delete that.

Quoted 1 line

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

Line too long.

Ditto for the other postings vof this patch series.

Best regards,

Wolfgang Denk

Signature · 6 lines
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
If programming was easy, they wouldn't need something as  complicated
as a human being to do it, now would they?
                       - L. Wall & R. L. Schwartz, _Programming Perl_