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