| 
									
										
										
										
											2007-05-11 21:14:53 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * arch/arm/mach-ks8695/board-micrel.c | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software; you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU General Public License version 2 as | 
					
						
							|  |  |  |  * published by the Free Software Foundation. | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2011-07-26 10:53:52 +01:00
										 |  |  | #include <linux/gpio.h>
 | 
					
						
							| 
									
										
										
										
											2007-05-11 21:14:53 +01:00
										 |  |  | #include <linux/kernel.h>
 | 
					
						
							|  |  |  | #include <linux/types.h>
 | 
					
						
							|  |  |  | #include <linux/interrupt.h>
 | 
					
						
							|  |  |  | #include <linux/init.h>
 | 
					
						
							|  |  |  | #include <linux/platform_device.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <asm/mach-types.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <asm/mach/arch.h>
 | 
					
						
							|  |  |  | #include <asm/mach/map.h>
 | 
					
						
							|  |  |  | #include <asm/mach/irq.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-08-22 08:37:38 +01:00
										 |  |  | #include <mach/gpio-ks8695.h>
 | 
					
						
							| 
									
										
										
										
											2008-08-05 16:14:15 +01:00
										 |  |  | #include <mach/devices.h>
 | 
					
						
							| 
									
										
										
										
											2007-05-11 21:14:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include "generic.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifdef CONFIG_PCI
 | 
					
						
							| 
									
										
										
										
											2011-06-10 15:30:21 +01:00
										 |  |  | static int micrel_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 
					
						
							| 
									
										
										
										
											2007-05-11 21:14:53 +01:00
										 |  |  | { | 
					
						
							|  |  |  | 	return KS8695_IRQ_EXTERN0; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-08-13 10:02:18 +01:00
										 |  |  | static struct ks8695_pci_cfg __initdata micrel_pci = { | 
					
						
							| 
									
										
										
										
											2007-05-11 21:14:53 +01:00
										 |  |  | 	.mode		= KS8695_MODE_MINIPCI, | 
					
						
							|  |  |  | 	.map_irq	= micrel_pci_map_irq, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-08-13 10:02:18 +01:00
										 |  |  | static void __init micrel_init(void) | 
					
						
							| 
									
										
										
										
											2007-05-11 21:14:53 +01:00
										 |  |  | { | 
					
						
							|  |  |  | 	printk(KERN_INFO "Micrel KS8695 Development Board initializing\n"); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-12-13 20:44:12 +00:00
										 |  |  | 	ks8695_register_gpios(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-05-11 21:14:53 +01:00
										 |  |  | #ifdef CONFIG_PCI
 | 
					
						
							| 
									
										
										
										
											2007-10-15 13:09:19 +01:00
										 |  |  | 	ks8695_init_pci(&micrel_pci); | 
					
						
							| 
									
										
										
										
											2007-05-11 21:14:53 +01:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* Add devices */ | 
					
						
							|  |  |  | 	ks8695_add_device_wan();	/* eth0 = WAN */ | 
					
						
							|  |  |  | 	ks8695_add_device_lan();	/* eth1 = LAN */ | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MACHINE_START(KS8695, "KS8695 Centaur Development Board") | 
					
						
							|  |  |  | 	/* Maintainer: Micrel Semiconductor Inc. */ | 
					
						
							| 
									
										
										
										
											2011-07-05 22:38:13 -04:00
										 |  |  | 	.atag_offset	= 0x100, | 
					
						
							| 
									
										
										
										
											2007-05-11 21:14:53 +01:00
										 |  |  | 	.map_io		= ks8695_map_io, | 
					
						
							|  |  |  | 	.init_irq	= ks8695_init_irq, | 
					
						
							|  |  |  | 	.init_machine	= micrel_init, | 
					
						
							| 
									
										
										
										
											2012-11-08 12:40:59 -07:00
										 |  |  | 	.init_time	= ks8695_timer_init, | 
					
						
							| 
									
										
										
										
											2011-11-11 15:30:47 +00:00
										 |  |  | 	.restart	= ks8695_restart, | 
					
						
							| 
									
										
										
										
											2007-05-11 21:14:53 +01:00
										 |  |  | MACHINE_END |