fsl_msi.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. /*
  2. * Copyright (C) 2007-2011 Freescale Semiconductor, Inc.
  3. *
  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/msi.h>
  17. #include <linux/pci.h>
  18. #include <linux/slab.h>
  19. #include <linux/of_platform.h>
  20. #include <linux/interrupt.h>
  21. #include <linux/seq_file.h>
  22. #include <sysdev/fsl_soc.h>
  23. #include <asm/prom.h>
  24. #include <asm/hw_irq.h>
  25. #include <asm/ppc-pci.h>
  26. #include <asm/mpic.h>
  27. #include <asm/fsl_hcalls.h>
  28. #include "fsl_msi.h"
  29. #include "fsl_pci.h"
  30. #define MSIIR_OFFSET_MASK 0xfffff
  31. #define MSIIR_IBS_SHIFT 0
  32. #define MSIIR_SRS_SHIFT 5
  33. #define MSIIR1_IBS_SHIFT 4
  34. #define MSIIR1_SRS_SHIFT 0
  35. #define MSI_SRS_MASK 0xf
  36. #define MSI_IBS_MASK 0x1f
  37. #define msi_hwirq(msi, msir_index, intr_index) \
  38. ((msir_index) << (msi)->srs_shift | \
  39. ((intr_index) << (msi)->ibs_shift))
  40. static LIST_HEAD(msi_head);
  41. struct fsl_msi_feature {
  42. u32 fsl_pic_ip;
  43. u32 msiir_offset; /* Offset of MSIIR, relative to start of MSIR bank */
  44. };
  45. struct fsl_msi_cascade_data {
  46. struct fsl_msi *msi_data;
  47. int index;
  48. int virq;
  49. };
  50. static inline u32 fsl_msi_read(u32 __iomem *base, unsigned int reg)
  51. {
  52. return in_be32(base + (reg >> 2));
  53. }
  54. /*
  55. * We do not need this actually. The MSIR register has been read once
  56. * in the cascade interrupt. So, this MSI interrupt has been acked
  57. */
  58. static void fsl_msi_end_irq(struct irq_data *d)
  59. {
  60. }
  61. static void fsl_msi_print_chip(struct irq_data *irqd, struct seq_file *p)
  62. {
  63. struct fsl_msi *msi_data = irqd->domain->host_data;
  64. irq_hw_number_t hwirq = irqd_to_hwirq(irqd);
  65. int cascade_virq, srs;
  66. srs = (hwirq >> msi_data->srs_shift) & MSI_SRS_MASK;
  67. cascade_virq = msi_data->cascade_array[srs]->virq;
  68. seq_printf(p, " fsl-msi-%d", cascade_virq);
  69. }
  70. static struct irq_chip fsl_msi_chip = {
  71. .irq_mask = pci_msi_mask_irq,
  72. .irq_unmask = pci_msi_unmask_irq,
  73. .irq_ack = fsl_msi_end_irq,
  74. .irq_print_chip = fsl_msi_print_chip,
  75. };
  76. static int fsl_msi_host_map(struct irq_domain *h, unsigned int virq,
  77. irq_hw_number_t hw)
  78. {
  79. struct fsl_msi *msi_data = h->host_data;
  80. struct irq_chip *chip = &fsl_msi_chip;
  81. irq_set_status_flags(virq, IRQ_TYPE_EDGE_FALLING);
  82. irq_set_chip_data(virq, msi_data);
  83. irq_set_chip_and_handler(virq, chip, handle_edge_irq);
  84. return 0;
  85. }
  86. static const struct irq_domain_ops fsl_msi_host_ops = {
  87. .map = fsl_msi_host_map,
  88. };
  89. static int fsl_msi_init_allocator(struct fsl_msi *msi_data)
  90. {
  91. int rc, hwirq;
  92. rc = msi_bitmap_alloc(&msi_data->bitmap, NR_MSI_IRQS_MAX,
  93. irq_domain_get_of_node(msi_data->irqhost));
  94. if (rc)
  95. return rc;
  96. /*
  97. * Reserve all the hwirqs
  98. * The available hwirqs will be released in fsl_msi_setup_hwirq()
  99. */
  100. for (hwirq = 0; hwirq < NR_MSI_IRQS_MAX; hwirq++)
  101. msi_bitmap_reserve_hwirq(&msi_data->bitmap, hwirq);
  102. return 0;
  103. }
  104. static void fsl_teardown_msi_irqs(struct pci_dev *pdev)
  105. {
  106. struct msi_desc *entry;
  107. struct fsl_msi *msi_data;
  108. irq_hw_number_t hwirq;
  109. for_each_pci_msi_entry(entry, pdev) {
  110. if (!entry->irq)
  111. continue;
  112. hwirq = virq_to_hw(entry->irq);
  113. msi_data = irq_get_chip_data(entry->irq);
  114. irq_set_msi_desc(entry->irq, NULL);
  115. irq_dispose_mapping(entry->irq);
  116. msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1);
  117. }
  118. return;
  119. }
  120. static void fsl_compose_msi_msg(struct pci_dev *pdev, int hwirq,
  121. struct msi_msg *msg,
  122. struct fsl_msi *fsl_msi_data)
  123. {
  124. struct fsl_msi *msi_data = fsl_msi_data;
  125. struct pci_controller *hose = pci_bus_to_host(pdev->bus);
  126. u64 address; /* Physical address of the MSIIR */
  127. int len;
  128. const __be64 *reg;
  129. /* If the msi-address-64 property exists, then use it */
  130. reg = of_get_property(hose->dn, "msi-address-64", &len);
  131. if (reg && (len == sizeof(u64)))
  132. address = be64_to_cpup(reg);
  133. else
  134. address = fsl_pci_immrbar_base(hose) + msi_data->msiir_offset;
  135. msg->address_lo = lower_32_bits(address);
  136. msg->address_hi = upper_32_bits(address);
  137. /*
  138. * MPIC version 2.0 has erratum PIC1. It causes
  139. * that neither MSI nor MSI-X can work fine.
  140. * This is a workaround to allow MSI-X to function
  141. * properly. It only works for MSI-X, we prevent
  142. * MSI on buggy chips in fsl_setup_msi_irqs().
  143. */
  144. if (msi_data->feature & MSI_HW_ERRATA_ENDIAN)
  145. msg->data = __swab32(hwirq);
  146. else
  147. msg->data = hwirq;
  148. pr_debug("%s: allocated srs: %d, ibs: %d\n", __func__,
  149. (hwirq >> msi_data->srs_shift) & MSI_SRS_MASK,
  150. (hwirq >> msi_data->ibs_shift) & MSI_IBS_MASK);
  151. }
  152. static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
  153. {
  154. struct pci_controller *hose = pci_bus_to_host(pdev->bus);
  155. struct device_node *np;
  156. phandle phandle = 0;
  157. int rc, hwirq = -ENOMEM;
  158. unsigned int virq;
  159. struct msi_desc *entry;
  160. struct msi_msg msg;
  161. struct fsl_msi *msi_data;
  162. if (type == PCI_CAP_ID_MSI) {
  163. /*
  164. * MPIC version 2.0 has erratum PIC1. For now MSI
  165. * could not work. So check to prevent MSI from
  166. * being used on the board with this erratum.
  167. */
  168. list_for_each_entry(msi_data, &msi_head, list)
  169. if (msi_data->feature & MSI_HW_ERRATA_ENDIAN)
  170. return -EINVAL;
  171. }
  172. /*
  173. * If the PCI node has an fsl,msi property, then we need to use it
  174. * to find the specific MSI.
  175. */
  176. np = of_parse_phandle(hose->dn, "fsl,msi", 0);
  177. if (np) {
  178. if (of_device_is_compatible(np, "fsl,mpic-msi") ||
  179. of_device_is_compatible(np, "fsl,vmpic-msi") ||
  180. of_device_is_compatible(np, "fsl,vmpic-msi-v4.3"))
  181. phandle = np->phandle;
  182. else {
  183. dev_err(&pdev->dev,
  184. "node %s has an invalid fsl,msi phandle %u\n",
  185. hose->dn->full_name, np->phandle);
  186. return -EINVAL;
  187. }
  188. }
  189. for_each_pci_msi_entry(entry, pdev) {
  190. /*
  191. * Loop over all the MSI devices until we find one that has an
  192. * available interrupt.
  193. */
  194. list_for_each_entry(msi_data, &msi_head, list) {
  195. /*
  196. * If the PCI node has an fsl,msi property, then we
  197. * restrict our search to the corresponding MSI node.
  198. * The simplest way is to skip over MSI nodes with the
  199. * wrong phandle. Under the Freescale hypervisor, this
  200. * has the additional benefit of skipping over MSI
  201. * nodes that are not mapped in the PAMU.
  202. */
  203. if (phandle && (phandle != msi_data->phandle))
  204. continue;
  205. hwirq = msi_bitmap_alloc_hwirqs(&msi_data->bitmap, 1);
  206. if (hwirq >= 0)
  207. break;
  208. }
  209. if (hwirq < 0) {
  210. rc = hwirq;
  211. dev_err(&pdev->dev, "could not allocate MSI interrupt\n");
  212. goto out_free;
  213. }
  214. virq = irq_create_mapping(msi_data->irqhost, hwirq);
  215. if (!virq) {
  216. dev_err(&pdev->dev, "fail mapping hwirq %i\n", hwirq);
  217. msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1);
  218. rc = -ENOSPC;
  219. goto out_free;
  220. }
  221. /* chip_data is msi_data via host->hostdata in host->map() */
  222. irq_set_msi_desc(virq, entry);
  223. fsl_compose_msi_msg(pdev, hwirq, &msg, msi_data);
  224. pci_write_msi_msg(virq, &msg);
  225. }
  226. return 0;
  227. out_free:
  228. /* free by the caller of this function */
  229. return rc;
  230. }
  231. static irqreturn_t fsl_msi_cascade(int irq, void *data)
  232. {
  233. unsigned int cascade_irq;
  234. struct fsl_msi *msi_data;
  235. int msir_index = -1;
  236. u32 msir_value = 0;
  237. u32 intr_index;
  238. u32 have_shift = 0;
  239. struct fsl_msi_cascade_data *cascade_data = data;
  240. irqreturn_t ret = IRQ_NONE;
  241. msi_data = cascade_data->msi_data;
  242. msir_index = cascade_data->index;
  243. if (msir_index >= NR_MSI_REG_MAX)
  244. cascade_irq = 0;
  245. switch (msi_data->feature & FSL_PIC_IP_MASK) {
  246. case FSL_PIC_IP_MPIC:
  247. msir_value = fsl_msi_read(msi_data->msi_regs,
  248. msir_index * 0x10);
  249. break;
  250. case FSL_PIC_IP_IPIC:
  251. msir_value = fsl_msi_read(msi_data->msi_regs, msir_index * 0x4);
  252. break;
  253. #ifdef CONFIG_EPAPR_PARAVIRT
  254. case FSL_PIC_IP_VMPIC: {
  255. unsigned int ret;
  256. ret = fh_vmpic_get_msir(virq_to_hw(irq), &msir_value);
  257. if (ret) {
  258. pr_err("fsl-msi: fh_vmpic_get_msir() failed for "
  259. "irq %u (ret=%u)\n", irq, ret);
  260. msir_value = 0;
  261. }
  262. break;
  263. }
  264. #endif
  265. }
  266. while (msir_value) {
  267. intr_index = ffs(msir_value) - 1;
  268. cascade_irq = irq_linear_revmap(msi_data->irqhost,
  269. msi_hwirq(msi_data, msir_index,
  270. intr_index + have_shift));
  271. if (cascade_irq) {
  272. generic_handle_irq(cascade_irq);
  273. ret = IRQ_HANDLED;
  274. }
  275. have_shift += intr_index + 1;
  276. msir_value = msir_value >> (intr_index + 1);
  277. }
  278. return ret;
  279. }
  280. static int fsl_of_msi_remove(struct platform_device *ofdev)
  281. {
  282. struct fsl_msi *msi = platform_get_drvdata(ofdev);
  283. int virq, i;
  284. if (msi->list.prev != NULL)
  285. list_del(&msi->list);
  286. for (i = 0; i < NR_MSI_REG_MAX; i++) {
  287. if (msi->cascade_array[i]) {
  288. virq = msi->cascade_array[i]->virq;
  289. BUG_ON(!virq);
  290. free_irq(virq, msi->cascade_array[i]);
  291. kfree(msi->cascade_array[i]);
  292. irq_dispose_mapping(virq);
  293. }
  294. }
  295. if (msi->bitmap.bitmap)
  296. msi_bitmap_free(&msi->bitmap);
  297. if ((msi->feature & FSL_PIC_IP_MASK) != FSL_PIC_IP_VMPIC)
  298. iounmap(msi->msi_regs);
  299. kfree(msi);
  300. return 0;
  301. }
  302. static struct lock_class_key fsl_msi_irq_class;
  303. static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev,
  304. int offset, int irq_index)
  305. {
  306. struct fsl_msi_cascade_data *cascade_data = NULL;
  307. int virt_msir, i, ret;
  308. virt_msir = irq_of_parse_and_map(dev->dev.of_node, irq_index);
  309. if (!virt_msir) {
  310. dev_err(&dev->dev, "%s: Cannot translate IRQ index %d\n",
  311. __func__, irq_index);
  312. return 0;
  313. }
  314. cascade_data = kzalloc(sizeof(struct fsl_msi_cascade_data), GFP_KERNEL);
  315. if (!cascade_data) {
  316. dev_err(&dev->dev, "No memory for MSI cascade data\n");
  317. return -ENOMEM;
  318. }
  319. irq_set_lockdep_class(virt_msir, &fsl_msi_irq_class);
  320. cascade_data->index = offset;
  321. cascade_data->msi_data = msi;
  322. cascade_data->virq = virt_msir;
  323. msi->cascade_array[irq_index] = cascade_data;
  324. ret = request_irq(virt_msir, fsl_msi_cascade, IRQF_NO_THREAD,
  325. "fsl-msi-cascade", cascade_data);
  326. if (ret) {
  327. dev_err(&dev->dev, "failed to request_irq(%d), ret = %d\n",
  328. virt_msir, ret);
  329. return ret;
  330. }
  331. /* Release the hwirqs corresponding to this MSI register */
  332. for (i = 0; i < IRQS_PER_MSI_REG; i++)
  333. msi_bitmap_free_hwirqs(&msi->bitmap,
  334. msi_hwirq(msi, offset, i), 1);
  335. return 0;
  336. }
  337. static const struct of_device_id fsl_of_msi_ids[];
  338. static int fsl_of_msi_probe(struct platform_device *dev)
  339. {
  340. const struct of_device_id *match;
  341. struct fsl_msi *msi;
  342. struct resource res, msiir;
  343. int err, i, j, irq_index, count;
  344. const u32 *p;
  345. const struct fsl_msi_feature *features;
  346. int len;
  347. u32 offset;
  348. struct pci_controller *phb;
  349. match = of_match_device(fsl_of_msi_ids, &dev->dev);
  350. if (!match)
  351. return -EINVAL;
  352. features = match->data;
  353. printk(KERN_DEBUG "Setting up Freescale MSI support\n");
  354. msi = kzalloc(sizeof(struct fsl_msi), GFP_KERNEL);
  355. if (!msi) {
  356. dev_err(&dev->dev, "No memory for MSI structure\n");
  357. return -ENOMEM;
  358. }
  359. platform_set_drvdata(dev, msi);
  360. msi->irqhost = irq_domain_add_linear(dev->dev.of_node,
  361. NR_MSI_IRQS_MAX, &fsl_msi_host_ops, msi);
  362. if (msi->irqhost == NULL) {
  363. dev_err(&dev->dev, "No memory for MSI irqhost\n");
  364. err = -ENOMEM;
  365. goto error_out;
  366. }
  367. /*
  368. * Under the Freescale hypervisor, the msi nodes don't have a 'reg'
  369. * property. Instead, we use hypercalls to access the MSI.
  370. */
  371. if ((features->fsl_pic_ip & FSL_PIC_IP_MASK) != FSL_PIC_IP_VMPIC) {
  372. err = of_address_to_resource(dev->dev.of_node, 0, &res);
  373. if (err) {
  374. dev_err(&dev->dev, "invalid resource for node %s\n",
  375. dev->dev.of_node->full_name);
  376. goto error_out;
  377. }
  378. msi->msi_regs = ioremap(res.start, resource_size(&res));
  379. if (!msi->msi_regs) {
  380. err = -ENOMEM;
  381. dev_err(&dev->dev, "could not map node %s\n",
  382. dev->dev.of_node->full_name);
  383. goto error_out;
  384. }
  385. msi->msiir_offset =
  386. features->msiir_offset + (res.start & 0xfffff);
  387. /*
  388. * First read the MSIIR/MSIIR1 offset from dts
  389. * On failure use the hardcode MSIIR offset
  390. */
  391. if (of_address_to_resource(dev->dev.of_node, 1, &msiir))
  392. msi->msiir_offset = features->msiir_offset +
  393. (res.start & MSIIR_OFFSET_MASK);
  394. else
  395. msi->msiir_offset = msiir.start & MSIIR_OFFSET_MASK;
  396. }
  397. msi->feature = features->fsl_pic_ip;
  398. /* For erratum PIC1 on MPIC version 2.0*/
  399. if ((features->fsl_pic_ip & FSL_PIC_IP_MASK) == FSL_PIC_IP_MPIC
  400. && (fsl_mpic_primary_get_version() == 0x0200))
  401. msi->feature |= MSI_HW_ERRATA_ENDIAN;
  402. /*
  403. * Remember the phandle, so that we can match with any PCI nodes
  404. * that have an "fsl,msi" property.
  405. */
  406. msi->phandle = dev->dev.of_node->phandle;
  407. err = fsl_msi_init_allocator(msi);
  408. if (err) {
  409. dev_err(&dev->dev, "Error allocating MSI bitmap\n");
  410. goto error_out;
  411. }
  412. p = of_get_property(dev->dev.of_node, "msi-available-ranges", &len);
  413. if (of_device_is_compatible(dev->dev.of_node, "fsl,mpic-msi-v4.3") ||
  414. of_device_is_compatible(dev->dev.of_node, "fsl,vmpic-msi-v4.3")) {
  415. msi->srs_shift = MSIIR1_SRS_SHIFT;
  416. msi->ibs_shift = MSIIR1_IBS_SHIFT;
  417. if (p)
  418. dev_warn(&dev->dev, "%s: dose not support msi-available-ranges property\n",
  419. __func__);
  420. for (irq_index = 0; irq_index < NR_MSI_REG_MSIIR1;
  421. irq_index++) {
  422. err = fsl_msi_setup_hwirq(msi, dev,
  423. irq_index, irq_index);
  424. if (err)
  425. goto error_out;
  426. }
  427. } else {
  428. static const u32 all_avail[] =
  429. { 0, NR_MSI_REG_MSIIR * IRQS_PER_MSI_REG };
  430. msi->srs_shift = MSIIR_SRS_SHIFT;
  431. msi->ibs_shift = MSIIR_IBS_SHIFT;
  432. if (p && len % (2 * sizeof(u32)) != 0) {
  433. dev_err(&dev->dev, "%s: Malformed msi-available-ranges property\n",
  434. __func__);
  435. err = -EINVAL;
  436. goto error_out;
  437. }
  438. if (!p) {
  439. p = all_avail;
  440. len = sizeof(all_avail);
  441. }
  442. for (irq_index = 0, i = 0; i < len / (2 * sizeof(u32)); i++) {
  443. if (p[i * 2] % IRQS_PER_MSI_REG ||
  444. p[i * 2 + 1] % IRQS_PER_MSI_REG) {
  445. pr_warn("%s: %s: msi available range of %u at %u is not IRQ-aligned\n",
  446. __func__, dev->dev.of_node->full_name,
  447. p[i * 2 + 1], p[i * 2]);
  448. err = -EINVAL;
  449. goto error_out;
  450. }
  451. offset = p[i * 2] / IRQS_PER_MSI_REG;
  452. count = p[i * 2 + 1] / IRQS_PER_MSI_REG;
  453. for (j = 0; j < count; j++, irq_index++) {
  454. err = fsl_msi_setup_hwirq(msi, dev, offset + j,
  455. irq_index);
  456. if (err)
  457. goto error_out;
  458. }
  459. }
  460. }
  461. list_add_tail(&msi->list, &msi_head);
  462. /*
  463. * Apply the MSI ops to all the controllers.
  464. * It doesn't hurt to reassign the same ops,
  465. * but bail out if we find another MSI driver.
  466. */
  467. list_for_each_entry(phb, &hose_list, list_node) {
  468. if (!phb->controller_ops.setup_msi_irqs) {
  469. phb->controller_ops.setup_msi_irqs = fsl_setup_msi_irqs;
  470. phb->controller_ops.teardown_msi_irqs = fsl_teardown_msi_irqs;
  471. } else if (phb->controller_ops.setup_msi_irqs != fsl_setup_msi_irqs) {
  472. dev_err(&dev->dev, "Different MSI driver already installed!\n");
  473. err = -ENODEV;
  474. goto error_out;
  475. }
  476. }
  477. return 0;
  478. error_out:
  479. fsl_of_msi_remove(dev);
  480. return err;
  481. }
  482. static const struct fsl_msi_feature mpic_msi_feature = {
  483. .fsl_pic_ip = FSL_PIC_IP_MPIC,
  484. .msiir_offset = 0x140,
  485. };
  486. static const struct fsl_msi_feature ipic_msi_feature = {
  487. .fsl_pic_ip = FSL_PIC_IP_IPIC,
  488. .msiir_offset = 0x38,
  489. };
  490. static const struct fsl_msi_feature vmpic_msi_feature = {
  491. .fsl_pic_ip = FSL_PIC_IP_VMPIC,
  492. .msiir_offset = 0,
  493. };
  494. static const struct of_device_id fsl_of_msi_ids[] = {
  495. {
  496. .compatible = "fsl,mpic-msi",
  497. .data = &mpic_msi_feature,
  498. },
  499. {
  500. .compatible = "fsl,mpic-msi-v4.3",
  501. .data = &mpic_msi_feature,
  502. },
  503. {
  504. .compatible = "fsl,ipic-msi",
  505. .data = &ipic_msi_feature,
  506. },
  507. #ifdef CONFIG_EPAPR_PARAVIRT
  508. {
  509. .compatible = "fsl,vmpic-msi",
  510. .data = &vmpic_msi_feature,
  511. },
  512. {
  513. .compatible = "fsl,vmpic-msi-v4.3",
  514. .data = &vmpic_msi_feature,
  515. },
  516. #endif
  517. {}
  518. };
  519. static struct platform_driver fsl_of_msi_driver = {
  520. .driver = {
  521. .name = "fsl-msi",
  522. .of_match_table = fsl_of_msi_ids,
  523. },
  524. .probe = fsl_of_msi_probe,
  525. .remove = fsl_of_msi_remove,
  526. };
  527. static __init int fsl_of_msi_init(void)
  528. {
  529. return platform_driver_register(&fsl_of_msi_driver);
  530. }
  531. subsys_initcall(fsl_of_msi_init);