intc-r8a7740.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * R8A7740 processor support
  3. *
  4. * Copyright (C) 2011 Renesas Solutions Corp.
  5. * Copyright (C) 2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; version 2 of the License.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #include <linux/irq.h>
  21. #include <linux/io.h>
  22. #include <asm/hardware/gic.h>
  23. #define INTA_CTRL 0xe605807c
  24. static int r8a7740_set_wake(struct irq_data *data, unsigned int on)
  25. {
  26. return 0; /* always allow wakeup */
  27. }
  28. void __init r8a7740_init_irq(void)
  29. {
  30. void __iomem *gic_dist_base = __io(0xf0001000);
  31. void __iomem *gic_cpu_base = __io(0xf0000000);
  32. /*
  33. * Change INT_SEL INTCA->GIC
  34. * (on GPIO)
  35. */
  36. __raw_writel(__raw_readl(INTA_CTRL) & ~(1 << 1), INTA_CTRL);
  37. gic_init(0, 29, gic_dist_base, gic_cpu_base);
  38. gic_arch_extn.irq_set_wake = r8a7740_set_wake;
  39. }