6 * Copyright (C) 2007 OpenWrt.org
7 * Copyright (C) 2007 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
,
51 static struct platform_device
*br61x4wg_devices
[] __initdata
= {
52 &adm5120_flash0_device
,
55 static void __init
br61xx_setup(void) {
56 /* setup data for flash0 device */
57 adm5120_flash0_data
.nr_parts
= ARRAY_SIZE(br61xx_partitions
);
58 adm5120_flash0_data
.parts
= br61xx_partitions
;
60 /* TODO: setup mac addresses, if possible */
63 unsigned char br61xx_vlans
[6] = {
64 0x41, 0x42, 0x44, 0x48, 0x50, 0x00
67 /*--------------------------------------------------------------------------*/
69 ADM5120_BOARD_START(BR6104K
, "Edimax BR-6104K/6104KP")
70 .board_setup
= br61xx_setup
,
72 .eth_vlans
= br61xx_vlans
,
73 .num_devices
= ARRAY_SIZE(br6104k_devices
),
74 .devices
= br6104k_devices
,
77 ADM5120_BOARD_START(BR61x4WG
, "Edimax BR-6104WG/6114WG")
78 .board_setup
= br61xx_setup
,
80 .eth_vlans
= br61xx_vlans
,
81 .num_devices
= ARRAY_SIZE(br61x4wg_devices
),
82 .devices
= br61x4wg_devices
,
83 .pci_nr_irqs
= ARRAY_SIZE(br61xx_pci_irqs
),
84 .pci_irq_map
= br61xx_pci_irqs
,