| * Copyright (c) 2009 emlix GmbH |
| * Authors: Johannes Weiner <jw@emlix.com> |
| * Oskar Schirmer <os@emlix.com> |
| #include <variant/hardware.h> |
| #define INTC_STATUS 0x000 |
| #define INTC_STATUS_AG 0x100 |
| #define INTC_CFG(n) (0x200 + 4 * (n)) |
| * The s6000 has a crossbar that multiplexes interrupt output lines |
| * from the peripherals to input lines on the xtensa core. |
| * We leave the mapping decisions to the platform as it depends on the |
| * actually connected peripherals which distribution makes sense. |
| extern const signed char *platform_irq_mappings[NR_IRQS]; |
| static unsigned long scp_to_intc_enable[] = { |
| #define TO_INTC_ENABLE(n) (((n) << 1) + 1) |
| static void irq_set(unsigned int irq, int enable) |
| const signed char *m = platform_irq_mappings[irq]; |
| en = enable ? scp_to_intc_enable[irq] : 0; |
| writel(en, S6_REG_INTC + INTC_CFG(*m)); |
| void variant_irq_enable(unsigned int irq) |
| void variant_irq_disable(unsigned int irq) |