aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx1
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-01-28 11:36:37 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 05:34:16 -0400
commit2420563227897ed3900606e720f886e122944d2c (patch)
treec5b64785235e6afed44947fbf46302c89cd529ec /arch/arm/mach-mx1
parent792067507b8bf5eaf220ee6994423381b7ae5c0b (diff)
[ARM] Add Synertronixx scb9328 board support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx1')
-rw-r--r--arch/arm/mach-mx1/Kconfig4
-rw-r--r--arch/arm/mach-mx1/Makefile1
-rw-r--r--arch/arm/mach-mx1/scb9328.c160
3 files changed, 165 insertions, 0 deletions
diff --git a/arch/arm/mach-mx1/Kconfig b/arch/arm/mach-mx1/Kconfig
index 2b59fc74784f..f86cfcb60224 100644
--- a/arch/arm/mach-mx1/Kconfig
+++ b/arch/arm/mach-mx1/Kconfig
@@ -11,4 +11,8 @@ config ARCH_MX1ADS
11 help 11 help
12 Say Y here if you are using Motorola MX1ADS/MXLADS boards 12 Say Y here if you are using Motorola MX1ADS/MXLADS boards
13 13
14config MACH_SCB9328
15 bool "Synertronixx scb9328"
16 help
17 Say Y here if you are using a Synertronixx scb9328 board
14endif 18endif
diff --git a/arch/arm/mach-mx1/Makefile b/arch/arm/mach-mx1/Makefile
index b969719011fa..82f1309568ef 100644
--- a/arch/arm/mach-mx1/Makefile
+++ b/arch/arm/mach-mx1/Makefile
@@ -8,3 +8,4 @@ obj-y += generic.o clock.o devices.o
8 8
9# Specific board support 9# Specific board support
10obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o 10obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o
11obj-$(CONFIG_MACH_SCB9328) += scb9328.o \ No newline at end of file
diff --git a/arch/arm/mach-mx1/scb9328.c b/arch/arm/mach-mx1/scb9328.c
new file mode 100644
index 000000000000..0e71f3fa28bf
--- /dev/null
+++ b/arch/arm/mach-mx1/scb9328.c
@@ -0,0 +1,160 @@
1/*
2 * linux/arch/arm/mach-mx1/scb9328.c
3 *
4 * Copyright (c) 2004 Sascha Hauer <saschahauer@web.de>
5 * Copyright (c) 2006-2008 Juergen Beisert <jbeisert@netscape.net>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 */
12
13#include <linux/platform_device.h>
14#include <linux/mtd/physmap.h>
15#include <linux/interrupt.h>
16#include <linux/dm9000.h>
17
18#include <asm/mach-types.h>
19#include <asm/mach/arch.h>
20#include <asm/mach/time.h>
21
22#include <mach/common.h>
23#include <mach/hardware.h>
24#include <mach/irqs.h>
25#include <mach/imx-uart.h>
26#include <mach/iomux.h>
27
28#include "devices.h"
29
30/*
31 * This scb9328 has a 32MiB flash
32 */
33static struct resource flash_resource = {
34 .start = IMX_CS0_PHYS,
35 .end = IMX_CS0_PHYS + (32 * 1024 * 1024) - 1,
36 .flags = IORESOURCE_MEM,
37};
38
39static struct physmap_flash_data scb_flash_data = {
40 .width = 2,
41};
42
43static struct platform_device scb_flash_device = {
44 .name = "physmap-flash",
45 .id = 0,
46 .dev = {
47 .platform_data = &scb_flash_data,
48 },
49 .resource = &flash_resource,
50 .num_resources = 1,
51};
52
53/*
54 * scb9328 has a DM9000 network controller
55 * connected to CS5, with 16 bit data path
56 * and interrupt connected to GPIO 3
57 */
58
59/*
60 * internal datapath is fixed 16 bit
61 */
62static struct dm9000_plat_data dm9000_platdata = {
63 .flags = DM9000_PLATF_16BITONLY,
64};
65
66/*
67 * the DM9000 drivers wants two defined address spaces
68 * to gain access to address latch registers and the data path.
69 */
70static struct resource dm9000x_resources[] = {
71 [0] = {
72 .name = "address area",
73 .start = IMX_CS5_PHYS,
74 .end = IMX_CS5_PHYS + 1,
75 .flags = IORESOURCE_MEM /* address access */
76 },
77 [1] = {
78 .name = "data area",
79 .start = IMX_CS5_PHYS + 4,
80 .end = IMX_CS5_PHYS + 5,
81 .flags = IORESOURCE_MEM /* data access */
82 },
83 [2] = {
84 .start = IRQ_GPIOC(3),
85 .end = IRQ_GPIOC(3),
86 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL
87 },
88};
89
90static struct platform_device dm9000x_device = {
91 .name = "dm9000",
92 .id = 0,
93 .num_resources = ARRAY_SIZE(dm9000x_resources),
94 .resource = dm9000x_resources,
95 .dev = {
96 .platform_data = &dm9000_platdata,
97 }
98};
99
100static int mxc_uart1_pins[] = {
101 PC9_PF_UART1_CTS,
102 PC10_PF_UART1_RTS,
103 PC11_PF_UART1_TXD,
104 PC12_PF_UART1_RXD,
105};
106
107static int uart1_mxc_init(struct platform_device *pdev)
108{
109 return mxc_gpio_setup_multiple_pins(mxc_uart1_pins,
110 ARRAY_SIZE(mxc_uart1_pins), "UART1");
111}
112
113static int uart1_mxc_exit(struct platform_device *pdev)
114{
115 mxc_gpio_release_multiple_pins(mxc_uart1_pins,
116 ARRAY_SIZE(mxc_uart1_pins));
117 return 0;
118}
119
120static struct imxuart_platform_data uart_pdata = {
121 .init = uart1_mxc_init,
122 .exit = uart1_mxc_exit,
123 .flags = IMXUART_HAVE_RTSCTS,
124};
125
126static struct platform_device *devices[] __initdata = {
127 &scb_flash_device,
128 &dm9000x_device,
129};
130
131/*
132 * scb9328_init - Init the CPU card itself
133 */
134static void __init scb9328_init(void)
135{
136 mxc_register_device(&imx_uart1_device, &uart_pdata);
137
138 printk(KERN_INFO"Scb9328: Adding devices\n");
139 platform_add_devices(devices, ARRAY_SIZE(devices));
140}
141
142static void __init scb9328_timer_init(void)
143{
144 mx1_clocks_init(32000);
145}
146
147static struct sys_timer scb9328_timer = {
148 .init = scb9328_timer_init,
149};
150
151MACHINE_START(SCB9328, "Synertronixx scb9328")
152 /* Sascha Hauer */
153 .phys_io = 0x00200000,
154 .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc,
155 .boot_params = 0x08000100,
156 .map_io = mxc_map_io,
157 .init_irq = mxc_init_irq,
158 .timer = &scb9328_timer,
159 .init_machine = scb9328_init,
160MACHINE_END