summaryrefslogtreecommitdiff
path: root/target/linux/adm5120/files/arch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2007-12-16 19:03:40 +0000
committerGabor Juhos <juhosg@openwrt.org>2007-12-16 19:03:40 +0000
commit3befb653fa1877673fb5b84913413b9b42eb600b (patch)
treee1f3294017cb7eb659c1d870bae614a3b20978cc /target/linux/adm5120/files/arch
parent7e83cf568adda47d200a398594a8a603fa08792a (diff)
downloadmtk-20170518-3befb653fa1877673fb5b84913413b9b42eb600b.zip
mtk-20170518-3befb653fa1877673fb5b84913413b9b42eb600b.tar.gz
mtk-20170518-3befb653fa1877673fb5b84913413b9b42eb600b.tar.bz2
add support for LEDs on the NP28G board, thanks to kenny (closes: #2825)
SVN-Revision: 9781
Diffstat (limited to 'target/linux/adm5120/files/arch')
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/boards/compex.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/boards/compex.c b/target/linux/adm5120/files/arch/mips/adm5120/boards/compex.c
index a58bec3..d1c6bc4 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/boards/compex.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/boards/compex.c
@@ -102,7 +102,12 @@ static void wp54_reset(void)
gpio_set_value(ADM5120_GPIO_PIN3, 0);
}
-static void __init np2xg_setup(void)
+static void np28g_reset(void)
+{
+ gpio_set_value(ADM5120_GPIO_PIN4, 0);
+}
+
+static void __init np27g_setup(void)
{
gpio_request(ADM5120_GPIO_PIN5, NULL); /* for flash A20 line */
gpio_direction_output(ADM5120_GPIO_PIN5, 0);
@@ -113,6 +118,20 @@ static void __init np2xg_setup(void)
/* TODO: setup mac address */
}
+static void __init np28g_setup(void)
+{
+ gpio_request(ADM5120_GPIO_PIN5, NULL); /* for flash A20 line */
+ gpio_direction_output(ADM5120_GPIO_PIN5, 0);
+
+ gpio_request(ADM5120_GPIO_PIN4, NULL); /* for system reset */
+ gpio_direction_output(ADM5120_GPIO_PIN4, 1);
+
+ /* setup data for flash0 device */
+ adm5120_flash0_data.switch_bank = switch_bank_gpio5;
+
+ /* TODO: setup mac address */
+}
+
static void __init wp54_setup(void)
{
gpio_request(ADM5120_GPIO_PIN5, NULL); /* for flash A20 line */
@@ -121,7 +140,6 @@ static void __init wp54_setup(void)
gpio_request(ADM5120_GPIO_PIN3, NULL); /* for system reset */
gpio_direction_output(ADM5120_GPIO_PIN3, 1);
-
/* setup data for flash0 device */
adm5120_flash0_data.switch_bank = switch_bank_gpio5;
@@ -147,15 +165,16 @@ static void __init wp54_wrt_setup(void)
/*--------------------------------------------------------------------------*/
ADM5120_BOARD_START(NP27G, "Compex NetPassage 27G")
- .board_setup = np2xg_setup,
+ .board_setup = np27g_setup,
.eth_num_ports = 5,
.eth_vlans = np27g_vlans,
.num_devices = ARRAY_SIZE(np2xg_devices),
.devices = np2xg_devices,
+ /* TODO: add PCI IRQ map */
ADM5120_BOARD_END
ADM5120_BOARD_START(NP28G, "Compex NetPassage 28G")
- .board_setup = np2xg_setup,
+ .board_setup = np28g_setup,
.eth_num_ports = 4,
.eth_vlans = np28g_vlans,
.num_devices = ARRAY_SIZE(np2xg_devices),