board-micrel.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #include <linux/gpio.h>
  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. #include <asm/mach-types.h>
  15. #include <asm/mach/arch.h>
  16. #include <asm/mach/map.h>
  17. #include <asm/mach/irq.h>
  18. #include <mach/gpio-ks8695.h>
  19. #include "devices.h"
  20. #include "generic.h"
  21. #ifdef CONFIG_PCI
  22. static int micrel_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
  23. {
  24. return KS8695_IRQ_EXTERN0;
  25. }
  26. static struct ks8695_pci_cfg __initdata micrel_pci = {
  27. .mode = KS8695_MODE_MINIPCI,
  28. .map_irq = micrel_pci_map_irq,
  29. };
  30. #endif
  31. static void __init micrel_init(void)
  32. {
  33. printk(KERN_INFO "Micrel KS8695 Development Board initializing\n");
  34. ks8695_register_gpios();
  35. #ifdef CONFIG_PCI
  36. ks8695_init_pci(&micrel_pci);
  37. #endif
  38. /* Add devices */
  39. ks8695_add_device_wan(); /* eth0 = WAN */
  40. ks8695_add_device_lan(); /* eth1 = LAN */
  41. }
  42. MACHINE_START(KS8695, "KS8695 Centaur Development Board")
  43. /* Maintainer: Micrel Semiconductor Inc. */
  44. .atag_offset = 0x100,
  45. .map_io = ks8695_map_io,
  46. .init_irq = ks8695_init_irq,
  47. .init_machine = micrel_init,
  48. .init_time = ks8695_timer_init,
  49. .restart = ks8695_restart,
  50. MACHINE_END