setup.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Setup for Titan
  3. */
  4. #include <linux/init.h>
  5. #include <asm/irq.h>
  6. #include <asm/titan.h>
  7. #include <asm/io.h>
  8. extern void __init pcibios_init_platform(void);
  9. static struct ipr_data titan_ipr_map[] = {
  10. { TITAN_IRQ_WAN, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY },
  11. { TITAN_IRQ_LAN, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY },
  12. { TITAN_IRQ_MPCIA, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY },
  13. { TITAN_IRQ_USB, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY },
  14. };
  15. static void __init init_titan_irq(void)
  16. {
  17. /* enable individual interrupt mode for externals */
  18. ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);
  19. make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map));
  20. }
  21. struct sh_machine_vector mv_titan __initmv = {
  22. .mv_name = "Titan",
  23. .mv_inb = titan_inb,
  24. .mv_inw = titan_inw,
  25. .mv_inl = titan_inl,
  26. .mv_outb = titan_outb,
  27. .mv_outw = titan_outw,
  28. .mv_outl = titan_outl,
  29. .mv_inb_p = titan_inb_p,
  30. .mv_inw_p = titan_inw,
  31. .mv_inl_p = titan_inl,
  32. .mv_outb_p = titan_outb_p,
  33. .mv_outw_p = titan_outw,
  34. .mv_outl_p = titan_outl,
  35. .mv_insl = titan_insl,
  36. .mv_outsl = titan_outsl,
  37. .mv_ioport_map = titan_ioport_map,
  38. .mv_init_irq = init_titan_irq,
  39. .mv_init_pci = pcibios_init_platform,
  40. };
  41. ALIAS_MV(titan)