irq.c 875 B

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