This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / arch / arm / mach-h720x / h7202-eval.c
1 /*
2  * linux/arch/arm/mach-h720x/h7202-eval.c
3  *
4  * Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
5  *               2003 Robert Schwebel <r.schwebel@pengutronix.de>
6  *               2004 Sascha Hauer <s.hauer@pengutronix.de>
7  *
8  * Architecture specific stuff for Hynix HMS30C7202 development board
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2 as
12  * published by the Free Software Foundation.
13  *
14  */
15
16 #include <linux/config.h>
17 #include <linux/init.h>
18 #include <linux/kernel.h>
19 #include <linux/types.h>
20 #include <linux/string.h>
21 #include <linux/device.h>
22
23 #include <asm/setup.h>
24 #include <asm/types.h>
25 #include <asm/mach-types.h>
26 #include <asm/page.h>
27 #include <asm/pgtable.h>
28 #include <asm/mach/arch.h>
29 #include <asm/hardware.h>
30
31 extern void __init init_hw_h7202(void);
32 extern void __init h7202_init_irq (void);
33 extern void __init h7202_init_time(void);
34 extern void __init h720x_map_io(void);
35
36 static struct resource cirrus_resources[] = {
37         [0] = {
38                 .start  = ETH0_PHYS + 0x300,
39                 .end    = ETH0_PHYS + 0x300 + 0x10,
40                 .flags  = IORESOURCE_MEM,
41         },
42         [1] = {
43                 .start  = IRQ_CHAINED_GPIOB(8),
44                 .end    = IRQ_CHAINED_GPIOB(8),
45                 .flags  = IORESOURCE_IRQ,
46         },
47 };
48
49 static struct platform_device cirrus_device = {
50         .name           = "cirrus-cs89x0",
51         .id             = -1,
52         .num_resources  = ARRAY_SIZE(cirrus_resources),
53         .resource       = cirrus_resources,
54 };
55
56 static struct platform_device *devices[] __initdata = {
57         &cirrus_device,
58 };
59
60 /*
61  * Hardware init. This is called early in initcalls
62  * Place pin inits here. So you avoid adding ugly
63  * #ifdef stuff to common drivers.
64  * Use this only, if your bootloader is not able
65  * to initialize the pins proper.
66  */
67 static void __init init_eval_h7202(void)
68 {
69         init_hw_h7202();
70         (void) platform_add_devices(devices, ARRAY_SIZE(devices));
71
72         /* Enable interrupt on portb bit 8 (ethernet) */
73         CPU_REG (GPIO_B_VIRT, GPIO_POL) &= ~(1 << 8);
74         CPU_REG (GPIO_B_VIRT, GPIO_EN) |= (1 << 8);
75 }
76
77 MACHINE_START(H7202, "Hynix HMS30C7202")
78         MAINTAINER("Robert Schwebel, Pengutronix")
79         BOOT_MEM(0x40000000, 0x80000000, 0xf0000000)
80         BOOT_PARAMS(0x40000100)
81         MAPIO(h720x_map_io)
82         INITIRQ(h7202_init_irq)
83         INITTIME(h7202_init_time)
84         INIT_MACHINE(init_eval_h7202)
85 MACHINE_END