Merge branch 'work.dcache2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / arch / arm / mach-ks8695 / board-micrel.c
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * arch/arm/mach-ks8695/board-micrel.c
4  */
5 #include <linux/gpio.h>
6 #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
18 #include <mach/gpio-ks8695.h>
19 #include "devices.h"
20
21 #include "generic.h"
22
23 #ifdef CONFIG_PCI
24 static int micrel_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
25 {
26         return KS8695_IRQ_EXTERN0;
27 }
28
29 static struct ks8695_pci_cfg __initdata micrel_pci = {
30         .mode           = KS8695_MODE_MINIPCI,
31         .map_irq        = micrel_pci_map_irq,
32 };
33 #endif
34
35
36 static void __init micrel_init(void)
37 {
38         printk(KERN_INFO "Micrel KS8695 Development Board initializing\n");
39
40         ks8695_register_gpios();
41
42 #ifdef CONFIG_PCI
43         ks8695_init_pci(&micrel_pci);
44 #endif
45
46         /* Add devices */
47         ks8695_add_device_wan();        /* eth0 = WAN */
48         ks8695_add_device_lan();        /* eth1 = LAN */
49 }
50
51 MACHINE_START(KS8695, "KS8695 Centaur Development Board")
52         /* Maintainer: Micrel Semiconductor Inc. */
53         .atag_offset    = 0x100,
54         .map_io         = ks8695_map_io,
55         .init_irq       = ks8695_init_irq,
56         .init_machine   = micrel_init,
57         .init_time      = ks8695_timer_init,
58         .restart        = ks8695_restart,
59 MACHINE_END