示例#1
0
文件: irq.c 项目: kzlin129/tt-gpl
static void
s3c_irqext_mask(unsigned int irqno)
{
	unsigned long bit = s3c_irqext_bit(irqno);
	unsigned long mask;

	mask = __raw_readl(s3c24xx_eintmask);
	mask |= bit;
	__raw_writel(mask, s3c24xx_eintmask);

	if (irqno <= IRQ_EINT3) {
		/* also mask parent irq */
		s3c_irq_mask(irqno);
	} else if (irqno <= IRQ_EINT7) {
		/* check to see if EINT4 through EINT7 need masking */

		if ((mask & EINT4t7_MASK) == EINT4t7_MASK) {
			/* all masked, mask the parent too */
			s3c_irq_mask(IRQ_EINT4t7);
		}
	} else {
		/* check to see if EINT8 through EINT23 need masking */

		if ((mask & EINT8t23_MASK) == EINT8t23_MASK) {
			/* all masked, mask the parent too */
			s3c_irq_mask(IRQ_EINT8t23);
		}
	}
}
示例#2
0
static void s3c_irq_mask(struct irq_data *data)
{
	struct s3c_irq_data *irq_data = irq_data_get_irq_chip_data(data);
	struct s3c_irq_intc *intc = irq_data->intc;
	struct s3c_irq_intc *parent_intc = intc->parent;
	struct s3c_irq_data *parent_data;
	unsigned long mask;
	unsigned int irqno;

	mask = __raw_readl(intc->reg_mask);
	mask |= (1UL << irq_data->offset);
	__raw_writel(mask, intc->reg_mask);

	if (parent_intc) {
		parent_data = &parent_intc->irqs[irq_data->parent_irq];

		/* check to see if we need to mask the parent IRQ
		 * The parent_irq is always in main_intc, so the hwirq
		 * for find_mapping does not need an offset in any case.
		 */
		if ((mask & parent_data->sub_bits) == parent_data->sub_bits) {
			irqno = irq_find_mapping(parent_intc->domain,
					 irq_data->parent_irq);
			s3c_irq_mask(irq_get_irq_data(irqno));
		}
	}
}