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_tx4939.c | |
parent | fc371a25eab8816d49c2d322d91b48a11e206018 (diff) |
[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_tx4939.c')
-rw-r--r-- | arch/mips/txx9/generic/setup_tx4939.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup_tx4939.c b/arch/mips/txx9/generic/setup_tx4939.c index 55440967b3a..7a25b573e9b 100644 --- a/arch/mips/txx9/generic/setup_tx4939.c +++ b/arch/mips/txx9/generic/setup_tx4939.c @@ -27,6 +27,7 @@ #include <asm/txx9irq.h> #include <asm/txx9tmr.h> #include <asm/txx9/generic.h> +#include <asm/txx9/ndfmc.h> #include <asm/txx9/tx4939.h> static void __init tx4939_wdr_init(void) @@ -457,6 +458,22 @@ void __init tx4939_rtc_init(void) platform_device_register(&rtc_dev); } +void __init tx4939_ndfmc_init(unsigned int hold, unsigned int spw, + unsigned char ch_mask, unsigned char wide_mask) +{ + struct txx9ndfmc_platform_data plat_data = { + .shift = 1, + .gbus_clock = txx9_gbus_clock, + .hold = hold, + .spw = spw, + .flags = NDFMC_PLAT_FLAG_NO_RSTR | NDFMC_PLAT_FLAG_HOLDADD | + NDFMC_PLAT_FLAG_DUMMYWRITE, + .ch_mask = ch_mask, + .wide_mask = wide_mask, + }; + txx9_ndfmc_init(TX4939_NDFMC_REG & 0xfffffffffULL, &plat_data); +} + static void __init tx4939_stop_unused_modules(void) { __u64 pcfg, rst = 0, ckd = 0; |