diff options
Diffstat (limited to 'arch/powerpc/sysdev/fsl_msi.c')
-rw-r--r-- | arch/powerpc/sysdev/fsl_msi.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index d5679dc1e20f..92e78333c47c 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
@@ -110,7 +110,7 @@ static void fsl_teardown_msi_irqs(struct pci_dev *pdev) | |||
110 | list_for_each_entry(entry, &pdev->msi_list, list) { | 110 | list_for_each_entry(entry, &pdev->msi_list, list) { |
111 | if (entry->irq == NO_IRQ) | 111 | if (entry->irq == NO_IRQ) |
112 | continue; | 112 | continue; |
113 | msi_data = irq_get_handler_data(entry->irq); | 113 | msi_data = irq_get_chip_data(entry->irq); |
114 | irq_set_msi_desc(entry->irq, NULL); | 114 | irq_set_msi_desc(entry->irq, NULL); |
115 | msi_bitmap_free_hwirqs(&msi_data->bitmap, | 115 | msi_bitmap_free_hwirqs(&msi_data->bitmap, |
116 | virq_to_hw(entry->irq), 1); | 116 | virq_to_hw(entry->irq), 1); |
@@ -168,7 +168,7 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) | |||
168 | rc = -ENOSPC; | 168 | rc = -ENOSPC; |
169 | goto out_free; | 169 | goto out_free; |
170 | } | 170 | } |
171 | irq_set_handler_data(virq, msi_data); | 171 | /* chip_data is msi_data via host->hostdata in host->map() */ |
172 | irq_set_msi_desc(virq, entry); | 172 | irq_set_msi_desc(virq, entry); |
173 | 173 | ||
174 | fsl_compose_msi_msg(pdev, hwirq, &msg, msi_data); | 174 | fsl_compose_msi_msg(pdev, hwirq, &msg, msi_data); |
@@ -193,7 +193,7 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) | |||
193 | u32 have_shift = 0; | 193 | u32 have_shift = 0; |
194 | struct fsl_msi_cascade_data *cascade_data; | 194 | struct fsl_msi_cascade_data *cascade_data; |
195 | 195 | ||
196 | cascade_data = (struct fsl_msi_cascade_data *)irq_get_handler_data(irq); | 196 | cascade_data = irq_get_handler_data(irq); |
197 | msi_data = cascade_data->msi_data; | 197 | msi_data = cascade_data->msi_data; |
198 | 198 | ||
199 | raw_spin_lock(&desc->lock); | 199 | raw_spin_lock(&desc->lock); |
@@ -253,7 +253,7 @@ unlock: | |||
253 | 253 | ||
254 | static int fsl_of_msi_remove(struct platform_device *ofdev) | 254 | static int fsl_of_msi_remove(struct platform_device *ofdev) |
255 | { | 255 | { |
256 | struct fsl_msi *msi = ofdev->dev.platform_data; | 256 | struct fsl_msi *msi = platform_get_drvdata(ofdev); |
257 | int virq, i; | 257 | int virq, i; |
258 | struct fsl_msi_cascade_data *cascade_data; | 258 | struct fsl_msi_cascade_data *cascade_data; |
259 | 259 | ||
@@ -304,8 +304,10 @@ static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi, | |||
304 | return 0; | 304 | return 0; |
305 | } | 305 | } |
306 | 306 | ||
307 | static const struct of_device_id fsl_of_msi_ids[]; | ||
307 | static int __devinit fsl_of_msi_probe(struct platform_device *dev) | 308 | static int __devinit fsl_of_msi_probe(struct platform_device *dev) |
308 | { | 309 | { |
310 | const struct of_device_id *match; | ||
309 | struct fsl_msi *msi; | 311 | struct fsl_msi *msi; |
310 | struct resource res; | 312 | struct resource res; |
311 | int err, i, j, irq_index, count; | 313 | int err, i, j, irq_index, count; |
@@ -316,9 +318,10 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev) | |||
316 | u32 offset; | 318 | u32 offset; |
317 | static const u32 all_avail[] = { 0, NR_MSI_IRQS }; | 319 | static const u32 all_avail[] = { 0, NR_MSI_IRQS }; |
318 | 320 | ||
319 | if (!dev->dev.of_match) | 321 | match = of_match_device(fsl_of_msi_ids, &dev->dev); |
322 | if (!match) | ||
320 | return -EINVAL; | 323 | return -EINVAL; |
321 | features = dev->dev.of_match->data; | 324 | features = match->data; |
322 | 325 | ||
323 | printk(KERN_DEBUG "Setting up Freescale MSI support\n"); | 326 | printk(KERN_DEBUG "Setting up Freescale MSI support\n"); |
324 | 327 | ||
@@ -327,7 +330,7 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev) | |||
327 | dev_err(&dev->dev, "No memory for MSI structure\n"); | 330 | dev_err(&dev->dev, "No memory for MSI structure\n"); |
328 | return -ENOMEM; | 331 | return -ENOMEM; |
329 | } | 332 | } |
330 | dev->dev.platform_data = msi; | 333 | platform_set_drvdata(dev, msi); |
331 | 334 | ||
332 | msi->irqhost = irq_alloc_host(dev->dev.of_node, IRQ_HOST_MAP_LINEAR, | 335 | msi->irqhost = irq_alloc_host(dev->dev.of_node, IRQ_HOST_MAP_LINEAR, |
333 | NR_MSI_IRQS, &fsl_msi_host_ops, 0); | 336 | NR_MSI_IRQS, &fsl_msi_host_ops, 0); |