2 * arch/arm/mach-imx/mach-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>
27 #include "devices-imx1.h"
29 #include "iomux-mx1.h"
31 static const int mx1ads_pins
[] __initconst
= {
57 static const struct imxuart_platform_data uart0_pdata __initconst
= {
58 .flags
= IMXUART_HAVE_RTSCTS
,
61 static const struct imxuart_platform_data uart1_pdata __initconst
= {
62 .flags
= IMXUART_HAVE_RTSCTS
,
69 static const struct physmap_flash_data mx1ads_flash_data __initconst
= {
70 .width
= 4, /* bankwidth in bytes */
73 static const struct resource flash_resource __initconst
= {
74 .start
= MX1_CS0_PHYS
,
75 .end
= MX1_CS0_PHYS
+ SZ_32M
- 1,
76 .flags
= IORESOURCE_MEM
,
82 static struct pcf857x_platform_data pcf857x_data
[] = {
86 .gpio_base
= 4 * 32 + 16,
90 static const struct imxi2c_platform_data mx1ads_i2c_data __initconst
= {
94 static struct i2c_board_info mx1ads_i2c_devices
[] = {
96 I2C_BOARD_INFO("pcf8575", 0x22),
97 .platform_data
= &pcf857x_data
[0],
99 I2C_BOARD_INFO("pcf8575", 0x24),
100 .platform_data
= &pcf857x_data
[1],
107 static void __init
mx1ads_init(void)
111 mxc_gpio_setup_multiple_pins(mx1ads_pins
,
112 ARRAY_SIZE(mx1ads_pins
), "mx1ads");
115 imx1_add_imx_uart0(&uart0_pdata
);
116 imx1_add_imx_uart1(&uart1_pdata
);
119 platform_device_register_resndata(NULL
, "physmap-flash", 0,
121 &mx1ads_flash_data
, sizeof(mx1ads_flash_data
));
124 i2c_register_board_info(0, mx1ads_i2c_devices
,
125 ARRAY_SIZE(mx1ads_i2c_devices
));
127 imx1_add_imx_i2c(&mx1ads_i2c_data
);
130 static void __init
mx1ads_timer_init(void)
132 mx1_clocks_init(32000);
135 MACHINE_START(MX1ADS
, "Freescale MX1ADS")
136 /* Maintainer: Sascha Hauer, Pengutronix */
137 .atag_offset
= 0x100,
138 .map_io
= mx1_map_io
,
139 .init_early
= imx1_init_early
,
140 .init_irq
= mx1_init_irq
,
141 .handle_irq
= imx1_handle_irq
,
142 .init_time
= mx1ads_timer_init
,
143 .init_machine
= mx1ads_init
,
144 .restart
= mxc_restart
,
147 MACHINE_START(MXLADS
, "Freescale MXLADS")
148 .atag_offset
= 0x100,
149 .map_io
= mx1_map_io
,
150 .init_early
= imx1_init_early
,
151 .init_irq
= mx1_init_irq
,
152 .handle_irq
= imx1_handle_irq
,
153 .init_time
= mx1ads_timer_init
,
154 .init_machine
= mx1ads_init
,
155 .restart
= mxc_restart
,