2 * Copyright (C) 2010 Scott Nicholas <neutronscott@scottn.us>
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
9 #include <linux/init.h>
10 #include <linux/kernel.h>
11 #include <linux/platform_device.h>
12 #include <linux/mtd/physmap.h>
13 #include <linux/pci.h>
14 #include <linux/slab.h>
15 #include <linux/ioport.h>
16 #include <asm/reboot.h>
18 #include <asm/addrspace.h>
19 #include <asm/bootinfo.h>
23 static struct resource uart_resources
[] = {
25 .start
= ADM8668_UART0_BASE
,
26 .end
= ADM8668_UART0_BASE
+ 0xF,
27 .flags
= IORESOURCE_MEM
,
30 .start
= INT_LVL_UART0
,
31 .flags
= IORESOURCE_IRQ
,
35 static struct platform_device adm8668_uart_device
= {
36 .name
= "adm8668_uart",
38 .resource
= uart_resources
,
39 .num_resources
= ARRAY_SIZE(uart_resources
),
42 static struct resource eth0_resources
[] = {
44 .start
= ADM8668_LAN_BASE
,
45 .end
= ADM8668_LAN_BASE
+ 256,
46 .flags
= IORESOURCE_MEM
,
50 .flags
= IORESOURCE_IRQ
,
54 static struct platform_device adm8668_eth0_device
= {
55 .name
= "adm8668_eth",
57 .resource
= eth0_resources
,
58 .num_resources
= ARRAY_SIZE(eth0_resources
),
61 static struct resource eth1_resources
[] = {
63 .start
= ADM8668_WAN_BASE
,
64 .end
= ADM8668_WAN_BASE
+ 256,
65 .flags
= IORESOURCE_MEM
,
69 .flags
= IORESOURCE_IRQ
,
73 static struct platform_device adm8668_eth1_device
= {
74 .name
= "adm8668_eth",
76 .resource
= eth1_resources
,
77 .num_resources
= ARRAY_SIZE(eth1_resources
),
80 static struct platform_device
*adm8668_devs
[] = {
86 int __devinit
adm8668_devs_register(void)
88 return platform_add_devices(adm8668_devs
, ARRAY_SIZE(adm8668_devs
));
90 arch_initcall(adm8668_devs_register
);