summaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120/files/arch
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-10-22 20:56:34 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-10-22 20:56:34 +0000
commit663af573eb897f7df39e85a652cd4f7cfb834f29 (patch)
tree27d471d824bb7099552b1889328cd863ed88efbb /target/linux/adm5120/files/arch
parent01535e65a277f46aa658637a6a9a79f8212b237f (diff)
Add preliminary support for the Routerboard 153 CF slot (#2550)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9403 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120/files/arch')
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c b/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c
index 64c32c623..74dd860dc 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c
@@ -42,6 +42,7 @@
#include <adm5120_nand.h>
#include <adm5120_board.h>
#include <adm5120_platform.h>
+#include <adm5120_cf.h>
#define RB1XX_NAND_CHIP_DELAY 25
@@ -178,6 +179,35 @@ static void rb150_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
}
/*--------------------------------------------------------------------------*/
+static struct resource cf_slot0_res[] = {
+ {
+ .name = "cf_membase",
+ .flags = IORESOURCE_MEM
+ }, {
+ .name = "cf_irq",
+ .start = INTC_IRQ_GPIO4, /* 5 */
+ .end = INTC_IRQ_GPIO4,
+ .flags = IORESOURCE_IRQ
+ }
+};
+
+static struct cf_device cf_slot0_data = {
+ .gpio_pin = 4
+};
+
+static struct platform_device cf_slot0 = {
+ .id = 0,
+ .name = "rb153-cf",
+ .dev.platform_data = &cf_slot0_data,
+ .resource = cf_slot0_res,
+ .num_resources = ARRAY_SIZE(cf_slot0_res),
+};
+
+static struct platform_device *rb153_devices[] __initdata = {
+ &adm5120_flash0_device,
+ &adm5120_nand_device,
+ &cf_slot0,
+};
static void __init rb1xx_mac_setup(void)
{
@@ -299,8 +329,8 @@ static struct adm5120_board rb153_board __initdata = {
.board_setup = rb1xx_setup,
.eth_num_ports = 5,
.eth_vlans = rb15x_vlans,
- .num_devices = ARRAY_SIZE(rb1xx_devices),
- .devices = rb1xx_devices,
+ .num_devices = ARRAY_SIZE(rb153_devices),
+ .devices = rb153_devices,
.pci_nr_irqs = ARRAY_SIZE(rb1xx_pci_irqs),
.pci_irq_map = rb1xx_pci_irqs,
};