diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2009-03-04 21:01:31 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-03-20 19:07:39 +0100 |
commit | a591f5d35e89be90c04830d7de01c276af68aeb7 (patch) | |
tree | 25ed19b0423f7035e340ff7b6fea3352971d0a83 /arch/mips/txx9/generic/setup.c | |
parent | [JFFS2] jffs2_acl_count() tests < 0 on unsigned (diff) | |
download | linux-a591f5d35e89be90c04830d7de01c276af68aeb7.tar.xz 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.c')
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index a13a08b8c9ec..8a266c6a3f58 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c @@ -32,6 +32,7 @@ #include <asm/txx9/generic.h> #include <asm/txx9/pci.h> #include <asm/txx9tmr.h> +#include <asm/txx9/ndfmc.h> #ifdef CONFIG_CPU_TX49XX #include <asm/txx9/tx4938.h> #endif @@ -691,6 +692,26 @@ void __init txx9_physmap_flash_init(int no, unsigned long addr, #endif } +void __init txx9_ndfmc_init(unsigned long baseaddr, + const struct txx9ndfmc_platform_data *pdata) +{ +#if defined(CONFIG_MTD_NAND_TXX9NDFMC) || \ + defined(CONFIG_MTD_NAND_TXX9NDFMC_MODULE) + struct resource res = { + .start = baseaddr, + .end = baseaddr + 0x1000 - 1, + .flags = IORESOURCE_MEM, + }; + struct platform_device *pdev = platform_device_alloc("txx9ndfmc", -1); + + if (!pdev || + platform_device_add_resources(pdev, &res, 1) || + platform_device_add_data(pdev, pdata, sizeof(*pdata)) || + platform_device_add(pdev)) + platform_device_put(pdev); +#endif +} + #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) static DEFINE_SPINLOCK(txx9_iocled_lock); |