Andrew Victor | 9bf77ee | 2007-05-11 21:14:53 +0100 | [diff] [blame] | 1 | /* |
| 2 | * arch/arm/mach-ks8695/board-micrel.c |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | */ |
| 8 | |
| 9 | #include <linux/kernel.h> |
| 10 | #include <linux/types.h> |
| 11 | #include <linux/interrupt.h> |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/platform_device.h> |
| 14 | |
| 15 | #include <asm/mach-types.h> |
| 16 | |
| 17 | #include <asm/mach/arch.h> |
| 18 | #include <asm/mach/map.h> |
| 19 | #include <asm/mach/irq.h> |
| 20 | |
Daniel Silverstone | 72880ad | 2008-12-13 20:44:12 +0000 | [diff] [blame] | 21 | #include <mach/gpio.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 22 | #include <mach/devices.h> |
Andrew Victor | 9bf77ee | 2007-05-11 21:14:53 +0100 | [diff] [blame] | 23 | |
| 24 | #include "generic.h" |
| 25 | |
| 26 | #ifdef CONFIG_PCI |
Andrew Victor | daa7162 | 2007-08-13 10:02:18 +0100 | [diff] [blame] | 27 | static int micrel_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
Andrew Victor | 9bf77ee | 2007-05-11 21:14:53 +0100 | [diff] [blame] | 28 | { |
| 29 | return KS8695_IRQ_EXTERN0; |
| 30 | } |
| 31 | |
Andrew Victor | daa7162 | 2007-08-13 10:02:18 +0100 | [diff] [blame] | 32 | static struct ks8695_pci_cfg __initdata micrel_pci = { |
Andrew Victor | 9bf77ee | 2007-05-11 21:14:53 +0100 | [diff] [blame] | 33 | .mode = KS8695_MODE_MINIPCI, |
| 34 | .map_irq = micrel_pci_map_irq, |
| 35 | }; |
| 36 | #endif |
| 37 | |
| 38 | |
Andrew Victor | daa7162 | 2007-08-13 10:02:18 +0100 | [diff] [blame] | 39 | static void __init micrel_init(void) |
Andrew Victor | 9bf77ee | 2007-05-11 21:14:53 +0100 | [diff] [blame] | 40 | { |
| 41 | printk(KERN_INFO "Micrel KS8695 Development Board initializing\n"); |
| 42 | |
Daniel Silverstone | 72880ad | 2008-12-13 20:44:12 +0000 | [diff] [blame] | 43 | ks8695_register_gpios(); |
| 44 | |
Andrew Victor | 9bf77ee | 2007-05-11 21:14:53 +0100 | [diff] [blame] | 45 | #ifdef CONFIG_PCI |
Andrew Victor | 7d77ce8 | 2007-10-15 13:09:19 +0100 | [diff] [blame] | 46 | ks8695_init_pci(&micrel_pci); |
Andrew Victor | 9bf77ee | 2007-05-11 21:14:53 +0100 | [diff] [blame] | 47 | #endif |
| 48 | |
| 49 | /* Add devices */ |
| 50 | ks8695_add_device_wan(); /* eth0 = WAN */ |
| 51 | ks8695_add_device_lan(); /* eth1 = LAN */ |
| 52 | } |
| 53 | |
| 54 | MACHINE_START(KS8695, "KS8695 Centaur Development Board") |
| 55 | /* Maintainer: Micrel Semiconductor Inc. */ |
Andrew Victor | 9bf77ee | 2007-05-11 21:14:53 +0100 | [diff] [blame] | 56 | .boot_params = KS8695_SDRAM_PA + 0x100, |
| 57 | .map_io = ks8695_map_io, |
| 58 | .init_irq = ks8695_init_irq, |
| 59 | .init_machine = micrel_init, |
| 60 | .timer = &ks8695_timer, |
| 61 | MACHINE_END |