2 * arch/arm/mach-imx/mx1ads.c
5 * linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c
6 * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de>
8 * 2004 (c) MontaVista Software, Inc.
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
15 #include <linux/i2c.h>
16 #include <linux/i2c/pcf857x.h>
17 #include <linux/init.h>
18 #include <linux/kernel.h>
19 #include <linux/platform_device.h>
20 #include <linux/mtd/physmap.h>
22 #include <asm/mach-types.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach/time.h>
26 #include <mach/common.h>
27 #include <mach/hardware.h>
29 #include <mach/imx-uart.h>
30 #include <mach/iomux.h>
31 #include <mach/irqs.h>
35 static int mx1ads_pins
[] = {
61 static struct imxuart_platform_data uart_pdata
[] = {
63 .flags
= IMXUART_HAVE_RTSCTS
,
65 .flags
= IMXUART_HAVE_RTSCTS
,
73 static struct physmap_flash_data mx1ads_flash_data
= {
74 .width
= 4, /* bankwidth in bytes */
77 static struct resource flash_resource
= {
78 .start
= IMX_CS0_PHYS
,
79 .end
= IMX_CS0_PHYS
+ SZ_32M
- 1,
80 .flags
= IORESOURCE_MEM
,
83 static struct platform_device flash_device
= {
84 .name
= "physmap-flash",
86 .resource
= &flash_resource
,
93 static struct pcf857x_platform_data pcf857x_data
[] = {
97 .gpio_base
= 4 * 32 + 16,
101 static struct imxi2c_platform_data mx1ads_i2c_data
= {
105 static struct i2c_board_info mx1ads_i2c_devices
[] = {
107 I2C_BOARD_INFO("pcf8575", 0x22),
108 .platform_data
= &pcf857x_data
[0],
110 I2C_BOARD_INFO("pcf8575", 0x24),
111 .platform_data
= &pcf857x_data
[1],
118 static void __init
mx1ads_init(void)
120 mxc_gpio_setup_multiple_pins(mx1ads_pins
,
121 ARRAY_SIZE(mx1ads_pins
), "mx1ads");
124 mxc_register_device(&imx_uart1_device
, &uart_pdata
[0]);
125 mxc_register_device(&imx_uart2_device
, &uart_pdata
[1]);
128 mxc_register_device(&flash_device
, &mx1ads_flash_data
);
131 i2c_register_board_info(0, mx1ads_i2c_devices
,
132 ARRAY_SIZE(mx1ads_i2c_devices
));
134 mxc_register_device(&imx_i2c_device
, &mx1ads_i2c_data
);
137 static void __init
mx1ads_timer_init(void)
139 mx1_clocks_init(32000);
142 struct sys_timer mx1ads_timer
= {
143 .init
= mx1ads_timer_init
,
146 MACHINE_START(MX1ADS
, "Freescale MX1ADS")
147 /* Maintainer: Sascha Hauer, Pengutronix */
148 .phys_io
= IMX_IO_PHYS
,
149 .io_pg_offst
= (IMX_IO_BASE
>> 18) & 0xfffc,
150 .boot_params
= PHYS_OFFSET
+ 0x100,
151 .map_io
= mx1_map_io
,
152 .init_irq
= mx1_init_irq
,
153 .timer
= &mx1ads_timer
,
154 .init_machine
= mx1ads_init
,
157 MACHINE_START(MXLADS
, "Freescale MXLADS")
158 .phys_io
= IMX_IO_PHYS
,
159 .io_pg_offst
= (IMX_IO_BASE
>> 18) & 0xfffc,
160 .boot_params
= PHYS_OFFSET
+ 0x100,
161 .map_io
= mx1_map_io
,
162 .init_irq
= mx1_init_irq
,
163 .timer
= &mx1ads_timer
,
164 .init_machine
= mx1ads_init
,