summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/fsl_upm.c
diff options
context:
space:
mode:
authorWolfgang Grandegger <wg@grandegger.com>2009-02-11 18:38:22 +0100
committerScott Wood <scottwood@freescale.com>2009-03-23 15:53:39 -0500
commit06e9f7df054d26d7f49c56bf9a6844b193ad6313 (patch)
tree8ceb149af283db4061e695415e0f1d4f3abe0df2 /drivers/mtd/nand/fsl_upm.c
parente93c1c169d49eda7babad9c781f541e2e34f0ff0 (diff)
downloadtalos-obmc-uboot-06e9f7df054d26d7f49c56bf9a6844b193ad6313.tar.gz
talos-obmc-uboot-06e9f7df054d26d7f49c56bf9a6844b193ad6313.zip
Add support for TQM-specific chip select logic to FSL-UPM
For the NAND chips on the TQM8548 modules, a special chip-select logic is used. It uses dedicated address lines to be set via UPM machine address register (mar). This patch adds such support to the FSL-UPM driver. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'drivers/mtd/nand/fsl_upm.c')
-rw-r--r--drivers/mtd/nand/fsl_upm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 73abbbad1f..e7e746b550 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -90,8 +90,11 @@ static void fun_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
mar = cmd << (32 - fun->width);
io_addr = fun->upm.io_addr;
#if CONFIG_SYS_NAND_MAX_CHIPS > 1
- if (fun->chip_nr > 0)
+ if (fun->chip_nr > 0) {
io_addr += fun->chip_offset * fun->chip_nr;
+ if (fun->upm_mar_chip_offset)
+ mar |= fun->upm_mar_chip_offset * fun->chip_nr;
+ }
#endif
fsl_upm_run_pattern(&fun->upm, fun->width, io_addr, mar);
OpenPOWER on IntegriCloud