[adm5120] license cleanup
[openwrt.git] / target / linux / adm5120 / files / arch / mips / adm5120 / boards / compex.c
index a58bec3..0d85646 100644 (file)
@@ -6,20 +6,9 @@
  *  Copyright (C) 2007 OpenWrt.org
  *  Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
  *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU General Public License
- *  as published by the Free Software Foundation; either version 2
- *  of the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the
- *  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA  02110-1301, USA.
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
  *
  */
 
@@ -102,7 +91,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 +107,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 +129,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 +154,17 @@ 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,
+       .board_reset    = np28g_reset,
        .eth_num_ports  = 4,
        .eth_vlans      = np28g_vlans,
        .num_devices    = ARRAY_SIZE(np2xg_devices),