[adm5120] NFS-101U/WU: add PCI irq map and change vlan map
[openwrt-10.03/.git] / target / linux / adm5120 / files / arch / mips / adm5120 / cellvision / nfs-101.c
1 /*
2  *  Cellvision/SparkLAN NFS-101U/WU support
3  *
4  *  Copyright (C) 2007-2009 Gabor Juhos <juhosg@openwrt.org>
5  *
6  *  This program is free software; you can redistribute it and/or modify it
7  *  under the terms of the GNU General Public License version 2 as published
8  *  by the Free Software Foundation.
9  *
10  */
11
12 #include "cellvision.h"
13
14 static struct adm5120_pci_irq nfs101_pci_irqs[] __initdata = {
15         /* FIXME: not tested */
16         PCIIRQ(2, 0, 1, ADM5120_IRQ_PCI0),
17         PCIIRQ(3, 0, 2, ADM5120_IRQ_PCI2),
18         PCIIRQ(3, 3, 1, ADM5120_IRQ_PCI1)
19 };
20
21 static u8 nfs101_vlans[6] __initdata = {
22         /* FIXME: not tested */
23         0x5f, 0x00, 0x00, 0x00, 0x00, 0x00
24 };
25
26 static void __init nfs101_setup(void)
27 {
28         cas6xx_flash_setup();
29         cellvision_mac_setup();
30
31         adm5120_add_device_uart(0);
32         adm5120_add_device_uart(1);
33         adm5120_add_device_switch(1, nfs101_vlans);
34
35         adm5120_pci_set_irq_map(ARRAY_SIZE(nfs101_pci_irqs),
36                                 nfs101_pci_irqs);
37 }
38
39 MIPS_MACHINE(MACH_ADM5120_NFS101U, "Cellvision NFS-101U/101WU", nfs101_setup);