Path: blob/master/arch/arm/mach-ixp4xx/gateway7001-setup.c
10817 views
/*1* arch/arm/mach-ixp4xx/gateway7001-setup.c2*3* Board setup for the Gateway 7001 board4*5* Copyright (C) 2007 Imre Kaloz <[email protected]>6*7* based on coyote-setup.c:8* Copyright (C) 2003-2005 MontaVista Software, Inc.9*10* Author: Imre Kaloz <[email protected]>11*/1213#include <linux/kernel.h>14#include <linux/init.h>15#include <linux/device.h>16#include <linux/serial.h>17#include <linux/tty.h>18#include <linux/serial_8250.h>1920#include <asm/types.h>21#include <asm/setup.h>22#include <asm/memory.h>23#include <mach/hardware.h>24#include <asm/irq.h>25#include <asm/mach-types.h>26#include <asm/mach/arch.h>27#include <asm/mach/flash.h>2829static struct flash_platform_data gateway7001_flash_data = {30.map_name = "cfi_probe",31.width = 2,32};3334static struct resource gateway7001_flash_resource = {35.flags = IORESOURCE_MEM,36};3738static struct platform_device gateway7001_flash = {39.name = "IXP4XX-Flash",40.id = 0,41.dev = {42.platform_data = &gateway7001_flash_data,43},44.num_resources = 1,45.resource = &gateway7001_flash_resource,46};4748static struct resource gateway7001_uart_resource = {49.start = IXP4XX_UART2_BASE_PHYS,50.end = IXP4XX_UART2_BASE_PHYS + 0x0fff,51.flags = IORESOURCE_MEM,52};5354static struct plat_serial8250_port gateway7001_uart_data[] = {55{56.mapbase = IXP4XX_UART2_BASE_PHYS,57.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,58.irq = IRQ_IXP4XX_UART2,59.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,60.iotype = UPIO_MEM,61.regshift = 2,62.uartclk = IXP4XX_UART_XTAL,63},64{ },65};6667static struct platform_device gateway7001_uart = {68.name = "serial8250",69.id = PLAT8250_DEV_PLATFORM,70.dev = {71.platform_data = gateway7001_uart_data,72},73.num_resources = 1,74.resource = &gateway7001_uart_resource,75};7677static struct platform_device *gateway7001_devices[] __initdata = {78&gateway7001_flash,79&gateway7001_uart80};8182static void __init gateway7001_init(void)83{84ixp4xx_sys_init();8586gateway7001_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);87gateway7001_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;8889*IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;90*IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;9192platform_add_devices(gateway7001_devices, ARRAY_SIZE(gateway7001_devices));93}9495#ifdef CONFIG_MACH_GATEWAY700196MACHINE_START(GATEWAY7001, "Gateway 7001 AP")97/* Maintainer: Imre Kaloz <[email protected]> */98.map_io = ixp4xx_map_io,99.init_irq = ixp4xx_init_irq,100.timer = &ixp4xx_timer,101.boot_params = 0x0100,102.init_machine = gateway7001_init,103MACHINE_END104#endif105106107