Lines Matching full:mpic

15 #include <asm/mpic.h>
17 #include "mpic.h"
36 struct mpic *mpic = irq_data_get_irq_chip_data(d); in fsl_mpic_mask_err() local
37 unsigned int src = virq_to_hw(d->irq) - mpic->err_int_vecs[0]; in fsl_mpic_mask_err()
39 eimr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EIMR); in fsl_mpic_mask_err()
41 mpic_fsl_err_write(mpic->err_regs, eimr); in fsl_mpic_mask_err()
47 struct mpic *mpic = irq_data_get_irq_chip_data(d); in fsl_mpic_unmask_err() local
48 unsigned int src = virq_to_hw(d->irq) - mpic->err_int_vecs[0]; in fsl_mpic_unmask_err()
50 eimr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EIMR); in fsl_mpic_unmask_err()
52 mpic_fsl_err_write(mpic->err_regs, eimr); in fsl_mpic_unmask_err()
61 int __init mpic_setup_error_int(struct mpic *mpic, int intvec) in mpic_setup_error_int() argument
65 mpic->err_regs = ioremap(mpic->paddr + MPIC_ERR_INT_BASE, 0x1000); in mpic_setup_error_int()
66 if (!mpic->err_regs) { in mpic_setup_error_int()
67 pr_err("could not map mpic error registers\n"); in mpic_setup_error_int()
70 mpic->hc_err = fsl_mpic_err_chip; in mpic_setup_error_int()
71 mpic->hc_err.name = mpic->name; in mpic_setup_error_int()
72 mpic->flags |= MPIC_FSL_HAS_EIMR; in mpic_setup_error_int()
75 mpic->err_int_vecs[i] = intvec--; in mpic_setup_error_int()
80 int mpic_map_error_int(struct mpic *mpic, unsigned int virq, irq_hw_number_t hw) in mpic_map_error_int() argument
82 if ((mpic->flags & MPIC_FSL_HAS_EIMR) && in mpic_map_error_int()
83 (hw >= mpic->err_int_vecs[0] && in mpic_map_error_int()
84 hw <= mpic->err_int_vecs[MPIC_MAX_ERR - 1])) { in mpic_map_error_int()
85 WARN_ON(mpic->flags & MPIC_SECONDARY); in mpic_map_error_int()
87 pr_debug("mpic: mapping as Error Interrupt\n"); in mpic_map_error_int()
88 irq_set_chip_data(virq, mpic); in mpic_map_error_int()
89 irq_set_chip_and_handler(virq, &mpic->hc_err, in mpic_map_error_int()
99 struct mpic *mpic = (struct mpic *) data; in fsl_error_int_handler() local
103 eisr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EISR); in fsl_error_int_handler()
104 eimr = mpic_fsl_err_read(mpic->err_regs, MPIC_ERR_INT_EIMR); in fsl_error_int_handler()
112 ret = generic_handle_domain_irq(mpic->irqhost, in fsl_error_int_handler()
113 mpic->err_int_vecs[errint]); in fsl_error_int_handler()
116 mpic_fsl_err_write(mpic->err_regs, eimr); in fsl_error_int_handler()
124 void __init mpic_err_int_init(struct mpic *mpic, irq_hw_number_t irqnum) in mpic_err_int_init() argument
129 virq = irq_create_mapping(mpic->irqhost, irqnum); in mpic_err_int_init()
136 mpic_fsl_err_write(mpic->err_regs, ~0); in mpic_err_int_init()
139 "mpic-error-int", mpic); in mpic_err_int_init()