diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2009-03-04 12:01:31 -0800 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-03-20 18:07:39 +0000 |
commit | a591f5d35e89be90c04830d7de01c276af68aeb7 (patch) | |
tree | 25ed19b0423f7035e340ff7b6fea3352971d0a83 /arch/mips/txx9/generic/setup_tx4938.c | |
parent | fc371a25eab8816d49c2d322d91b48a11e206018 (diff) | |
download | blackbird-obmc-linux-a591f5d35e89be90c04830d7de01c276af68aeb7.tar.gz blackbird-obmc-linux-a591f5d35e89be90c04830d7de01c276af68aeb7.zip |
[MTD] [NAND] TXx9: add NDFMC support
Add platform support for NAND Flash Memory Controller of TXx9 SoCs.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-By: Ralf Bächle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'arch/mips/txx9/generic/setup_tx4938.c')
-rw-r--r-- | arch/mips/txx9/generic/setup_tx4938.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup_tx4938.c b/arch/mips/txx9/generic/setup_tx4938.c index 25819ff1c350..f0844f891f0b 100644 --- a/arch/mips/txx9/generic/setup_tx4938.c +++ b/arch/mips/txx9/generic/setup_tx4938.c @@ -23,6 +23,7 @@ #include <asm/txx9tmr.h> #include <asm/txx9pio.h> #include <asm/txx9/generic.h> +#include <asm/txx9/ndfmc.h> #include <asm/txx9/tx4938.h> static void __init tx4938_wdr_init(void) @@ -382,6 +383,26 @@ void __init tx4938_ata_init(unsigned int irq, unsigned int shift, int tune) platform_device_put(pdev); } +void __init tx4938_ndfmc_init(unsigned int hold, unsigned int spw) +{ + struct txx9ndfmc_platform_data plat_data = { + .shift = 1, + .gbus_clock = txx9_gbus_clock, + .hold = hold, + .spw = spw, + .ch_mask = 1, + }; + unsigned long baseaddr = TX4938_NDFMC_REG & 0xfffffffffULL; + +#ifdef __BIG_ENDIAN + baseaddr += 4; +#endif + if ((__raw_readq(&tx4938_ccfgptr->pcfg) & + (TX4938_PCFG_ATA_SEL|TX4938_PCFG_ISA_SEL|TX4938_PCFG_NDF_SEL)) == + TX4938_PCFG_NDF_SEL) + txx9_ndfmc_init(baseaddr, &plat_data); +} + static void __init tx4938_stop_unused_modules(void) { __u64 pcfg, rst = 0, ckd = 0; |