blob: 69cfb9935fc1cf15ca7b8490fcc1e9e5fe2932a5 [file] [log] [blame]
Andrew Victor9bf77ee2007-05-11 21:14:53 +01001/*
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 */
Russell King2f8163b2011-07-26 10:53:52 +01008#include <linux/gpio.h>
Andrew Victor9bf77ee2007-05-11 21:14:53 +01009#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
Linus Walleije24e4492011-08-22 08:37:38 +010021#include <mach/gpio-ks8695.h>
Arnd Bergmannd8b28232015-01-30 10:45:33 +010022#include "devices.h"
Andrew Victor9bf77ee2007-05-11 21:14:53 +010023
24#include "generic.h"
25
26#ifdef CONFIG_PCI
Ralf Baechled5341942011-06-10 15:30:21 +010027static int micrel_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
Andrew Victor9bf77ee2007-05-11 21:14:53 +010028{
29 return KS8695_IRQ_EXTERN0;
30}
31
Andrew Victordaa71622007-08-13 10:02:18 +010032static struct ks8695_pci_cfg __initdata micrel_pci = {
Andrew Victor9bf77ee2007-05-11 21:14:53 +010033 .mode = KS8695_MODE_MINIPCI,
34 .map_irq = micrel_pci_map_irq,
35};
36#endif
37
38
Andrew Victordaa71622007-08-13 10:02:18 +010039static void __init micrel_init(void)
Andrew Victor9bf77ee2007-05-11 21:14:53 +010040{
41 printk(KERN_INFO "Micrel KS8695 Development Board initializing\n");
42
Daniel Silverstone72880ad2008-12-13 20:44:12 +000043 ks8695_register_gpios();
44
Andrew Victor9bf77ee2007-05-11 21:14:53 +010045#ifdef CONFIG_PCI
Andrew Victor7d77ce82007-10-15 13:09:19 +010046 ks8695_init_pci(&micrel_pci);
Andrew Victor9bf77ee2007-05-11 21:14:53 +010047#endif
48
49 /* Add devices */
50 ks8695_add_device_wan(); /* eth0 = WAN */
51 ks8695_add_device_lan(); /* eth1 = LAN */
52}
53
54MACHINE_START(KS8695, "KS8695 Centaur Development Board")
55 /* Maintainer: Micrel Semiconductor Inc. */
Nicolas Pitre0318ce92011-07-05 22:38:13 -040056 .atag_offset = 0x100,
Andrew Victor9bf77ee2007-05-11 21:14:53 +010057 .map_io = ks8695_map_io,
58 .init_irq = ks8695_init_irq,
59 .init_machine = micrel_init,
Stephen Warren6bb27d72012-11-08 12:40:59 -070060 .init_time = ks8695_timer_init,
Russell King114c19b2011-11-11 15:30:47 +000061 .restart = ks8695_restart,
Andrew Victor9bf77ee2007-05-11 21:14:53 +010062MACHINE_END