| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | #include <linux/init.h> | 
 | 17 | #include <linux/kernel.h> | 
 | 18 | #include <linux/types.h> | 
 | 19 | #include <linux/string.h> | 
| Russell King | d052d1b | 2005-10-29 19:07:23 +0100 | [diff] [blame] | 20 | #include <linux/platform_device.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 |  | 
 | 22 | #include <asm/setup.h> | 
 | 23 | #include <asm/types.h> | 
 | 24 | #include <asm/mach-types.h> | 
 | 25 | #include <asm/page.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | #include <asm/mach/arch.h> | 
| Russell King | 80b02c1 | 2009-01-08 10:01:47 +0000 | [diff] [blame] | 27 | #include <mach/irqs.h> | 
| Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 28 | #include <mach/hardware.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | #include "common.h" | 
 | 30 |  | 
 | 31 | static struct resource cirrus_resources[] = { | 
 | 32 | 	[0] = { | 
 | 33 | 		.start	= ETH0_PHYS + 0x300, | 
 | 34 | 		.end	= ETH0_PHYS + 0x300 + 0x10, | 
 | 35 | 		.flags	= IORESOURCE_MEM, | 
 | 36 | 	}, | 
 | 37 | 	[1] = { | 
 | 38 | 		.start	= IRQ_CHAINED_GPIOB(8), | 
 | 39 | 		.end	= IRQ_CHAINED_GPIOB(8), | 
 | 40 | 		.flags	= IORESOURCE_IRQ, | 
 | 41 | 	}, | 
 | 42 | }; | 
 | 43 |  | 
 | 44 | static struct platform_device cirrus_device = { | 
 | 45 | 	.name		= "cirrus-cs89x0", | 
 | 46 | 	.id		= -1, | 
 | 47 | 	.num_resources	= ARRAY_SIZE(cirrus_resources), | 
 | 48 | 	.resource	= cirrus_resources, | 
 | 49 | }; | 
 | 50 |  | 
 | 51 | static struct platform_device *devices[] __initdata = { | 
 | 52 | 	&cirrus_device, | 
 | 53 | }; | 
 | 54 |  | 
 | 55 | /* | 
 | 56 |  * Hardware init. This is called early in initcalls | 
 | 57 |  * Place pin inits here. So you avoid adding ugly | 
 | 58 |  * #ifdef stuff to common drivers. | 
 | 59 |  * Use this only, if your bootloader is not able | 
 | 60 |  * to initialize the pins proper. | 
 | 61 |  */ | 
 | 62 | static void __init init_eval_h7202(void) | 
 | 63 | { | 
 | 64 | 	init_hw_h7202(); | 
 | 65 | 	(void) platform_add_devices(devices, ARRAY_SIZE(devices)); | 
 | 66 |  | 
 | 67 | 	/* Enable interrupt on portb bit 8 (ethernet) */ | 
 | 68 | 	CPU_REG (GPIO_B_VIRT, GPIO_POL) &= ~(1 << 8); | 
 | 69 | 	CPU_REG (GPIO_B_VIRT, GPIO_EN) |= (1 << 8); | 
 | 70 | } | 
 | 71 |  | 
 | 72 | MACHINE_START(H7202, "Hynix HMS30C7202") | 
| Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 73 | 	/* Maintainer: Robert Schwebel, Pengutronix */ | 
| Nicolas Pitre | 3746f02 | 2011-07-05 22:38:12 -0400 | [diff] [blame] | 74 | 	.atag_offset	= 0x100, | 
| Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 75 | 	.map_io		= h720x_map_io, | 
 | 76 | 	.init_irq	= h7202_init_irq, | 
 | 77 | 	.timer		= &h7202_timer, | 
 | 78 | 	.init_machine	= init_eval_h7202, | 
| Nicolas Pitre | 5065c71 | 2011-07-05 22:28:08 -0400 | [diff] [blame] | 79 | 	.dma_zone_size	= SZ_256M, | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 80 | MACHINE_END |