fsl_msi.c 16 KB

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