ipic.c (6548698f929814375fa5d62ae1db96959b0418c1) ipic.c (40d50cf7ca956183f3a573bc21082e1c7d04fa7b)
1/*
2 * arch/powerpc/sysdev/ipic.c
3 *
4 * IPIC routines implementations.
5 *
6 * Copyright 2005 Freescale Semiconductor, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it

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

600
601 spin_unlock_irqrestore(&ipic_lock, flags);
602}
603
604static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type)
605{
606 struct ipic *ipic = ipic_from_irq(virq);
607 unsigned int src = ipic_irq_to_hw(virq);
1/*
2 * arch/powerpc/sysdev/ipic.c
3 *
4 * IPIC routines implementations.
5 *
6 * Copyright 2005 Freescale Semiconductor, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it

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

600
601 spin_unlock_irqrestore(&ipic_lock, flags);
602}
603
604static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type)
605{
606 struct ipic *ipic = ipic_from_irq(virq);
607 unsigned int src = ipic_irq_to_hw(virq);
608 struct irq_desc *desc = get_irq_desc(virq);
608 struct irq_desc *desc = irq_to_desc(virq);
609 unsigned int vold, vnew, edibit;
610
611 if (flow_type == IRQ_TYPE_NONE)
612 flow_type = IRQ_TYPE_LEVEL_LOW;
613
614 /* ipic supports only low assertion and high-to-low change senses
615 */
616 if (!(flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_EDGE_FALLING))) {

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

655 }
656 if (vold != vnew)
657 ipic_write(ipic->regs, IPIC_SECNR, vnew);
658 return 0;
659}
660
661/* level interrupts and edge interrupts have different ack operations */
662static struct irq_chip ipic_level_irq_chip = {
609 unsigned int vold, vnew, edibit;
610
611 if (flow_type == IRQ_TYPE_NONE)
612 flow_type = IRQ_TYPE_LEVEL_LOW;
613
614 /* ipic supports only low assertion and high-to-low change senses
615 */
616 if (!(flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_EDGE_FALLING))) {

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

655 }
656 if (vold != vnew)
657 ipic_write(ipic->regs, IPIC_SECNR, vnew);
658 return 0;
659}
660
661/* level interrupts and edge interrupts have different ack operations */
662static struct irq_chip ipic_level_irq_chip = {
663 .typename = " IPIC ",
663 .name = " IPIC ",
664 .unmask = ipic_unmask_irq,
665 .mask = ipic_mask_irq,
666 .mask_ack = ipic_mask_irq,
667 .set_type = ipic_set_irq_type,
668};
669
670static struct irq_chip ipic_edge_irq_chip = {
664 .unmask = ipic_unmask_irq,
665 .mask = ipic_mask_irq,
666 .mask_ack = ipic_mask_irq,
667 .set_type = ipic_set_irq_type,
668};
669
670static struct irq_chip ipic_edge_irq_chip = {
671 .typename = " IPIC ",
671 .name = " IPIC ",
672 .unmask = ipic_unmask_irq,
673 .mask = ipic_mask_irq,
674 .mask_ack = ipic_mask_irq_and_ack,
675 .ack = ipic_ack_irq,
676 .set_type = ipic_set_irq_type,
677};
678
679static int ipic_host_match(struct irq_host *h, struct device_node *node)

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

692
693 /* Set default irq type */
694 set_irq_type(virq, IRQ_TYPE_NONE);
695
696 return 0;
697}
698
699static int ipic_host_xlate(struct irq_host *h, struct device_node *ct,
672 .unmask = ipic_unmask_irq,
673 .mask = ipic_mask_irq,
674 .mask_ack = ipic_mask_irq_and_ack,
675 .ack = ipic_ack_irq,
676 .set_type = ipic_set_irq_type,
677};
678
679static int ipic_host_match(struct irq_host *h, struct device_node *node)

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

692
693 /* Set default irq type */
694 set_irq_type(virq, IRQ_TYPE_NONE);
695
696 return 0;
697}
698
699static int ipic_host_xlate(struct irq_host *h, struct device_node *ct,
700 u32 *intspec, unsigned int intsize,
700 const u32 *intspec, unsigned int intsize,
701 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
702
703{
704 /* interrupt sense values coming from the device tree equal either
705 * LEVEL_LOW (low assertion) or EDGE_FALLING (high-to-low change)
706 */
707 *out_hwirq = intspec[0];
708 if (intsize > 1)

--- 286 unchanged lines hidden ---
701 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
702
703{
704 /* interrupt sense values coming from the device tree equal either
705 * LEVEL_LOW (low assertion) or EDGE_FALLING (high-to-low change)
706 */
707 *out_hwirq = intspec[0];
708 if (intsize > 1)

--- 286 unchanged lines hidden ---