[adm5120] more license cleanups
[openwrt.git] / target / linux / adm5120 / files / arch / mips / adm5120 / board.c
index 1d0cc66..0153cce 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.
  *
  */
 
@@ -83,6 +72,8 @@ static int __init adm5120_board_setup(void)
 
        memcpy(&adm5120_board_name, board->name, ADM5120_BOARD_NAMELEN);
 
+       adm5120_gpio_init();
+
        adm5120_board_reset = board->board_reset;
        if (board->eth_num_ports > 0)
                adm5120_eth_num_ports = board->eth_num_ports;
@@ -98,6 +89,9 @@ static int __init adm5120_board_setup(void)
        amba_device_register(&adm5120_uart0_device, &iomem_resource);
        amba_device_register(&adm5120_uart1_device, &iomem_resource);
 
+       /* register built-in ethernet switch */
+       platform_device_register(&adm5120_switch_device);
+
        /* setup PCI irq map */
        adm5120_pci_set_irq_map(board->pci_nr_irqs, board->pci_irq_map);
 
@@ -114,16 +108,6 @@ arch_initcall(adm5120_board_setup);
 
 void __init adm5120_board_register(struct adm5120_board *board)
 {
-       list_add(&board->list, &adm5120_boards);
+       list_add_tail(&board->list, &adm5120_boards);
        printk(KERN_INFO PFX "registered board '%s'\n", board->name);
 }
-
-void __init adm5120_register_boards(struct adm5120_board **boards,
-               int num)
-{
-       int i;
-
-       for (i = 0; i < num; i++)
-               adm5120_board_register(boards[i]);
-}
-