summaryrefslogtreecommitdiff
path: root/target/linux/adm5120-2.6/files/arch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-07-18 17:16:36 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-07-18 17:16:36 +0000
commitb3fae870093c1ca8d1c810251645f04e6b5a0db7 (patch)
tree42ce62e1cffbf61313363a5f1e43ed6d049ae99c /target/linux/adm5120-2.6/files/arch
parentf59b6f608993a86df80078e1f73d3917409a6f74 (diff)
downloadmtk-20170518-b3fae870093c1ca8d1c810251645f04e6b5a0db7.zip
mtk-20170518-b3fae870093c1ca8d1c810251645f04e6b5a0db7.tar.gz
mtk-20170518-b3fae870093c1ca8d1c810251645f04e6b5a0db7.tar.bz2
Convert the nand driver to a platform_device, should only allow routerboards to use it
SVN-Revision: 8045
Diffstat (limited to 'target/linux/adm5120-2.6/files/arch')
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/mikrotik.c1
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c19
2 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/mikrotik.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/mikrotik.c
index 7ced1f1..fccb284 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/mikrotik.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/mikrotik.c
@@ -47,6 +47,7 @@ static struct mtd_partition rb1xx_partitions[] = {
static struct platform_device *rb1xx_devices[] __initdata = {
&adm5120_flash0_device,
+ &adm5120_nand_device,
};
static void __init rb1xx_setup(void)
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c
index 8fd89ae..4459882 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c
@@ -109,3 +109,22 @@ struct platform_device adm5120_flash1_device = {
.id = 1,
.dev.platform_data = &adm5120_flash1_data,
};
+
+/* NAND flash */
+struct resource adm5120_nand_resource[] = {
+ [0] = {
+ .start = ADM5120_SRAM1_BASE,
+ .end = ADM5120_SRAM1_BASE+0x1000-1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+struct adm5120_nand_platform_data adm5120_nand_data;
+
+struct platform_device adm5120_nand_device = {
+ .name = "adm5120-nand",
+ .id = -1,
+ .dev.platform_data = &adm5120_nand_data,
+ .num_resources = ARRAY_SIZE(adm5120_nand_resource),
+ .resource = adm5120_nand_resource,
+};