setup.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * arch/sh/boards/titan/setup.c - Setup for Titan
  3. *
  4. * Copyright (C) 2006 Jamie Lenehan
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #include <linux/init.h>
  11. #include <linux/irq.h>
  12. #include <asm/titan.h>
  13. #include <asm/io.h>
  14. static struct ipr_data titan_ipr_map[] = {
  15. /* IRQ, IPR idx, shift, prio */
  16. { TITAN_IRQ_WAN, 3, 12, 8 }, /* eth0 (WAN) */
  17. { TITAN_IRQ_LAN, 3, 8, 8 }, /* eth1 (LAN) */
  18. { TITAN_IRQ_MPCIA, 3, 4, 8 }, /* mPCI A (top) */
  19. { TITAN_IRQ_USB, 3, 0, 8 }, /* mPCI B (bottom), USB */
  20. };
  21. static void __init init_titan_irq(void)
  22. {
  23. /* enable individual interrupt mode for externals */
  24. ipr_irq_enable_irlm();
  25. /* register ipr irqs */
  26. make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map));
  27. }
  28. struct sh_machine_vector mv_titan __initmv = {
  29. .mv_name = "Titan",
  30. .mv_inb = titan_inb,
  31. .mv_inw = titan_inw,
  32. .mv_inl = titan_inl,
  33. .mv_outb = titan_outb,
  34. .mv_outw = titan_outw,
  35. .mv_outl = titan_outl,
  36. .mv_inb_p = titan_inb_p,
  37. .mv_inw_p = titan_inw,
  38. .mv_inl_p = titan_inl,
  39. .mv_outb_p = titan_outb_p,
  40. .mv_outw_p = titan_outw,
  41. .mv_outl_p = titan_outl,
  42. .mv_insl = titan_insl,
  43. .mv_outsl = titan_outsl,
  44. .mv_ioport_map = titan_ioport_map,
  45. .mv_init_irq = init_titan_irq,
  46. };
  47. ALIAS_MV(titan)