diff options
author | John Crispin <blogic@openwrt.org> | 2007-12-25 13:26:41 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2007-12-25 13:26:41 +0000 |
commit | 7c33988517ea18a0f46e11fa5a70176b2a611adb (patch) | |
tree | 2b4fff0fb79f16697c5d4625113e35e2161d0aed /target/linux/ifxmips/files/arch | |
parent | 29a9162ca14317aab62156f5acf5b21e74198c62 (diff) | |
download | master-187ad058-7c33988517ea18a0f46e11fa5a70176b2a611adb.tar.gz master-187ad058-7c33988517ea18a0f46e11fa5a70176b2a611adb.tar.bz2 master-187ad058-7c33988517ea18a0f46e11fa5a70176b2a611adb.zip |
turned ifxmips mtd driver into a platform device
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9926 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ifxmips/files/arch')
-rw-r--r-- | target/linux/ifxmips/files/arch/mips/ifxmips/board.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c index 05a0715d1f..f048321bdf 100644 --- a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c +++ b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c @@ -71,6 +71,29 @@ static struct platform_device ifxmips_mii[] = .name = "ifxmips_mii0", }, }; + +static struct physmap_flash_data ifxmips_mtd_data = { + .width = 2, +}; + +static struct resource ifxmips_mtd_resource = { + .start = IFXMIPS_FLASH_START, + .end = IFXMIPS_FLASH_START + IFXMIPS_FLASH_MAX - 1, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device ifxmips_mtd[] = +{ + { + .id = 0, + .name = "ifxmips_mtd", + .dev = { + .platform_data = &ifxmips_mtd_data, + }, + .num_resources = 1, + .resource = &ifxmips_mtd_resource, + }, +}; const char* get_system_type (void) @@ -102,6 +125,7 @@ int __init ifxmips_init_devices(void) ifxmips_devs[dev++] = ifxmips_led; ifxmips_devs[dev++] = ifxmips_gpio; ifxmips_devs[dev++] = ifxmips_mii; + ifxmips_devs[dev++] = ifxmips_mtd; return platform_add_devices(ifxmips_devs, dev); } |