summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/ams-delta.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-08-31 07:45:48 +0200
committerPaul Mackerras <paulus@samba.org>2006-08-31 07:45:48 +0200
commitaa43f77939c97bf9d3580c6a5e71a5a40290e451 (patch)
tree095c0b8b3da4b6554a3f8ef4b39240a5d9216d4d /drivers/mtd/nand/ams-delta.c
parent[POWERPC] Only offer CONFIG_BRIQ_PANEL if CONFIG_PPC_CHRP is enabled (diff)
parentMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/... (diff)
downloadlinux-aa43f77939c97bf9d3580c6a5e71a5a40290e451.tar.xz
linux-aa43f77939c97bf9d3580c6a5e71a5a40290e451.zip
Merge branch 'merge'
Diffstat (limited to 'drivers/mtd/nand/ams-delta.c')
-rw-r--r--drivers/mtd/nand/ams-delta.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c
index d7897dc6b3c8..a0ba07c36ee9 100644
--- a/drivers/mtd/nand/ams-delta.c
+++ b/drivers/mtd/nand/ams-delta.c
@@ -130,11 +130,13 @@ static void ams_delta_hwcontrol(struct mtd_info *mtd, int cmd,
if (ctrl & NAND_CTRL_CHANGE) {
unsigned long bits;
- bits = (~ctrl & NAND_NCE) << 2;
- bits |= (ctrl & NAND_CLE) << 7;
- bits |= (ctrl & NAND_ALE) << 6;
+ bits = (~ctrl & NAND_NCE) ? AMS_DELTA_LATCH2_NAND_NCE : 0;
+ bits |= (ctrl & NAND_CLE) ? AMS_DELTA_LATCH2_NAND_CLE : 0;
+ bits |= (ctrl & NAND_ALE) ? AMS_DELTA_LATCH2_NAND_ALE : 0;
- ams_delta_latch2_write(0xC2, bits);
+ ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_CLE |
+ AMS_DELTA_LATCH2_NAND_ALE |
+ AMS_DELTA_LATCH2_NAND_NCE, bits);
}
if (cmd != NAND_CMD_NONE)