blob: bf8856ce3fbb600ed975a39d2773c97db3456152 [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001// SPDX-License-Identifier: GPL-2.0-only
Andrew Victor9bf77ee2007-05-11 21:14:53 +01002/*
3 * arch/arm/mach-ks8695/board-micrel.c
Andrew Victor9bf77ee2007-05-11 21:14:53 +01004 */
Russell King2f8163b2011-07-26 10:53:52 +01005#include <linux/gpio.h>
Andrew Victor9bf77ee2007-05-11 21:14:53 +01006#include <linux/kernel.h>
7#include <linux/types.h>
8#include <linux/interrupt.h>
9#include <linux/init.h>
10#include <linux/platform_device.h>
11
12#include <asm/mach-types.h>
13
14#include <asm/mach/arch.h>
15#include <asm/mach/map.h>
16#include <asm/mach/irq.h>
17
Linus Walleije24e4492011-08-22 08:37:38 +010018#include <mach/gpio-ks8695.h>
Arnd Bergmannd8b28232015-01-30 10:45:33 +010019#include "devices.h"
Andrew Victor9bf77ee2007-05-11 21:14:53 +010020
21#include "generic.h"
22
23#ifdef CONFIG_PCI
Ralf Baechled5341942011-06-10 15:30:21 +010024static int micrel_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
Andrew Victor9bf77ee2007-05-11 21:14:53 +010025{
26 return KS8695_IRQ_EXTERN0;
27}
28
Andrew Victordaa71622007-08-13 10:02:18 +010029static struct ks8695_pci_cfg __initdata micrel_pci = {
Andrew Victor9bf77ee2007-05-11 21:14:53 +010030 .mode = KS8695_MODE_MINIPCI,
31 .map_irq = micrel_pci_map_irq,
32};
33#endif
34
35
Andrew Victordaa71622007-08-13 10:02:18 +010036static void __init micrel_init(void)
Andrew Victor9bf77ee2007-05-11 21:14:53 +010037{
38 printk(KERN_INFO "Micrel KS8695 Development Board initializing\n");
39
Daniel Silverstone72880ad2008-12-13 20:44:12 +000040 ks8695_register_gpios();
41
Andrew Victor9bf77ee2007-05-11 21:14:53 +010042#ifdef CONFIG_PCI
Andrew Victor7d77ce82007-10-15 13:09:19 +010043 ks8695_init_pci(&micrel_pci);
Andrew Victor9bf77ee2007-05-11 21:14:53 +010044#endif
45
46 /* Add devices */
47 ks8695_add_device_wan(); /* eth0 = WAN */
48 ks8695_add_device_lan(); /* eth1 = LAN */
49}
50
51MACHINE_START(KS8695, "KS8695 Centaur Development Board")
52 /* Maintainer: Micrel Semiconductor Inc. */
Nicolas Pitre0318ce92011-07-05 22:38:13 -040053 .atag_offset = 0x100,
Andrew Victor9bf77ee2007-05-11 21:14:53 +010054 .map_io = ks8695_map_io,
55 .init_irq = ks8695_init_irq,
56 .init_machine = micrel_init,
Stephen Warren6bb27d72012-11-08 12:40:59 -070057 .init_time = ks8695_timer_init,
Russell King114c19b2011-11-11 15:30:47 +000058 .restart = ks8695_restart,
Andrew Victor9bf77ee2007-05-11 21:14:53 +010059MACHINE_END