Path: blob/master/arch/arm/mach-h720x/h7202-eval.c
10817 views
/*1* linux/arch/arm/mach-h720x/h7202-eval.c2*3* Copyright (C) 2003 Thomas Gleixner <[email protected]>4* 2003 Robert Schwebel <[email protected]>5* 2004 Sascha Hauer <[email protected]>6*7* Architecture specific stuff for Hynix HMS30C7202 development board8*9* This program is free software; you can redistribute it and/or modify10* it under the terms of the GNU General Public License version 2 as11* published by the Free Software Foundation.12*13*/1415#include <linux/init.h>16#include <linux/kernel.h>17#include <linux/types.h>18#include <linux/string.h>19#include <linux/platform_device.h>2021#include <asm/setup.h>22#include <asm/types.h>23#include <asm/mach-types.h>24#include <asm/page.h>25#include <asm/mach/arch.h>26#include <mach/irqs.h>27#include <mach/hardware.h>28#include "common.h"2930static struct resource cirrus_resources[] = {31[0] = {32.start = ETH0_PHYS + 0x300,33.end = ETH0_PHYS + 0x300 + 0x10,34.flags = IORESOURCE_MEM,35},36[1] = {37.start = IRQ_CHAINED_GPIOB(8),38.end = IRQ_CHAINED_GPIOB(8),39.flags = IORESOURCE_IRQ,40},41};4243static struct platform_device cirrus_device = {44.name = "cirrus-cs89x0",45.id = -1,46.num_resources = ARRAY_SIZE(cirrus_resources),47.resource = cirrus_resources,48};4950static struct platform_device *devices[] __initdata = {51&cirrus_device,52};5354/*55* Hardware init. This is called early in initcalls56* Place pin inits here. So you avoid adding ugly57* #ifdef stuff to common drivers.58* Use this only, if your bootloader is not able59* to initialize the pins proper.60*/61static void __init init_eval_h7202(void)62{63init_hw_h7202();64(void) platform_add_devices(devices, ARRAY_SIZE(devices));6566/* Enable interrupt on portb bit 8 (ethernet) */67CPU_REG (GPIO_B_VIRT, GPIO_POL) &= ~(1 << 8);68CPU_REG (GPIO_B_VIRT, GPIO_EN) |= (1 << 8);69}7071MACHINE_START(H7202, "Hynix HMS30C7202")72/* Maintainer: Robert Schwebel, Pengutronix */73.boot_params = 0x40000100,74.map_io = h720x_map_io,75.init_irq = h7202_init_irq,76.timer = &h7202_timer,77.init_machine = init_eval_h7202,78MACHINE_END798081