board-micrel.c 1.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/*
 * 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.
 */

#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>

21
#include <mach/gpio.h>
22
#include <mach/devices.h>
23 24 25 26

#include "generic.h"

#ifdef CONFIG_PCI
27
static int micrel_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
28 29 30 31
{
	return KS8695_IRQ_EXTERN0;
}

32
static struct ks8695_pci_cfg __initdata micrel_pci = {
33 34 35 36 37 38
	.mode		= KS8695_MODE_MINIPCI,
	.map_irq	= micrel_pci_map_irq,
};
#endif


39
static void __init micrel_init(void)
40 41 42
{
	printk(KERN_INFO "Micrel KS8695 Development Board initializing\n");

43 44
	ks8695_register_gpios();

45
#ifdef CONFIG_PCI
46
	ks8695_init_pci(&micrel_pci);
47 48 49 50 51 52 53 54 55
#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. */
56
	.atag_offset	= 0x100,
57 58 59 60 61
	.map_io		= ks8695_map_io,
	.init_irq	= ks8695_init_irq,
	.init_machine	= micrel_init,
	.timer		= &ks8695_timer,
MACHINE_END