summaryrefslogtreecommitdiff
path: root/target/linux/adm5120
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2007-12-11 17:59:42 +0000
committerGabor Juhos <juhosg@openwrt.org>2007-12-11 17:59:42 +0000
commit224aaf34ac23a499b590f37f801b597f169fec86 (patch)
tree4635fa23fbf89ee6b564f5d559709bb72903ac3d /target/linux/adm5120
parent7afab49bc7fb1518d8ef7f3071f6b82936196df8 (diff)
downloadmtk-20170518-224aaf34ac23a499b590f37f801b597f169fec86.zip
mtk-20170518-224aaf34ac23a499b590f37f801b597f169fec86.tar.gz
mtk-20170518-224aaf34ac23a499b590f37f801b597f169fec86.tar.bz2
enable wait state pin for the CF slot on the RB153 board
SVN-Revision: 9709
Diffstat (limited to 'target/linux/adm5120')
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c4
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/gpio.c2
2 files changed, 5 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 102fa56..3d2facf 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/boards/mikrotik.c
@@ -242,8 +242,10 @@ static void __init rb1xx_flash_setup(void)
static void __init rb153_cf_setup(void)
{
- /* enable CSX1:INTX1 on GPIO 3:4 for the CF slot */
+ /* enable CSX1:INTX1 on GPIO[3:4] for the CF slot */
adm5120_gpio_csx1_enable();
+ /* enable the wait state pin GPIO[0] for external I/O control */
+ adm5120_gpio_ew_enable();
gpio_request(RB153_GPIO_CF_RDY, "cf-ready");
gpio_direction_input(RB153_GPIO_CF_RDY);
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/gpio.c b/target/linux/adm5120/files/arch/mips/adm5120/gpio.c
index a6cfdcb..a9e6e6b 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/gpio.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/gpio.c
@@ -370,6 +370,8 @@ void __init adm5120_gpio_ew_enable(void)
t = SW_READ_REG(GPIO_CONF2);
t |= GPIO_CONF2_EW;
SW_WRITE_REG(GPIO_CONF2, t);
+
+ adm5120_gpio_map[ADM5120_GPIO_PIN0].flags &= ~GPIO_FLAG_VALID;
}
void __init adm5120_gpio_init(void)