irq.c 1015 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * linux/arch/sh/boards/se/7721/irq.c
  3. *
  4. * Copyright (C) 2008 Renesas Solutions Corp.
  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 <linux/interrupt.h>
  13. #include <linux/io.h>
  14. #include <mach-se/mach/se7721.h>
  15. enum {
  16. UNUSED = 0,
  17. /* board specific interrupt sources */
  18. MRSHPC,
  19. };
  20. static struct intc_vect vectors[] __initdata = {
  21. INTC_IRQ(MRSHPC, MRSHPC_IRQ0),
  22. };
  23. static struct intc_prio_reg prio_registers[] __initdata = {
  24. { FPGA_ILSR6, 0, 8, 4, /* IRLMSK */
  25. { 0, MRSHPC } },
  26. };
  27. static DECLARE_INTC_DESC(intc_desc, "SE7721", vectors,
  28. NULL, NULL, prio_registers, NULL);
  29. /*
  30. * Initialize IRQ setting
  31. */
  32. void __init init_se7721_IRQ(void)
  33. {
  34. /* PPCR */
  35. __raw_writew(__raw_readw(0xa4050118) & ~0x00ff, 0xa4050118);
  36. register_intc_controller(&intc_desc);
  37. intc_set_priority(MRSHPC_IRQ0, 0xf - MRSHPC_IRQ0);
  38. }