diff options
author | Florian Fainelli <florian@openwrt.org> | 2007-10-22 20:56:34 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2007-10-22 20:56:34 +0000 |
commit | 2a0ca50ce2fbc3fc5b0eab9e48c08b46f0b7aa54 (patch) | |
tree | b78e86a8da696710637c45773eea65e3649a9cbe /target/linux/adm5120/files/arch | |
parent | 5db86fb47a934a9afbe6d960a67ac1821be6dd74 (diff) | |
download | mtk-20170518-2a0ca50ce2fbc3fc5b0eab9e48c08b46f0b7aa54.zip mtk-20170518-2a0ca50ce2fbc3fc5b0eab9e48c08b46f0b7aa54.tar.gz mtk-20170518-2a0ca50ce2fbc3fc5b0eab9e48c08b46f0b7aa54.tar.bz2 |
Add preliminary support for the Routerboard 153 CF slot (#2550)
SVN-Revision: 9403
Diffstat (limited to 'target/linux/adm5120/files/arch')
-rw-r--r-- | target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c | 34 |
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 64c32c6..74dd860 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, }; |