mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
powerpc: sysdev/tsi108_pci irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
3a0adfab4a
commit
11afe2bd8b
1 changed files with 19 additions and 22 deletions
|
@ -343,24 +343,9 @@ static inline unsigned int get_pci_source(void)
|
||||||
* Linux descriptor level callbacks
|
* Linux descriptor level callbacks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void tsi108_pci_irq_enable(u_int irq)
|
static void tsi108_pci_irq_unmask(struct irq_data *d)
|
||||||
{
|
{
|
||||||
tsi108_pci_int_unmask(irq);
|
tsi108_pci_int_unmask(d->irq);
|
||||||
}
|
|
||||||
|
|
||||||
static void tsi108_pci_irq_disable(u_int irq)
|
|
||||||
{
|
|
||||||
tsi108_pci_int_mask(irq);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void tsi108_pci_irq_ack(u_int irq)
|
|
||||||
{
|
|
||||||
tsi108_pci_int_mask(irq);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void tsi108_pci_irq_end(u_int irq)
|
|
||||||
{
|
|
||||||
tsi108_pci_int_unmask(irq);
|
|
||||||
|
|
||||||
/* Enable interrupts from PCI block */
|
/* Enable interrupts from PCI block */
|
||||||
tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_ENABLE,
|
tsi108_write_reg(TSI108_PCI_OFFSET + TSI108_PCI_IRP_ENABLE,
|
||||||
|
@ -370,16 +355,25 @@ static void tsi108_pci_irq_end(u_int irq)
|
||||||
mb();
|
mb();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void tsi108_pci_irq_mask(struct irq_data *d)
|
||||||
|
{
|
||||||
|
tsi108_pci_int_mask(d->irq);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void tsi108_pci_irq_ack(struct irq_data *d)
|
||||||
|
{
|
||||||
|
tsi108_pci_int_mask(d->irq);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Interrupt controller descriptor for cascaded PCI interrupt controller.
|
* Interrupt controller descriptor for cascaded PCI interrupt controller.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct irq_chip tsi108_pci_irq = {
|
static struct irq_chip tsi108_pci_irq = {
|
||||||
.name = "tsi108_PCI_int",
|
.name = "tsi108_PCI_int",
|
||||||
.mask = tsi108_pci_irq_disable,
|
.irq_mask = tsi108_pci_irq_mask,
|
||||||
.ack = tsi108_pci_irq_ack,
|
.irq_ack = tsi108_pci_irq_ack,
|
||||||
.end = tsi108_pci_irq_end,
|
.irq_unmask = tsi108_pci_irq_unmask,
|
||||||
.unmask = tsi108_pci_irq_enable,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int pci_irq_host_xlate(struct irq_host *h, struct device_node *ct,
|
static int pci_irq_host_xlate(struct irq_host *h, struct device_node *ct,
|
||||||
|
@ -437,8 +431,11 @@ void __init tsi108_pci_int_init(struct device_node *node)
|
||||||
|
|
||||||
void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc)
|
void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
|
struct irq_chip *chip = get_irq_desc_chip(desc);
|
||||||
unsigned int cascade_irq = get_pci_source();
|
unsigned int cascade_irq = get_pci_source();
|
||||||
|
|
||||||
if (cascade_irq != NO_IRQ)
|
if (cascade_irq != NO_IRQ)
|
||||||
generic_handle_irq(cascade_irq);
|
generic_handle_irq(cascade_irq);
|
||||||
desc->chip->eoi(irq);
|
|
||||||
|
chip->irq_eoi(&desc->irq_data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue