mcip.c (fc73965ed0aa360d1c1813fcdb078533cbab03e3) mcip.c (ec69b269d87c123a66bbcdc31cd5918db4ce442a)
1/*
2 * ARC ARConnect (MultiCore IP) support (formerly known as MCIP)
3 *
4 * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 241 unchanged lines hidden (view full) ---

250static int idu_irq_map(struct irq_domain *d, unsigned int virq, irq_hw_number_t hwirq)
251{
252 irq_set_chip_and_handler(virq, &idu_irq_chip, handle_level_irq);
253 irq_set_status_flags(virq, IRQ_MOVE_PCNTXT);
254
255 return 0;
256}
257
1/*
2 * ARC ARConnect (MultiCore IP) support (formerly known as MCIP)
3 *
4 * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 241 unchanged lines hidden (view full) ---

250static int idu_irq_map(struct irq_domain *d, unsigned int virq, irq_hw_number_t hwirq)
251{
252 irq_set_chip_and_handler(virq, &idu_irq_chip, handle_level_irq);
253 irq_set_status_flags(virq, IRQ_MOVE_PCNTXT);
254
255 return 0;
256}
257
258static int idu_irq_xlate(struct irq_domain *d, struct device_node *n,
259 const u32 *intspec, unsigned int intsize,
260 irq_hw_number_t *out_hwirq, unsigned int *out_type)
261{
262 /*
263 * Ignore value of interrupt distribution mode for common interrupts in
264 * IDU which resides in intspec[1] since setting an affinity using value
265 * from Device Tree is deprecated in ARC.
266 */
267 *out_hwirq = intspec[0];
268 *out_type = IRQ_TYPE_NONE;
269
270 return 0;
271}
272
273static const struct irq_domain_ops idu_irq_ops = {
258static const struct irq_domain_ops idu_irq_ops = {
274 .xlate = idu_irq_xlate,
259 .xlate = irq_domain_xlate_onecell,
275 .map = idu_irq_map,
276};
277
278/*
279 * [16, 23]: Statically assigned always private-per-core (Timers, WDT, IPI)
280 * [24, 23+C]: If C > 0 then "C" common IRQs
281 * [24+C, N]: Not statically assigned, private-per-core
282 */

--- 45 unchanged lines hidden ---
260 .map = idu_irq_map,
261};
262
263/*
264 * [16, 23]: Statically assigned always private-per-core (Timers, WDT, IPI)
265 * [24, 23+C]: If C > 0 then "C" common IRQs
266 * [24+C, N]: Not statically assigned, private-per-core
267 */

--- 45 unchanged lines hidden ---