2 * arch/arm/mach-ixp4xx/coyote-setup.c
4 * Board setup for ADI Engineering and IXDGP425 boards
6 * Copyright (C) 2003-2005 MontaVista Software, Inc.
8 * Author: Deepak Saxena <dsaxena@plexity.net>
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/device.h>
14 #include <linux/serial.h>
15 #include <linux/tty.h>
16 #include <linux/serial_8250.h>
18 #include <asm/types.h>
19 #include <asm/setup.h>
20 #include <asm/memory.h>
21 #include <mach/hardware.h>
23 #include <asm/mach-types.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/flash.h>
27 #define COYOTE_IDE_BASE_PHYS IXP4XX_EXP_BUS_BASE(3)
28 #define COYOTE_IDE_BASE_VIRT 0xFFFE1000
29 #define COYOTE_IDE_REGION_SIZE 0x1000
31 #define COYOTE_IDE_DATA_PORT 0xFFFE10E0
32 #define COYOTE_IDE_CTRL_PORT 0xFFFE10FC
33 #define COYOTE_IDE_ERROR_PORT 0xFFFE10E2
34 #define IRQ_COYOTE_IDE IRQ_IXP4XX_GPIO5
36 static struct flash_platform_data coyote_flash_data
= {
37 .map_name
= "cfi_probe",
41 static struct resource coyote_flash_resource
= {
42 .flags
= IORESOURCE_MEM
,
45 static struct platform_device coyote_flash
= {
46 .name
= "IXP4XX-Flash",
49 .platform_data
= &coyote_flash_data
,
52 .resource
= &coyote_flash_resource
,
55 static struct resource coyote_uart_resource
= {
56 .start
= IXP4XX_UART2_BASE_PHYS
,
57 .end
= IXP4XX_UART2_BASE_PHYS
+ 0x0fff,
58 .flags
= IORESOURCE_MEM
,
61 static struct plat_serial8250_port coyote_uart_data
[] = {
63 .mapbase
= IXP4XX_UART2_BASE_PHYS
,
64 .membase
= (char *)IXP4XX_UART2_BASE_VIRT
+ REG_OFFSET
,
65 .irq
= IRQ_IXP4XX_UART2
,
66 .flags
= UPF_BOOT_AUTOCONF
| UPF_SKIP_TEST
,
69 .uartclk
= IXP4XX_UART_XTAL
,
74 static struct platform_device coyote_uart
= {
76 .id
= PLAT8250_DEV_PLATFORM
,
78 .platform_data
= coyote_uart_data
,
81 .resource
= &coyote_uart_resource
,
84 static struct platform_device
*coyote_devices
[] __initdata
= {
89 static void __init
coyote_init(void)
93 coyote_flash_resource
.start
= IXP4XX_EXP_BUS_BASE(0);
94 coyote_flash_resource
.end
= IXP4XX_EXP_BUS_BASE(0) + SZ_32M
- 1;
96 *IXP4XX_EXP_CS0
|= IXP4XX_FLASH_WRITABLE
;
97 *IXP4XX_EXP_CS1
= *IXP4XX_EXP_CS0
;
99 if (machine_is_ixdpg425()) {
100 coyote_uart_data
[0].membase
=
101 (char*)(IXP4XX_UART1_BASE_VIRT
+ REG_OFFSET
);
102 coyote_uart_data
[0].mapbase
= IXP4XX_UART1_BASE_PHYS
;
103 coyote_uart_data
[0].irq
= IRQ_IXP4XX_UART1
;
106 platform_add_devices(coyote_devices
, ARRAY_SIZE(coyote_devices
));
109 #ifdef CONFIG_ARCH_ADI_COYOTE
110 MACHINE_START(ADI_COYOTE
, "ADI Engineering Coyote")
111 /* Maintainer: MontaVista Software, Inc. */
112 .map_io
= ixp4xx_map_io
,
113 .init_irq
= ixp4xx_init_irq
,
114 .timer
= &ixp4xx_timer
,
115 .atag_offset
= 0x100,
116 .init_machine
= coyote_init
,
117 #if defined(CONFIG_PCI)
118 .dma_zone_size
= SZ_64M
,
124 * IXDPG425 is identical to Coyote except for which serial port
127 #ifdef CONFIG_MACH_IXDPG425
128 MACHINE_START(IXDPG425
, "Intel IXDPG425")
129 /* Maintainer: MontaVista Software, Inc. */
130 .map_io
= ixp4xx_map_io
,
131 .init_irq
= ixp4xx_init_irq
,
132 .timer
= &ixp4xx_timer
,
133 .atag_offset
= 0x100,
134 .init_machine
= coyote_init
,