Path: blob/master/arch/arm/mach-ixp4xx/coyote-setup.c
10817 views
/*1* arch/arm/mach-ixp4xx/coyote-setup.c2*3* Board setup for ADI Engineering and IXDGP425 boards4*5* Copyright (C) 2003-2005 MontaVista Software, Inc.6*7* Author: Deepak Saxena <[email protected]>8*/910#include <linux/kernel.h>11#include <linux/init.h>12#include <linux/device.h>13#include <linux/serial.h>14#include <linux/tty.h>15#include <linux/serial_8250.h>1617#include <asm/types.h>18#include <asm/setup.h>19#include <asm/memory.h>20#include <mach/hardware.h>21#include <asm/irq.h>22#include <asm/mach-types.h>23#include <asm/mach/arch.h>24#include <asm/mach/flash.h>2526#define COYOTE_IDE_BASE_PHYS IXP4XX_EXP_BUS_BASE(3)27#define COYOTE_IDE_BASE_VIRT 0xFFFE100028#define COYOTE_IDE_REGION_SIZE 0x10002930#define COYOTE_IDE_DATA_PORT 0xFFFE10E031#define COYOTE_IDE_CTRL_PORT 0xFFFE10FC32#define COYOTE_IDE_ERROR_PORT 0xFFFE10E233#define IRQ_COYOTE_IDE IRQ_IXP4XX_GPIO53435static struct flash_platform_data coyote_flash_data = {36.map_name = "cfi_probe",37.width = 2,38};3940static struct resource coyote_flash_resource = {41.flags = IORESOURCE_MEM,42};4344static struct platform_device coyote_flash = {45.name = "IXP4XX-Flash",46.id = 0,47.dev = {48.platform_data = &coyote_flash_data,49},50.num_resources = 1,51.resource = &coyote_flash_resource,52};5354static struct resource coyote_uart_resource = {55.start = IXP4XX_UART2_BASE_PHYS,56.end = IXP4XX_UART2_BASE_PHYS + 0x0fff,57.flags = IORESOURCE_MEM,58};5960static struct plat_serial8250_port coyote_uart_data[] = {61{62.mapbase = IXP4XX_UART2_BASE_PHYS,63.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,64.irq = IRQ_IXP4XX_UART2,65.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,66.iotype = UPIO_MEM,67.regshift = 2,68.uartclk = IXP4XX_UART_XTAL,69},70{ },71};7273static struct platform_device coyote_uart = {74.name = "serial8250",75.id = PLAT8250_DEV_PLATFORM,76.dev = {77.platform_data = coyote_uart_data,78},79.num_resources = 1,80.resource = &coyote_uart_resource,81};8283static struct platform_device *coyote_devices[] __initdata = {84&coyote_flash,85&coyote_uart86};8788static void __init coyote_init(void)89{90ixp4xx_sys_init();9192coyote_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);93coyote_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;9495*IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;96*IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;9798if (machine_is_ixdpg425()) {99coyote_uart_data[0].membase =100(char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET);101coyote_uart_data[0].mapbase = IXP4XX_UART1_BASE_PHYS;102coyote_uart_data[0].irq = IRQ_IXP4XX_UART1;103}104105platform_add_devices(coyote_devices, ARRAY_SIZE(coyote_devices));106}107108#ifdef CONFIG_ARCH_ADI_COYOTE109MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")110/* Maintainer: MontaVista Software, Inc. */111.map_io = ixp4xx_map_io,112.init_irq = ixp4xx_init_irq,113.timer = &ixp4xx_timer,114.boot_params = 0x0100,115.init_machine = coyote_init,116MACHINE_END117#endif118119/*120* IXDPG425 is identical to Coyote except for which serial port121* is connected.122*/123#ifdef CONFIG_MACH_IXDPG425124MACHINE_START(IXDPG425, "Intel IXDPG425")125/* Maintainer: MontaVista Software, Inc. */126.map_io = ixp4xx_map_io,127.init_irq = ixp4xx_init_irq,128.timer = &ixp4xx_timer,129.boot_params = 0x0100,130.init_machine = coyote_init,131MACHINE_END132#endif133134135136