diff options
author | Sascha Hauer <sascha@saschahauer.de> | 2006-06-19 10:29:43 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-19 10:29:43 -0400 |
commit | 693532dcff871543639743e9c2e2b99c492f8f8d (patch) | |
tree | 88e5dd99441b2641f96ca9452aa1d496db8037c1 /arch/arm/mach-netx/nxdkn.c | |
parent | 8e77da68a6107ee47323fec5dfb3a93ebbc809e2 (diff) |
[ARM] 3574/1: netX: board support for NXDKN development board
Patch from Sascha Hauer
This patch adds the board specific code for the Hilscher NXDKN
development board.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-netx/nxdkn.c')
-rw-r--r-- | arch/arm/mach-netx/nxdkn.c | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/arch/arm/mach-netx/nxdkn.c b/arch/arm/mach-netx/nxdkn.c new file mode 100644 index 000000000000..7e26c42d1ac7 --- /dev/null +++ b/arch/arm/mach-netx/nxdkn.c | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/nxdkn.c | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/dma-mapping.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/mtd/plat-ram.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/amba/bus.h> | ||
26 | #include <linux/amba/clcd.h> | ||
27 | |||
28 | #include <asm/hardware.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | #include <asm/arch/netx-regs.h> | ||
32 | #include <asm/arch/eth.h> | ||
33 | |||
34 | #include "generic.h" | ||
35 | |||
36 | static struct netxeth_platform_data eth0_platform_data = { | ||
37 | .xcno = 0, | ||
38 | }; | ||
39 | |||
40 | static struct platform_device nxdkn_eth0_device = { | ||
41 | .name = "netx-eth", | ||
42 | .id = 0, | ||
43 | .num_resources = 0, | ||
44 | .resource = NULL, | ||
45 | .dev = { | ||
46 | .platform_data = ð0_platform_data, | ||
47 | } | ||
48 | }; | ||
49 | |||
50 | static struct netxeth_platform_data eth1_platform_data = { | ||
51 | .xcno = 1, | ||
52 | }; | ||
53 | |||
54 | static struct platform_device nxdkn_eth1_device = { | ||
55 | .name = "netx-eth", | ||
56 | .id = 1, | ||
57 | .num_resources = 0, | ||
58 | .resource = NULL, | ||
59 | .dev = { | ||
60 | .platform_data = ð1_platform_data, | ||
61 | } | ||
62 | }; | ||
63 | |||
64 | static struct resource netx_uart0_resources[] = { | ||
65 | [0] = { | ||
66 | .start = 0x00100A00, | ||
67 | .end = 0x00100A3F, | ||
68 | .flags = IORESOURCE_MEM, | ||
69 | }, | ||
70 | [1] = { | ||
71 | .start = (NETX_IRQ_UART0), | ||
72 | .end = (NETX_IRQ_UART0), | ||
73 | .flags = IORESOURCE_IRQ, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | static struct platform_device netx_uart0_device = { | ||
78 | .name = "netx-uart", | ||
79 | .id = 0, | ||
80 | .num_resources = ARRAY_SIZE(netx_uart0_resources), | ||
81 | .resource = netx_uart0_resources, | ||
82 | }; | ||
83 | |||
84 | static struct platform_device *devices[] __initdata = { | ||
85 | &nxdkn_eth0_device, | ||
86 | &nxdkn_eth1_device, | ||
87 | &netx_uart0_device, | ||
88 | }; | ||
89 | |||
90 | static void __init nxdkn_init(void) | ||
91 | { | ||
92 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
93 | } | ||
94 | |||
95 | MACHINE_START(NXDKN, "Hilscher nxdkn") | ||
96 | .phys_io = 0x00100000, | ||
97 | .io_pg_offst = (io_p2v(0x00100000) >> 18) & 0xfffc, | ||
98 | .boot_params = 0x80000100, | ||
99 | .map_io = netx_map_io, | ||
100 | .init_irq = netx_init_irq, | ||
101 | .timer = &netx_timer, | ||
102 | .init_machine = nxdkn_init, | ||
103 | MACHINE_END | ||