irq.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * linux/arch/sh/boards/renesas/sh7763rdp/irq.c
  3. *
  4. * Renesas Solutions SH7763RDP Support.
  5. *
  6. * Copyright (C) 2008 Renesas Solutions Corp.
  7. * Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
  8. *
  9. * This file is subject to the terms and conditions of the GNU General Public
  10. * License. See the file "COPYING" in the main directory of this archive
  11. * for more details.
  12. */
  13. #include <linux/init.h>
  14. #include <linux/irq.h>
  15. #include <asm/io.h>
  16. #include <asm/irq.h>
  17. #include <mach/sh7763rdp.h>
  18. #define INTC_BASE (0xFFD00000)
  19. #define INTC_INT2PRI7 (INTC_BASE+0x4001C)
  20. #define INTC_INT2MSKCR (INTC_BASE+0x4003C)
  21. #define INTC_INT2MSKCR1 (INTC_BASE+0x400D4)
  22. /*
  23. * Initialize IRQ setting
  24. */
  25. void __init init_sh7763rdp_IRQ(void)
  26. {
  27. /* GPIO enabled */
  28. __raw_writel(1 << 25, INTC_INT2MSKCR);
  29. /* enable GPIO interrupts */
  30. __raw_writel((__raw_readl(INTC_INT2PRI7) & 0xFF00FFFF) | 0x000F0000,
  31. INTC_INT2PRI7);
  32. /* USBH enabled */
  33. __raw_writel(1 << 17, INTC_INT2MSKCR1);
  34. /* GETHER enabled */
  35. __raw_writel(1 << 16, INTC_INT2MSKCR1);
  36. /* DMAC enabled */
  37. __raw_writel(1 << 8, INTC_INT2MSKCR);
  38. }