irq.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * arch/sh/boards/mach-landisk/irq.c
  3. *
  4. * I-O DATA Device, Inc. LANDISK Support
  5. *
  6. * Copyright (C) 2005-2007 kogiidena
  7. * Copyright (C) 2011 Nobuhiro Iwamatsu
  8. *
  9. * Copyright (C) 2001 Ian da Silva, Jeremy Siegel
  10. * Based largely on io_se.c.
  11. *
  12. * This file is subject to the terms and conditions of the GNU General Public
  13. * License. See the file "COPYING" in the main directory of this archive
  14. * for more details.
  15. */
  16. #include <linux/init.h>
  17. #include <linux/irq.h>
  18. #include <linux/interrupt.h>
  19. #include <linux/io.h>
  20. #include <mach-landisk/mach/iodata_landisk.h>
  21. enum {
  22. UNUSED = 0,
  23. PCI_INTA, /* PCI int A */
  24. PCI_INTB, /* PCI int B */
  25. PCI_INTC, /* PCI int C */
  26. PCI_INTD, /* PCI int D */
  27. ATA, /* ATA */
  28. FATA, /* CF */
  29. POWER, /* Power swtich */
  30. BUTTON, /* Button swtich */
  31. };
  32. /* Vectors for LANDISK */
  33. static struct intc_vect vectors_landisk[] __initdata = {
  34. INTC_IRQ(PCI_INTA, IRQ_PCIINTA),
  35. INTC_IRQ(PCI_INTB, IRQ_PCIINTB),
  36. INTC_IRQ(PCI_INTC, IRQ_PCIINTC),
  37. INTC_IRQ(PCI_INTD, IRQ_PCIINTD),
  38. INTC_IRQ(ATA, IRQ_ATA),
  39. INTC_IRQ(FATA, IRQ_FATA),
  40. INTC_IRQ(POWER, IRQ_POWER),
  41. INTC_IRQ(BUTTON, IRQ_BUTTON),
  42. };
  43. /* IRLMSK mask register layout for LANDISK */
  44. static struct intc_mask_reg mask_registers_landisk[] __initdata = {
  45. { PA_IMASK, 0, 8, /* IRLMSK */
  46. { BUTTON, POWER, FATA, ATA,
  47. PCI_INTD, PCI_INTC, PCI_INTB, PCI_INTA,
  48. }
  49. },
  50. };
  51. static DECLARE_INTC_DESC(intc_desc_landisk, "landisk", vectors_landisk, NULL,
  52. mask_registers_landisk, NULL, NULL);
  53. /*
  54. * Initialize IRQ setting
  55. */
  56. void __init init_landisk_IRQ(void)
  57. {
  58. register_intc_controller(&intc_desc_landisk);
  59. __raw_writeb(0x00, PA_PWRINT_CLR);
  60. }