1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

turned ifxmips mtd driver into a platform device

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9926 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
blogic
2007-12-25 13:26:41 +00:00
parent 19e718d6f1
commit a69c163d32
3 changed files with 89 additions and 43 deletions

View File

@@ -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);
}