lkml.org 
[lkml]   [2014]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 15/22] MIPS/Xlr/MSI: Use MSI chip framework to configure MSI/MSI-X irq
    Date
    Use MSI chip framework instead of arch MSI functions to configure
    MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.

    Signed-off-by: Yijing Wang <wangyijing@huawei.com>
    ---
    arch/mips/pci/pci-xlr.c | 15 +++++++++++++--
    1 files changed, 13 insertions(+), 2 deletions(-)

    diff --git a/arch/mips/pci/pci-xlr.c b/arch/mips/pci/pci-xlr.c
    index 0dde803..7bd91cc 100644
    --- a/arch/mips/pci/pci-xlr.c
    +++ b/arch/mips/pci/pci-xlr.c
    @@ -214,11 +214,11 @@ static int get_irq_vector(const struct pci_dev *dev)
    }

    #ifdef CONFIG_PCI_MSI
    -void arch_teardown_msi_irq(unsigned int irq)
    +void xlr_teardown_msi_irq(unsigned int irq)
    {
    }

    -int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
    +int xlr_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
    {
    struct msi_msg msg;
    struct pci_dev *lnk;
    @@ -263,6 +263,17 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
    write_msi_msg(irq, &msg);
    return 0;
    }
    +
    +static struct msi_chip xlr_msi_chip = {
    + .setup_irq = xlr_setup_msi_irq,
    + .teardown_irq = xlr_teardown_msi_irq,
    +};
    +
    +struct msi_chip *arch_find_msi_chip(struct pci_dev *dev)
    +{
    + return &xlr_msi_chip;
    +}
    +
    #endif

    /* Extra ACK needed for XLR on chip PCI controller */
    --
    1.7.1


    \
     
     \ /
      Last update: 2014-09-25 05:21    [W:3.278 / U:1.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site