6 * Copyright (C) 2007-2008 OpenWrt.org
7 * Copyright (C) 2007-2008 Gabor Juhos <juhosg at openwrt.org>
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License version 2 as published
11 * by the Free Software Foundation.
15 #include <linux/kernel.h>
16 #include <linux/init.h>
18 #include <asm/bootinfo.h>
21 #include <adm5120_board.h>
22 #include <adm5120_irq.h>
23 #include <adm5120_platform.h>
25 static struct adm5120_pci_irq br61xx_pci_irqs
[] __initdata
= {
26 PCIIRQ(2, 0, 1, ADM5120_IRQ_PCI0
),
29 static struct mtd_partition br61xx_partitions
[] = {
34 .mask_flags
= MTD_WRITEABLE
,
37 .offset
= MTDPART_OFS_APPEND
,
41 .offset
= MTDPART_OFS_APPEND
,
42 .size
= MTDPART_SIZ_FULL
,
46 static struct platform_device
*br6104k_devices
[] __initdata
= {
47 &adm5120_flash0_device
,
49 &adm5120_buttons_device
,
52 static struct platform_device
*br61x4wg_devices
[] __initdata
= {
53 &adm5120_flash0_device
,
56 static void __init
br61xx_setup(void) {
57 /* setup data for flash0 device */
58 adm5120_flash0_data
.nr_parts
= ARRAY_SIZE(br61xx_partitions
);
59 adm5120_flash0_data
.parts
= br61xx_partitions
;
61 adm5120_buttons_data
.nbuttons
= 1;
62 adm5120_buttons
[0].desc
= "reset button";
63 adm5120_buttons
[0].gpio
= ADM5120_GPIO_PIN2
;
65 /* TODO: setup mac addresses, if possible */
68 unsigned char br61xx_vlans
[6] = {
69 0x41, 0x42, 0x44, 0x48, 0x50, 0x00
72 /*--------------------------------------------------------------------------*/
74 ADM5120_BOARD_START(BR6104K
, "Edimax BR-6104K/6104KP")
75 .board_setup
= br61xx_setup
,
77 .eth_vlans
= br61xx_vlans
,
78 .num_devices
= ARRAY_SIZE(br6104k_devices
),
79 .devices
= br6104k_devices
,
82 ADM5120_BOARD_START(BR61x4WG
, "Edimax BR-6104WG/6114WG")
83 .board_setup
= br61xx_setup
,
85 .eth_vlans
= br61xx_vlans
,
86 .num_devices
= ARRAY_SIZE(br61x4wg_devices
),
87 .devices
= br61x4wg_devices
,
88 .pci_nr_irqs
= ARRAY_SIZE(br61xx_pci_irqs
),
89 .pci_irq_map
= br61xx_pci_irqs
,