adm5120: add experimental 3.14 kernel support
[openwrt/svn-archive/archive.git] / target / linux / adm5120 / files-3.14 / arch / mips / adm5120 / infineon / easy5120-rt.c
1 /*
2 * Infineon EASY 5120-RT Reference Board support
3 *
4 * Copyright (C) 2007-2008 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 "infineon.h"
13
14 static struct gpio_led easy5120_rt_gpio_leds[] __initdata = {
15 GPIO_LED_INV(ADM5120_GPIO_PIN6, "user", NULL),
16 GPIO_LED_INV(ADM5120_GPIO_P0L0, "lan0_led1", NULL),
17 GPIO_LED_INV(ADM5120_GPIO_P0L1, "lan0_led2", NULL),
18 GPIO_LED_INV(ADM5120_GPIO_P1L0, "lan1_led1", NULL),
19 GPIO_LED_INV(ADM5120_GPIO_P1L1, "lan1_led2", NULL),
20 GPIO_LED_INV(ADM5120_GPIO_P2L0, "lan2_led1", NULL),
21 GPIO_LED_INV(ADM5120_GPIO_P2L1, "lan2_led2", NULL),
22 GPIO_LED_INV(ADM5120_GPIO_P3L0, "lan3_led1", NULL),
23 GPIO_LED_INV(ADM5120_GPIO_P3L1, "lan3_led2", NULL),
24 GPIO_LED_INV(ADM5120_GPIO_P4L0, "wan", NULL),
25 };
26
27 static struct adm5120_pci_irq easy5120_rt_pci_irqs[] __initdata = {
28 PCIIRQ(2, 0, 1, ADM5120_IRQ_PCI0),
29 };
30
31 static u8 easy5120_rt_vlans[6] __initdata = {
32 0x41, 0x42, 0x44, 0x48, 0x50, 0x00
33 };
34
35 static void __init easy5120_rt_setup(void)
36 {
37 easy_setup_bga();
38
39 adm5120_add_device_switch(5, easy5120_rt_vlans);
40 adm5120_add_device_usb();
41 adm5120_add_device_gpio_leds(ARRAY_SIZE(easy5120_rt_gpio_leds),
42 easy5120_rt_gpio_leds);
43 adm5120_pci_set_irq_map(ARRAY_SIZE(easy5120_rt_pci_irqs),
44 easy5120_rt_pci_irqs);
45 }
46
47 MIPS_MACHINE(MACH_ADM5120_EASY5120RT, "EASY5120-RT",
48 "Infineon EASY 5120-RT Reference Board", easy5120_rt_setup);