irq-r7780rp.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Renesas Solutions Highlander R7780RP-1 Support.
  3. *
  4. * Copyright (C) 2002 Atom Create Engineering Co., Ltd.
  5. * Copyright (C) 2006 Paul Mundt
  6. * Copyright (C) 2008 Magnus Damm
  7. *
  8. * This file is subject to the terms and conditions of the GNU General Public
  9. * License. See the file "COPYING" in the main directory of this archive
  10. * for more details.
  11. */
  12. #include <linux/init.h>
  13. #include <linux/irq.h>
  14. #include <linux/io.h>
  15. #include <mach/highlander.h>
  16. enum {
  17. UNUSED = 0,
  18. /* board specific interrupt sources */
  19. AX88796, /* Ethernet controller */
  20. PSW, /* Push Switch */
  21. CF, /* Compact Flash */
  22. PCI_A,
  23. PCI_B,
  24. PCI_C,
  25. PCI_D,
  26. };
  27. static struct intc_vect vectors[] __initdata = {
  28. INTC_IRQ(PCI_A, 65), /* dirty: overwrite cpu vectors for pci */
  29. INTC_IRQ(PCI_B, 66),
  30. INTC_IRQ(PCI_C, 67),
  31. INTC_IRQ(PCI_D, 68),
  32. INTC_IRQ(CF, IRQ_CF),
  33. INTC_IRQ(PSW, IRQ_PSW),
  34. INTC_IRQ(AX88796, IRQ_AX88796),
  35. };
  36. static struct intc_mask_reg mask_registers[] __initdata = {
  37. { 0xa5000000, 0, 16, /* IRLMSK */
  38. { PCI_A, PCI_B, PCI_C, PCI_D, CF, 0, 0, 0,
  39. 0, 0, 0, 0, 0, 0, PSW, AX88796 } },
  40. };
  41. static unsigned char irl2irq[HL_NR_IRL] __initdata = {
  42. 65, 66, 67, 68,
  43. IRQ_CF, 0, 0, 0,
  44. 0, 0, 0, 0,
  45. IRQ_AX88796, IRQ_PSW
  46. };
  47. static DECLARE_INTC_DESC(intc_desc, "r7780rp", vectors,
  48. NULL, mask_registers, NULL, NULL);
  49. unsigned char * __init highlander_plat_irq_setup(void)
  50. {
  51. if (__raw_readw(0xa5000600)) {
  52. printk(KERN_INFO "Using r7780rp interrupt controller.\n");
  53. register_intc_controller(&intc_desc);
  54. return irl2irq;
  55. }
  56. return NULL;
  57. }