blob: 8d6b074bb3e9b45521799db21dca76611a49b620 [file] [log] [blame]
Jason Jin34e36c12008-05-23 16:32:46 +08001/*
Scott Wood6820fea2011-01-17 14:25:28 -06002 * Copyright (C) 2007-2011 Freescale Semiconductor, Inc.
Jason Jin34e36c12008-05-23 16:32:46 +08003 *
4 * Author: Tony Li <tony.li@freescale.com>
5 * Jason Jin <Jason.jin@freescale.com>
6 *
7 * The hwirq alloc and free code reuse from sysdev/mpic_msi.c
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; version 2 of the
12 * License.
13 *
14 */
15#include <linux/irq.h>
16#include <linux/bootmem.h>
Jason Jin34e36c12008-05-23 16:32:46 +080017#include <linux/msi.h>
18#include <linux/pci.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090019#include <linux/slab.h>
Jason Jin34e36c12008-05-23 16:32:46 +080020#include <linux/of_platform.h>
21#include <sysdev/fsl_soc.h>
22#include <asm/prom.h>
23#include <asm/hw_irq.h>
24#include <asm/ppc-pci.h>
Li Yang02adac62010-04-22 16:31:35 +080025#include <asm/mpic.h>
Jason Jin34e36c12008-05-23 16:32:46 +080026#include "fsl_msi.h"
Kumar Galab8f44ec2010-08-05 02:45:08 -050027#include "fsl_pci.h"
Jason Jin34e36c12008-05-23 16:32:46 +080028
Li Yang694a7a32010-04-22 16:31:36 +080029LIST_HEAD(msi_head);
30
Jason Jin34e36c12008-05-23 16:32:46 +080031struct fsl_msi_feature {
32 u32 fsl_pic_ip;
33 u32 msiir_offset;
34};
35
Li Yang02adac62010-04-22 16:31:35 +080036struct fsl_msi_cascade_data {
37 struct fsl_msi *msi_data;
38 int index;
39};
Jason Jin34e36c12008-05-23 16:32:46 +080040
41static inline u32 fsl_msi_read(u32 __iomem *base, unsigned int reg)
42{
43 return in_be32(base + (reg >> 2));
44}
45
Jason Jin34e36c12008-05-23 16:32:46 +080046/*
47 * We do not need this actually. The MSIR register has been read once
48 * in the cascade interrupt. So, this MSI interrupt has been acked
49*/
Lennert Buytenhek37e16612011-03-07 13:59:54 +000050static void fsl_msi_end_irq(struct irq_data *d)
Jason Jin34e36c12008-05-23 16:32:46 +080051{
52}
53
54static struct irq_chip fsl_msi_chip = {
Thomas Gleixner1c9db522010-09-28 16:46:51 +020055 .irq_mask = mask_msi_irq,
56 .irq_unmask = unmask_msi_irq,
Lennert Buytenhek37e16612011-03-07 13:59:54 +000057 .irq_ack = fsl_msi_end_irq,
Anton Blanchardfc380c02010-01-31 20:33:41 +000058 .name = "FSL-MSI",
Jason Jin34e36c12008-05-23 16:32:46 +080059};
60
61static int fsl_msi_host_map(struct irq_host *h, unsigned int virq,
62 irq_hw_number_t hw)
63{
Lan Chunhe-B2580680818812010-03-15 06:38:33 +000064 struct fsl_msi *msi_data = h->host_data;
Jason Jin34e36c12008-05-23 16:32:46 +080065 struct irq_chip *chip = &fsl_msi_chip;
66
Michael Ellerman6cff46f2009-10-13 19:44:51 +000067 irq_to_desc(virq)->status |= IRQ_TYPE_EDGE_FALLING;
Jason Jin34e36c12008-05-23 16:32:46 +080068
Lan Chunhe-B2580680818812010-03-15 06:38:33 +000069 set_irq_chip_data(virq, msi_data);
Anton Vorontsov692d1032008-05-23 17:41:02 +040070 set_irq_chip_and_handler(virq, chip, handle_edge_irq);
Jason Jin34e36c12008-05-23 16:32:46 +080071
72 return 0;
73}
74
75static struct irq_host_ops fsl_msi_host_ops = {
76 .map = fsl_msi_host_map,
77};
78
Jason Jin34e36c12008-05-23 16:32:46 +080079static int fsl_msi_init_allocator(struct fsl_msi *msi_data)
80{
Anton Vorontsov692d1032008-05-23 17:41:02 +040081 int rc;
Jason Jin34e36c12008-05-23 16:32:46 +080082
Michael Ellerman7e7ab362008-08-06 09:10:02 +100083 rc = msi_bitmap_alloc(&msi_data->bitmap, NR_MSI_IRQS,
84 msi_data->irqhost->of_node);
85 if (rc)
86 return rc;
Jason Jin34e36c12008-05-23 16:32:46 +080087
Michael Ellerman7e7ab362008-08-06 09:10:02 +100088 rc = msi_bitmap_reserve_dt_hwirqs(&msi_data->bitmap);
89 if (rc < 0) {
90 msi_bitmap_free(&msi_data->bitmap);
91 return rc;
Jason Jin34e36c12008-05-23 16:32:46 +080092 }
93
Jason Jin34e36c12008-05-23 16:32:46 +080094 return 0;
Jason Jin34e36c12008-05-23 16:32:46 +080095}
96
97static int fsl_msi_check_device(struct pci_dev *pdev, int nvec, int type)
98{
99 if (type == PCI_CAP_ID_MSIX)
100 pr_debug("fslmsi: MSI-X untested, trying anyway.\n");
101
102 return 0;
103}
104
105static void fsl_teardown_msi_irqs(struct pci_dev *pdev)
106{
107 struct msi_desc *entry;
Lan Chunhe-B2580680818812010-03-15 06:38:33 +0000108 struct fsl_msi *msi_data;
Jason Jin34e36c12008-05-23 16:32:46 +0800109
110 list_for_each_entry(entry, &pdev->msi_list, list) {
111 if (entry->irq == NO_IRQ)
112 continue;
Li Yang02adac62010-04-22 16:31:35 +0800113 msi_data = get_irq_data(entry->irq);
Jason Jin34e36c12008-05-23 16:32:46 +0800114 set_irq_msi(entry->irq, NULL);
Michael Ellerman7e7ab362008-08-06 09:10:02 +1000115 msi_bitmap_free_hwirqs(&msi_data->bitmap,
116 virq_to_hw(entry->irq), 1);
Jason Jin34e36c12008-05-23 16:32:46 +0800117 irq_dispose_mapping(entry->irq);
118 }
119
120 return;
121}
122
123static void fsl_compose_msi_msg(struct pci_dev *pdev, int hwirq,
Lan Chunhe-B2580680818812010-03-15 06:38:33 +0000124 struct msi_msg *msg,
125 struct fsl_msi *fsl_msi_data)
Jason Jin34e36c12008-05-23 16:32:46 +0800126{
Lan Chunhe-B2580680818812010-03-15 06:38:33 +0000127 struct fsl_msi *msi_data = fsl_msi_data;
Kumar Gala3da34aa2009-05-12 15:51:56 -0500128 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
Kumar Galab8f44ec2010-08-05 02:45:08 -0500129 u64 base = fsl_pci_immrbar_base(hose);
Jason Jin34e36c12008-05-23 16:32:46 +0800130
Kumar Galab8f44ec2010-08-05 02:45:08 -0500131 msg->address_lo = msi_data->msi_addr_lo + lower_32_bits(base);
132 msg->address_hi = msi_data->msi_addr_hi + upper_32_bits(base);
Kumar Gala3da34aa2009-05-12 15:51:56 -0500133
Jason Jin34e36c12008-05-23 16:32:46 +0800134 msg->data = hwirq;
135
136 pr_debug("%s: allocated srs: %d, ibs: %d\n",
137 __func__, hwirq / IRQS_PER_MSI_REG, hwirq % IRQS_PER_MSI_REG);
138}
139
140static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
141{
Li Yang694a7a32010-04-22 16:31:36 +0800142 int rc, hwirq = -ENOMEM;
Jason Jin34e36c12008-05-23 16:32:46 +0800143 unsigned int virq;
144 struct msi_desc *entry;
145 struct msi_msg msg;
Lan Chunhe-B2580680818812010-03-15 06:38:33 +0000146 struct fsl_msi *msi_data;
Jason Jin34e36c12008-05-23 16:32:46 +0800147
148 list_for_each_entry(entry, &pdev->msi_list, list) {
Li Yang694a7a32010-04-22 16:31:36 +0800149 list_for_each_entry(msi_data, &msi_head, list) {
150 hwirq = msi_bitmap_alloc_hwirqs(&msi_data->bitmap, 1);
151 if (hwirq >= 0)
152 break;
153 }
Lan Chunhe-B2580680818812010-03-15 06:38:33 +0000154
Jason Jin34e36c12008-05-23 16:32:46 +0800155 if (hwirq < 0) {
156 rc = hwirq;
157 pr_debug("%s: fail allocating msi interrupt\n",
158 __func__);
159 goto out_free;
160 }
161
162 virq = irq_create_mapping(msi_data->irqhost, hwirq);
163
164 if (virq == NO_IRQ) {
Michael Ellerman7e7ab362008-08-06 09:10:02 +1000165 pr_debug("%s: fail mapping hwirq 0x%x\n",
Jason Jin34e36c12008-05-23 16:32:46 +0800166 __func__, hwirq);
Michael Ellerman7e7ab362008-08-06 09:10:02 +1000167 msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1);
Jason Jin34e36c12008-05-23 16:32:46 +0800168 rc = -ENOSPC;
169 goto out_free;
170 }
Li Yang02adac62010-04-22 16:31:35 +0800171 set_irq_data(virq, msi_data);
Jason Jin34e36c12008-05-23 16:32:46 +0800172 set_irq_msi(virq, entry);
173
Lan Chunhe-B2580680818812010-03-15 06:38:33 +0000174 fsl_compose_msi_msg(pdev, hwirq, &msg, msi_data);
Jason Jin34e36c12008-05-23 16:32:46 +0800175 write_msi_msg(virq, &msg);
176 }
177 return 0;
178
179out_free:
Li Yang694a7a32010-04-22 16:31:36 +0800180 /* free by the caller of this function */
Jason Jin34e36c12008-05-23 16:32:46 +0800181 return rc;
182}
183
Anton Vorontsov692d1032008-05-23 17:41:02 +0400184static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc)
Jason Jin34e36c12008-05-23 16:32:46 +0800185{
Lennert Buytenhek37e16612011-03-07 13:59:54 +0000186 struct irq_chip *chip = get_irq_desc_chip(desc);
Jason Jin34e36c12008-05-23 16:32:46 +0800187 unsigned int cascade_irq;
Li Yang02adac62010-04-22 16:31:35 +0800188 struct fsl_msi *msi_data;
Jason Jin34e36c12008-05-23 16:32:46 +0800189 int msir_index = -1;
190 u32 msir_value = 0;
191 u32 intr_index;
192 u32 have_shift = 0;
Li Yang02adac62010-04-22 16:31:35 +0800193 struct fsl_msi_cascade_data *cascade_data;
194
195 cascade_data = (struct fsl_msi_cascade_data *)get_irq_data(irq);
196 msi_data = cascade_data->msi_data;
Jason Jin34e36c12008-05-23 16:32:46 +0800197
Thomas Gleixner239007b2009-11-17 16:46:45 +0100198 raw_spin_lock(&desc->lock);
Jason Jin34e36c12008-05-23 16:32:46 +0800199 if ((msi_data->feature & FSL_PIC_IP_MASK) == FSL_PIC_IP_IPIC) {
Lennert Buytenhek37e16612011-03-07 13:59:54 +0000200 if (chip->irq_mask_ack)
201 chip->irq_mask_ack(&desc->irq_data);
Jason Jin34e36c12008-05-23 16:32:46 +0800202 else {
Lennert Buytenhek37e16612011-03-07 13:59:54 +0000203 chip->irq_mask(&desc->irq_data);
204 chip->irq_ack(&desc->irq_data);
Jason Jin34e36c12008-05-23 16:32:46 +0800205 }
206 }
207
208 if (unlikely(desc->status & IRQ_INPROGRESS))
209 goto unlock;
210
Li Yang02adac62010-04-22 16:31:35 +0800211 msir_index = cascade_data->index;
Jason Jin34e36c12008-05-23 16:32:46 +0800212
213 if (msir_index >= NR_MSI_REG)
214 cascade_irq = NO_IRQ;
215
216 desc->status |= IRQ_INPROGRESS;
Lan Chunhe-B2580680818812010-03-15 06:38:33 +0000217 switch (msi_data->feature & FSL_PIC_IP_MASK) {
Jason Jin34e36c12008-05-23 16:32:46 +0800218 case FSL_PIC_IP_MPIC:
219 msir_value = fsl_msi_read(msi_data->msi_regs,
220 msir_index * 0x10);
221 break;
222 case FSL_PIC_IP_IPIC:
223 msir_value = fsl_msi_read(msi_data->msi_regs, msir_index * 0x4);
224 break;
225 }
226
227 while (msir_value) {
228 intr_index = ffs(msir_value) - 1;
229
230 cascade_irq = irq_linear_revmap(msi_data->irqhost,
Anton Vorontsov692d1032008-05-23 17:41:02 +0400231 msir_index * IRQS_PER_MSI_REG +
232 intr_index + have_shift);
Jason Jin34e36c12008-05-23 16:32:46 +0800233 if (cascade_irq != NO_IRQ)
234 generic_handle_irq(cascade_irq);
Anton Vorontsov692d1032008-05-23 17:41:02 +0400235 have_shift += intr_index + 1;
236 msir_value = msir_value >> (intr_index + 1);
Jason Jin34e36c12008-05-23 16:32:46 +0800237 }
238 desc->status &= ~IRQ_INPROGRESS;
239
240 switch (msi_data->feature & FSL_PIC_IP_MASK) {
241 case FSL_PIC_IP_MPIC:
Lennert Buytenhek37e16612011-03-07 13:59:54 +0000242 chip->irq_eoi(&desc->irq_data);
Jason Jin34e36c12008-05-23 16:32:46 +0800243 break;
244 case FSL_PIC_IP_IPIC:
Lennert Buytenhek37e16612011-03-07 13:59:54 +0000245 if (!(desc->status & IRQ_DISABLED) && chip->irq_unmask)
246 chip->irq_unmask(&desc->irq_data);
Jason Jin34e36c12008-05-23 16:32:46 +0800247 break;
248 }
249unlock:
Thomas Gleixner239007b2009-11-17 16:46:45 +0100250 raw_spin_unlock(&desc->lock);
Jason Jin34e36c12008-05-23 16:32:46 +0800251}
252
Grant Likelya454dc52010-07-22 15:52:34 -0600253static int fsl_of_msi_remove(struct platform_device *ofdev)
Li Yang48059992010-04-22 16:31:39 +0800254{
255 struct fsl_msi *msi = ofdev->dev.platform_data;
256 int virq, i;
257 struct fsl_msi_cascade_data *cascade_data;
258
259 if (msi->list.prev != NULL)
260 list_del(&msi->list);
261 for (i = 0; i < NR_MSI_REG; i++) {
262 virq = msi->msi_virqs[i];
263 if (virq != NO_IRQ) {
264 cascade_data = get_irq_data(virq);
265 kfree(cascade_data);
266 irq_dispose_mapping(virq);
267 }
268 }
269 if (msi->bitmap.bitmap)
270 msi_bitmap_free(&msi->bitmap);
271 iounmap(msi->msi_regs);
272 kfree(msi);
273
274 return 0;
275}
276
Scott Wood6820fea2011-01-17 14:25:28 -0600277static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi,
278 struct platform_device *dev,
279 int offset, int irq_index)
280{
281 struct fsl_msi_cascade_data *cascade_data = NULL;
282 int virt_msir;
283
284 virt_msir = irq_of_parse_and_map(dev->dev.of_node, irq_index);
285 if (virt_msir == NO_IRQ) {
286 dev_err(&dev->dev, "%s: Cannot translate IRQ index %d\n",
287 __func__, irq_index);
288 return 0;
289 }
290
291 cascade_data = kzalloc(sizeof(struct fsl_msi_cascade_data), GFP_KERNEL);
292 if (!cascade_data) {
293 dev_err(&dev->dev, "No memory for MSI cascade data\n");
294 return -ENOMEM;
295 }
296
297 msi->msi_virqs[irq_index] = virt_msir;
298 cascade_data->index = offset + irq_index;
299 cascade_data->msi_data = msi;
300 set_irq_data(virt_msir, cascade_data);
301 set_irq_chained_handler(virt_msir, fsl_msi_cascade);
302
303 return 0;
304}
305
Grant Likelya454dc52010-07-22 15:52:34 -0600306static int __devinit fsl_of_msi_probe(struct platform_device *dev,
Jason Jin34e36c12008-05-23 16:32:46 +0800307 const struct of_device_id *match)
308{
309 struct fsl_msi *msi;
310 struct resource res;
Scott Wood6820fea2011-01-17 14:25:28 -0600311 int err, i, j, irq_index, count;
Jason Jin34e36c12008-05-23 16:32:46 +0800312 int rc;
Jason Jin34e36c12008-05-23 16:32:46 +0800313 const u32 *p;
Anton Vorontsov692d1032008-05-23 17:41:02 +0400314 struct fsl_msi_feature *features = match->data;
Li Yang061ca4a2010-04-22 16:31:37 +0800315 int len;
316 u32 offset;
Scott Wood6820fea2011-01-17 14:25:28 -0600317 static const u32 all_avail[] = { 0, NR_MSI_IRQS };
Jason Jin34e36c12008-05-23 16:32:46 +0800318
319 printk(KERN_DEBUG "Setting up Freescale MSI support\n");
320
321 msi = kzalloc(sizeof(struct fsl_msi), GFP_KERNEL);
322 if (!msi) {
323 dev_err(&dev->dev, "No memory for MSI structure\n");
Li Yang48059992010-04-22 16:31:39 +0800324 return -ENOMEM;
Jason Jin34e36c12008-05-23 16:32:46 +0800325 }
Li Yang48059992010-04-22 16:31:39 +0800326 dev->dev.platform_data = msi;
Jason Jin34e36c12008-05-23 16:32:46 +0800327
Grant Likely61c7a082010-04-13 16:12:29 -0700328 msi->irqhost = irq_alloc_host(dev->dev.of_node, IRQ_HOST_MAP_LINEAR,
Michael Ellerman611cd902008-08-06 09:10:00 +1000329 NR_MSI_IRQS, &fsl_msi_host_ops, 0);
Jason Jin34e36c12008-05-23 16:32:46 +0800330
Jason Jin34e36c12008-05-23 16:32:46 +0800331 if (msi->irqhost == NULL) {
332 dev_err(&dev->dev, "No memory for MSI irqhost\n");
Jason Jin34e36c12008-05-23 16:32:46 +0800333 err = -ENOMEM;
334 goto error_out;
335 }
336
337 /* Get the MSI reg base */
Grant Likely61c7a082010-04-13 16:12:29 -0700338 err = of_address_to_resource(dev->dev.of_node, 0, &res);
Jason Jin34e36c12008-05-23 16:32:46 +0800339 if (err) {
340 dev_err(&dev->dev, "%s resource error!\n",
Grant Likely61c7a082010-04-13 16:12:29 -0700341 dev->dev.of_node->full_name);
Jason Jin34e36c12008-05-23 16:32:46 +0800342 goto error_out;
343 }
344
345 msi->msi_regs = ioremap(res.start, res.end - res.start + 1);
346 if (!msi->msi_regs) {
347 dev_err(&dev->dev, "ioremap problem failed\n");
348 goto error_out;
349 }
350
Anton Vorontsov692d1032008-05-23 17:41:02 +0400351 msi->feature = features->fsl_pic_ip;
Jason Jin34e36c12008-05-23 16:32:46 +0800352
353 msi->irqhost->host_data = msi;
354
355 msi->msi_addr_hi = 0x0;
Kumar Gala3da34aa2009-05-12 15:51:56 -0500356 msi->msi_addr_lo = features->msiir_offset + (res.start & 0xfffff);
Jason Jin34e36c12008-05-23 16:32:46 +0800357
358 rc = fsl_msi_init_allocator(msi);
359 if (rc) {
360 dev_err(&dev->dev, "Error allocating MSI bitmap\n");
361 goto error_out;
362 }
363
Scott Wood6820fea2011-01-17 14:25:28 -0600364 p = of_get_property(dev->dev.of_node, "msi-available-ranges", &len);
365 if (p && len % (2 * sizeof(u32)) != 0) {
366 dev_err(&dev->dev, "%s: Malformed msi-available-ranges property\n",
367 __func__);
Jason Jin34e36c12008-05-23 16:32:46 +0800368 err = -EINVAL;
369 goto error_out;
370 }
371
Scott Wood6820fea2011-01-17 14:25:28 -0600372 if (!p)
373 p = all_avail;
374
375 for (irq_index = 0, i = 0; i < len / (2 * sizeof(u32)); i++) {
376 if (p[i * 2] % IRQS_PER_MSI_REG ||
377 p[i * 2 + 1] % IRQS_PER_MSI_REG) {
378 printk(KERN_WARNING "%s: %s: msi available range of %u at %u is not IRQ-aligned\n",
379 __func__, dev->dev.of_node->full_name,
380 p[i * 2 + 1], p[i * 2]);
381 err = -EINVAL;
382 goto error_out;
383 }
384
385 offset = p[i * 2] / IRQS_PER_MSI_REG;
386 count = p[i * 2 + 1] / IRQS_PER_MSI_REG;
387
388 for (j = 0; j < count; j++, irq_index++) {
389 err = fsl_msi_setup_hwirq(msi, dev, offset, irq_index);
390 if (err)
Li Yang02adac62010-04-22 16:31:35 +0800391 goto error_out;
Jason Jin34e36c12008-05-23 16:32:46 +0800392 }
393 }
394
Li Yang694a7a32010-04-22 16:31:36 +0800395 list_add_tail(&msi->list, &msi_head);
Jason Jin34e36c12008-05-23 16:32:46 +0800396
Lan Chunhe-B2580680818812010-03-15 06:38:33 +0000397 /* The multiple setting ppc_md.setup_msi_irqs will not harm things */
398 if (!ppc_md.setup_msi_irqs) {
399 ppc_md.setup_msi_irqs = fsl_setup_msi_irqs;
400 ppc_md.teardown_msi_irqs = fsl_teardown_msi_irqs;
401 ppc_md.msi_check_device = fsl_msi_check_device;
402 } else if (ppc_md.setup_msi_irqs != fsl_setup_msi_irqs) {
403 dev_err(&dev->dev, "Different MSI driver already installed!\n");
404 err = -ENODEV;
405 goto error_out;
406 }
Jason Jin34e36c12008-05-23 16:32:46 +0800407 return 0;
408error_out:
Li Yang48059992010-04-22 16:31:39 +0800409 fsl_of_msi_remove(dev);
Jason Jin34e36c12008-05-23 16:32:46 +0800410 return err;
411}
412
413static const struct fsl_msi_feature mpic_msi_feature = {
414 .fsl_pic_ip = FSL_PIC_IP_MPIC,
415 .msiir_offset = 0x140,
416};
417
418static const struct fsl_msi_feature ipic_msi_feature = {
419 .fsl_pic_ip = FSL_PIC_IP_IPIC,
420 .msiir_offset = 0x38,
421};
422
423static const struct of_device_id fsl_of_msi_ids[] = {
424 {
425 .compatible = "fsl,mpic-msi",
426 .data = (void *)&mpic_msi_feature,
427 },
428 {
429 .compatible = "fsl,ipic-msi",
430 .data = (void *)&ipic_msi_feature,
431 },
432 {}
433};
434
435static struct of_platform_driver fsl_of_msi_driver = {
Grant Likely40182942010-04-13 16:13:02 -0700436 .driver = {
437 .name = "fsl-msi",
438 .owner = THIS_MODULE,
439 .of_match_table = fsl_of_msi_ids,
440 },
Jason Jin34e36c12008-05-23 16:32:46 +0800441 .probe = fsl_of_msi_probe,
Li Yang48059992010-04-22 16:31:39 +0800442 .remove = fsl_of_msi_remove,
Jason Jin34e36c12008-05-23 16:32:46 +0800443};
444
445static __init int fsl_of_msi_init(void)
446{
447 return of_register_platform_driver(&fsl_of_msi_driver);
448}
449
450subsys_initcall(fsl_of_msi_init);