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/kernel.h>
16 #include <linux/init.h>
17 #include <linux/platform_device.h>
18 #include <linux/mtd/physmap.h>
20 #include <asm/mach-types.h>
21 #include <asm/mach/arch.h>
22 #include <asm/mach/time.h>
24 #include <mach/hardware.h>
25 #include <mach/common.h>
26 #include <mach/imx-uart.h>
27 #include <mach/iomux-mx1-mx2.h>
33 static int mxc_uart1_pins
[] = {
40 static int uart1_mxc_init(struct platform_device
*pdev
)
42 return mxc_gpio_setup_multiple_pins(mxc_uart1_pins
,
43 ARRAY_SIZE(mxc_uart1_pins
), "UART1");
46 static int uart1_mxc_exit(struct platform_device
*pdev
)
48 mxc_gpio_release_multiple_pins(mxc_uart1_pins
,
49 ARRAY_SIZE(mxc_uart1_pins
));
53 static int mxc_uart2_pins
[] = {
60 static int uart2_mxc_init(struct platform_device
*pdev
)
62 return mxc_gpio_setup_multiple_pins(mxc_uart2_pins
,
63 ARRAY_SIZE(mxc_uart2_pins
), "UART2");
66 static int uart2_mxc_exit(struct platform_device
*pdev
)
68 mxc_gpio_release_multiple_pins(mxc_uart2_pins
,
69 ARRAY_SIZE(mxc_uart2_pins
));
73 static struct imxuart_platform_data uart_pdata
[] = {
75 .init
= uart1_mxc_init
,
76 .exit
= uart1_mxc_exit
,
77 .flags
= IMXUART_HAVE_RTSCTS
,
79 .init
= uart2_mxc_init
,
80 .exit
= uart2_mxc_exit
,
81 .flags
= IMXUART_HAVE_RTSCTS
,
89 static struct physmap_flash_data mx1ads_flash_data
= {
90 .width
= 4, /* bankwidth in bytes */
93 static struct resource flash_resource
= {
94 .start
= IMX_CS0_PHYS
,
95 .end
= IMX_CS0_PHYS
+ SZ_32M
- 1,
96 .flags
= IORESOURCE_MEM
,
99 static struct platform_device flash_device
= {
100 .name
= "physmap-flash",
102 .resource
= &flash_resource
,
109 static void __init
mx1ads_init(void)
112 mxc_register_device(&imx_uart1_device
, &uart_pdata
[0]);
113 mxc_register_device(&imx_uart2_device
, &uart_pdata
[1]);
116 mxc_register_device(&flash_device
, &mx1ads_flash_data
);
119 static void __init
mx1ads_timer_init(void)
121 mxc_clocks_init(32000);
122 mxc_timer_init("gpt_clk");
125 struct sys_timer mx1ads_timer
= {
126 .init
= mx1ads_timer_init
,
129 MACHINE_START(MX1ADS
, "Freescale MX1ADS")
130 /* Maintainer: Sascha Hauer, Pengutronix */
131 .phys_io
= IMX_IO_PHYS
,
132 .io_pg_offst
= (IMX_IO_BASE
>> 18) & 0xfffc,
133 .boot_params
= PHYS_OFFSET
+ 0x100,
134 .map_io
= mxc_map_io
,
135 .init_irq
= mxc_init_irq
,
136 .timer
= &mx1ads_timer
,
137 .init_machine
= mx1ads_init
,
140 MACHINE_START(MXLADS
, "Freescale MXLADS")
141 .phys_io
= IMX_IO_PHYS
,
142 .io_pg_offst
= (IMX_IO_BASE
>> 18) & 0xfffc,
143 .boot_params
= PHYS_OFFSET
+ 0x100,
144 .map_io
= mxc_map_io
,
145 .init_irq
= mxc_init_irq
,
146 .timer
= &mx1ads_timer
,
147 .init_machine
= mx1ads_init
,