git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[MTD] [NAND] Fix endianess bug in ndfc.c
[pandora-kernel.git]
/
drivers
/
mtd
/
nand
/
ndfc.c
diff --git
a/drivers/mtd/nand/ndfc.c
b/drivers/mtd/nand/ndfc.c
index
fe8d385
..
fd7a8d5
100644
(file)
--- a/
drivers/mtd/nand/ndfc.c
+++ b/
drivers/mtd/nand/ndfc.c
@@
-56,20
+56,20
@@
static void ndfc_select_chip(struct mtd_info *mtd, int chip)
ccr |= NDFC_CCR_BS(chip + pchip->chip_offset);
} else
ccr |= NDFC_CCR_RESET_CE;
ccr |= NDFC_CCR_BS(chip + pchip->chip_offset);
} else
ccr |= NDFC_CCR_RESET_CE;
- writel(ccr, ndfc->ndfcbase + NDFC_CCR);
+
__raw_
writel(ccr, ndfc->ndfcbase + NDFC_CCR);
}
static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
{
}
static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
{
- struct n
and_chip *chip = mtd->priv
;
+ struct n
dfc_controller *ndfc = &ndfc_ctrl
;
if (cmd == NAND_CMD_NONE)
return;
if (ctrl & NAND_CLE)
if (cmd == NAND_CMD_NONE)
return;
if (ctrl & NAND_CLE)
- writel(cmd & 0xFF,
chip->IO_ADDR_W
+ NDFC_CMD);
+ writel(cmd & 0xFF,
ndfc->ndfcbase
+ NDFC_CMD);
else
else
- writel(cmd & 0xFF,
chip->IO_ADDR_W
+ NDFC_ALE);
+ writel(cmd & 0xFF,
ndfc->ndfcbase
+ NDFC_ALE);
}
static int ndfc_ready(struct mtd_info *mtd)
}
static int ndfc_ready(struct mtd_info *mtd)
@@
-168,7
+168,7
@@
static void ndfc_chip_init(struct ndfc_nand_mtd *mtd)
chip->ecc.mode = NAND_ECC_HW;
chip->ecc.size = 256;
chip->ecc.bytes = 3;
chip->ecc.mode = NAND_ECC_HW;
chip->ecc.size = 256;
chip->ecc.bytes = 3;
- chip->ecclayout = mtd->pl_chip->ecclayout;
+ chip->ecclayout =
chip->ecc.layout =
mtd->pl_chip->ecclayout;
mtd->mtd.priv = chip;
mtd->mtd.owner = THIS_MODULE;
}
mtd->mtd.priv = chip;
mtd->mtd.owner = THIS_MODULE;
}