2 * linux/arch/arm/mach-mx1/scb9328.c
4 * Copyright (c) 2004 Sascha Hauer <saschahauer@web.de>
5 * Copyright (c) 2006-2008 Juergen Beisert <jbeisert@netscape.net>
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.
13 #include <linux/platform_device.h>
14 #include <linux/mtd/physmap.h>
15 #include <linux/interrupt.h>
16 #include <linux/dm9000.h>
18 #include <asm/mach-types.h>
19 #include <asm/mach/arch.h>
20 #include <asm/mach/time.h>
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>
31 * This scb9328 has a 32MiB flash
33 static struct resource flash_resource
= {
34 .start
= IMX_CS0_PHYS
,
35 .end
= IMX_CS0_PHYS
+ (32 * 1024 * 1024) - 1,
36 .flags
= IORESOURCE_MEM
,
39 static struct physmap_flash_data scb_flash_data
= {
43 static struct platform_device scb_flash_device
= {
44 .name
= "physmap-flash",
47 .platform_data
= &scb_flash_data
,
49 .resource
= &flash_resource
,
54 * scb9328 has a DM9000 network controller
55 * connected to CS5, with 16 bit data path
56 * and interrupt connected to GPIO 3
60 * internal datapath is fixed 16 bit
62 static struct dm9000_plat_data dm9000_platdata
= {
63 .flags
= DM9000_PLATF_16BITONLY
,
67 * the DM9000 drivers wants two defined address spaces
68 * to gain access to address latch registers and the data path.
70 static struct resource dm9000x_resources
[] = {
72 .name
= "address area",
73 .start
= IMX_CS5_PHYS
,
74 .end
= IMX_CS5_PHYS
+ 1,
75 .flags
= IORESOURCE_MEM
, /* address access */
78 .start
= IMX_CS5_PHYS
+ 4,
79 .end
= IMX_CS5_PHYS
+ 5,
80 .flags
= IORESOURCE_MEM
, /* data access */
82 .start
= IRQ_GPIOC(3),
84 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_LOWLEVEL
,
88 static struct platform_device dm9000x_device
= {
91 .num_resources
= ARRAY_SIZE(dm9000x_resources
),
92 .resource
= dm9000x_resources
,
94 .platform_data
= &dm9000_platdata
,
98 static int mxc_uart1_pins
[] = {
105 static int uart1_mxc_init(struct platform_device
*pdev
)
107 return mxc_gpio_setup_multiple_pins(mxc_uart1_pins
,
108 ARRAY_SIZE(mxc_uart1_pins
), "UART1");
111 static int uart1_mxc_exit(struct platform_device
*pdev
)
113 mxc_gpio_release_multiple_pins(mxc_uart1_pins
,
114 ARRAY_SIZE(mxc_uart1_pins
));
118 static struct imxuart_platform_data uart_pdata
= {
119 .init
= uart1_mxc_init
,
120 .exit
= uart1_mxc_exit
,
121 .flags
= IMXUART_HAVE_RTSCTS
,
124 static struct platform_device
*devices
[] __initdata
= {
130 * scb9328_init - Init the CPU card itself
132 static void __init
scb9328_init(void)
134 mxc_register_device(&imx_uart1_device
, &uart_pdata
);
136 printk(KERN_INFO
"Scb9328: Adding devices\n");
137 platform_add_devices(devices
, ARRAY_SIZE(devices
));
140 static void __init
scb9328_timer_init(void)
142 mx1_clocks_init(32000);
145 static struct sys_timer scb9328_timer
= {
146 .init
= scb9328_timer_init
,
149 MACHINE_START(SCB9328
, "Synertronixx scb9328")
151 .phys_io
= 0x00200000,
152 .io_pg_offst
= ((0xe0200000) >> 18) & 0xfffc,
153 .boot_params
= 0x08000100,
154 .map_io
= mx1_map_io
,
155 .init_irq
= mx1_init_irq
,
156 .timer
= &scb9328_timer
,
157 .init_machine
= scb9328_init
,