cregit-Linux how code gets into the kernel

Release 4.11 drivers/irqchip/irq-xtensa-pic.c

Directory: drivers/irqchip
/*
 * Xtensa built-in interrupt controller
 *
 * Copyright (C) 2002 - 2013 Tensilica, Inc.
 * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Chris Zankel <chris@zankel.net>
 * Kevin Chea
 */

#include <linux/interrupt.h>
#include <linux/irqdomain.h>
#include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/of.h>


unsigned int cached_irq_mask;

/*
 * Device Tree IRQ specifier translation function which works with one or
 * two cell bindings. First cell value maps directly to the hwirq number.
 * Second cell if present specifies whether hwirq number is external (1) or
 * internal (0).
 */

static int xtensa_pic_irq_domain_xlate(struct irq_domain *d, struct device_node *ctrlr, const u32 *intspec, unsigned int intsize, unsigned long *out_hwirq, unsigned int *out_type) { return xtensa_irq_domain_xlate(intspec, intsize, intspec[0], intspec[0], out_hwirq, out_type); }

Contributors

PersonTokensPropCommitsCommitProp
Max Filippov57100.00%1100.00%
Total57100.00%1100.00%

static const struct irq_domain_ops xtensa_irq_domain_ops = { .xlate = xtensa_pic_irq_domain_xlate, .map = xtensa_irq_map, };
static void xtensa_irq_mask(struct irq_data *d) { cached_irq_mask &= ~(1 << d->hwirq); set_sr(cached_irq_mask, intenable); }

Contributors

PersonTokensPropCommitsCommitProp
Max Filippov29100.00%1100.00%
Total29100.00%1100.00%


static void xtensa_irq_unmask(struct irq_data *d) { cached_irq_mask |= 1 << d->hwirq; set_sr(cached_irq_mask, intenable); }

Contributors

PersonTokensPropCommitsCommitProp
Max Filippov26100.00%1100.00%
Total26100.00%1100.00%


static void xtensa_irq_enable(struct irq_data *d) { variant_irq_enable(d->hwirq); xtensa_irq_unmask(d); }

Contributors

PersonTokensPropCommitsCommitProp
Max Filippov23100.00%1100.00%
Total23100.00%1100.00%


static void xtensa_irq_disable(struct irq_data *d) { xtensa_irq_mask(d); variant_irq_disable(d->hwirq); }

Contributors

PersonTokensPropCommitsCommitProp
Max Filippov23100.00%1100.00%
Total23100.00%1100.00%


static void xtensa_irq_ack(struct irq_data *d) { set_sr(1 << d->hwirq, intclear); }

Contributors

PersonTokensPropCommitsCommitProp
Max Filippov22100.00%1100.00%
Total22100.00%1100.00%


static int xtensa_irq_retrigger(struct irq_data *d) { set_sr(1 << d->hwirq, intset); return 1; }

Contributors

PersonTokensPropCommitsCommitProp
Max Filippov25100.00%1100.00%
Total25100.00%1100.00%

static struct irq_chip xtensa_irq_chip = { .name = "xtensa", .irq_enable = xtensa_irq_enable, .irq_disable = xtensa_irq_disable, .irq_mask = xtensa_irq_mask, .irq_unmask = xtensa_irq_unmask, .irq_ack = xtensa_irq_ack, .irq_retrigger = xtensa_irq_retrigger, };
int __init xtensa_pic_init_legacy(struct device_node *interrupt_parent) { struct irq_domain *root_domain = irq_domain_add_legacy(NULL, NR_IRQS, 0, 0, &xtensa_irq_domain_ops, &xtensa_irq_chip); irq_set_default_host(root_domain); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Max Filippov41100.00%1100.00%
Total41100.00%1100.00%


static int __init xtensa_pic_init(struct device_node *np, struct device_node *interrupt_parent) { struct irq_domain *root_domain = irq_domain_add_linear(np, NR_IRQS, &xtensa_irq_domain_ops, &xtensa_irq_chip); irq_set_default_host(root_domain); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Max Filippov43100.00%1100.00%
Total43100.00%1100.00%

IRQCHIP_DECLARE(xtensa_irq_chip, "cdns,xtensa-pic", xtensa_pic_init);

Overall Contributors

PersonTokensPropCommitsCommitProp
Max Filippov37799.47%150.00%
Joël Porquet20.53%150.00%
Total379100.00%2100.00%
Directory: drivers/irqchip
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.