aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120/files/arch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-11-01 17:11:16 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-11-01 17:11:16 +0000
commitc99cac383ed8c988b489224c22ecc2b11b1b402d (patch)
tree52f82585d91888442e882a14874ef740cf614953 /target/linux/adm5120/files/arch
parent314a8d75d0abfa5705c6f6b112191ffadbae27d7 (diff)
downloadupstream-c99cac383ed8c988b489224c22ecc2b11b1b402d.tar.gz
upstream-c99cac383ed8c988b489224c22ecc2b11b1b402d.tar.bz2
upstream-c99cac383ed8c988b489224c22ecc2b11b1b402d.zip
CF driver cleanup
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9473 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.c20
1 files changed, 19 insertions, 1 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 41004964bd..1af14ab908 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c
@@ -59,6 +59,9 @@
#define RB150_NAND_WRITE(v) \
writeb((v), (void __iomem *)KSEG1ADDR(RB150_NAND_BASE))
+#define RB153_GPIO_CF_RDY ADM5120_GPIO_P1L1
+#define RB153_GPIO_CF_WT ADM5120_GPIO_P0L0
+
/*--------------------------------------------------------------------------*/
static struct adm5120_pci_irq rb1xx_pci_irqs[] __initdata = {
@@ -233,6 +236,15 @@ static void __init rb1xx_flash_setup(void)
adm5120_nand_data.chip.options = NAND_NO_AUTOINCR;
}
+static void __init rb153_cf_setup(void)
+{
+ gpio_request(RB153_GPIO_CF_RDY, "cf-ready");
+ gpio_direction_input(RB153_GPIO_CF_RDY);
+ gpio_request(RB153_GPIO_CF_WT, "cf-wait");
+ gpio_direction_output(RB153_GPIO_CF_WT, 1);
+ gpio_direction_input(RB153_GPIO_CF_WT);
+}
+
static void __init rb1xx_setup(void)
{
/* enable NAND flash interface */
@@ -269,6 +281,12 @@ static void __init rb150_setup(void)
rb1xx_mac_setup();
}
+static void __init rb153_setup(void)
+{
+ rb150_setup();
+ rb153_cf_setup();
+}
+
/*--------------------------------------------------------------------------*/
ADM5120_BOARD_START(RB_111, "Mikrotik RouterBOARD 111")
@@ -320,7 +338,7 @@ ADM5120_BOARD_START(RB_150, "Mikrotik RouterBOARD 150")
ADM5120_BOARD_END
ADM5120_BOARD_START(RB_153, "Mikrotik RouterBOARD 153")
- .board_setup = rb1xx_setup,
+ .board_setup = rb153_setup,
.eth_num_ports = 5,
.eth_vlans = rb15x_vlans,
.num_devices = ARRAY_SIZE(rb153_devices),