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/device.h>
16 #include <linux/init.h>
17 #include <linux/platform_device.h>
18 #include <asm/system.h>
19 #include <asm/hardware.h>
21 #include <asm/pgtable.h>
24 #include <asm/mach/map.h>
25 #include <asm/mach-types.h>
27 #include <asm/mach/arch.h>
28 #include <asm/arch/mmc.h>
29 #include <asm/arch/imx-uart.h>
30 #include <linux/interrupt.h>
33 static struct resource cs89x0_resources
[] = {
35 .start
= IMX_CS4_PHYS
+ 0x300,
36 .end
= IMX_CS4_PHYS
+ 0x300 + 16,
37 .flags
= IORESOURCE_MEM
,
40 .start
= IRQ_GPIOC(17),
42 .flags
= IORESOURCE_IRQ
,
46 static struct platform_device cs89x0_device
= {
47 .name
= "cirrus-cs89x0",
48 .num_resources
= ARRAY_SIZE(cs89x0_resources
),
49 .resource
= cs89x0_resources
,
52 static struct imxuart_platform_data uart_pdata
= {
53 .flags
= IMXUART_HAVE_RTSCTS
,
56 static struct resource imx_uart1_resources
[] = {
60 .flags
= IORESOURCE_MEM
,
63 .start
= (UART1_MINT_RX
),
64 .end
= (UART1_MINT_RX
),
65 .flags
= IORESOURCE_IRQ
,
68 .start
= (UART1_MINT_TX
),
69 .end
= (UART1_MINT_TX
),
70 .flags
= IORESOURCE_IRQ
,
74 static struct platform_device imx_uart1_device
= {
77 .num_resources
= ARRAY_SIZE(imx_uart1_resources
),
78 .resource
= imx_uart1_resources
,
80 .platform_data
= &uart_pdata
,
84 static struct resource imx_uart2_resources
[] = {
88 .flags
= IORESOURCE_MEM
,
91 .start
= (UART2_MINT_RX
),
92 .end
= (UART2_MINT_RX
),
93 .flags
= IORESOURCE_IRQ
,
96 .start
= (UART2_MINT_TX
),
97 .end
= (UART2_MINT_TX
),
98 .flags
= IORESOURCE_IRQ
,
102 static struct platform_device imx_uart2_device
= {
105 .num_resources
= ARRAY_SIZE(imx_uart2_resources
),
106 .resource
= imx_uart2_resources
,
108 .platform_data
= &uart_pdata
,
112 static struct platform_device
*devices
[] __initdata
= {
118 #ifdef CONFIG_MMC_IMX
119 static int mx1ads_mmc_card_present(struct device
*dev
)
121 /* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */
122 return (SSR(1) & (1 << 20) ? 0 : 1);
125 static struct imxmmc_platform_data mx1ads_mmc_info
= {
126 .card_present
= mx1ads_mmc_card_present
,
134 imx_gpio_mode(GPIO_PORTA
| GPIO_OUT
| 2);
136 #ifdef CONFIG_MMC_IMX
137 /* SD/MMC card detect */
138 imx_gpio_mode(GPIO_PORTB
| GPIO_GIUS
| GPIO_IN
| 20);
139 imx_set_mmc_info(&mx1ads_mmc_info
);
142 imx_gpio_mode(PC9_PF_UART1_CTS
);
143 imx_gpio_mode(PC10_PF_UART1_RTS
);
144 imx_gpio_mode(PC11_PF_UART1_TXD
);
145 imx_gpio_mode(PC12_PF_UART1_RXD
);
147 imx_gpio_mode(PB28_PF_UART2_CTS
);
148 imx_gpio_mode(PB29_PF_UART2_RTS
);
149 imx_gpio_mode(PB30_PF_UART2_TXD
);
150 imx_gpio_mode(PB31_PF_UART2_RXD
);
152 platform_add_devices(devices
, ARRAY_SIZE(devices
));
161 MACHINE_START(MX1ADS
, "Motorola MX1ADS")
162 /* Maintainer: Sascha Hauer, Pengutronix */
163 .phys_io
= 0x00200000,
164 .io_pg_offst
= ((0xe0000000) >> 18) & 0xfffc,
165 .boot_params
= 0x08000100,
166 .map_io
= mx1ads_map_io
,
167 .init_irq
= imx_init_irq
,
169 .init_machine
= mx1ads_init
,