2 * OSBRiDGE 5GXi/5XLi board support
4 * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
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.
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/gpio.h>
14 #include <linux/irq.h>
15 #include <linux/etherdevice.h>
17 #include <asm/mips_machine.h>
19 #include <asm/mach-adm5120/adm5120_defs.h>
20 #include <asm/mach-adm5120/adm5120_platform.h>
21 #include <asm/mach-adm5120/adm5120_info.h>
23 static struct mtd_partition osbridge_5gxi_partitions
[] = {
28 .mask_flags
= MTD_WRITEABLE
,
35 .offset
= MTDPART_OFS_APPEND
,
36 .size
= MTDPART_SIZ_FULL
,
40 static struct gpio_led osbridge_5gxi_gpio_leds
[] __initdata
= {
41 GPIO_LED_INV(ADM5120_GPIO_PIN6
, "5gxi:green:user", NULL
),
42 GPIO_LED_INV(ADM5120_GPIO_P0L0
, "5gxi:yellow:lan", NULL
),
45 static struct adm5120_pci_irq osbridge_5gxi_pci_irqs
[] __initdata
= {
46 PCIIRQ(2, 0, 1, ADM5120_IRQ_PCI0
),
49 static u8 osbridge_5gxi_vlans
[6] __initdata
= {
50 0x41, 0x00, 0x00, 0x00, 0x00, 0x00
53 static void __init
osbridge_5gxi_setup(void)
55 adm5120_flash0_data
.nr_parts
= ARRAY_SIZE(osbridge_5gxi_partitions
);
56 adm5120_flash0_data
.parts
= osbridge_5gxi_partitions
;
58 adm5120_add_device_uart(0);
59 adm5120_add_device_uart(1);
61 adm5120_add_device_flash(0);
63 adm5120_add_device_switch(1, osbridge_5gxi_vlans
);
64 adm5120_add_device_gpio_leds(ARRAY_SIZE(osbridge_5gxi_gpio_leds
),
65 osbridge_5gxi_gpio_leds
);
66 adm5120_pci_set_irq_map(ARRAY_SIZE(osbridge_5gxi_pci_irqs
),
67 osbridge_5gxi_pci_irqs
);
70 MIPS_MACHINE(MACH_ADM5120_5GXI
, "5GXi", "OSBRiDGE 5GXi/5XLi board",