omap-mailbox.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * OMAP mailbox driver
  4. *
  5. * Copyright (C) 2006-2009 Nokia Corporation. All rights reserved.
  6. * Copyright (C) 2013-2021 Texas Instruments Incorporated - https://www.ti.com
  7. *
  8. * Contact: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
  9. * Suman Anna <s-anna@ti.com>
  10. */
  11. #include <linux/interrupt.h>
  12. #include <linux/spinlock.h>
  13. #include <linux/mutex.h>
  14. #include <linux/slab.h>
  15. #include <linux/kfifo.h>
  16. #include <linux/err.h>
  17. #include <linux/io.h>
  18. #include <linux/module.h>
  19. #include <linux/of.h>
  20. #include <linux/platform_device.h>
  21. #include <linux/pm_runtime.h>
  22. #include <linux/mailbox_controller.h>
  23. #include <linux/mailbox_client.h>
  24. #include "mailbox.h"
  25. #define MAILBOX_REVISION 0x000
  26. #define MAILBOX_MESSAGE(m) (0x040 + 4 * (m))
  27. #define MAILBOX_FIFOSTATUS(m) (0x080 + 4 * (m))
  28. #define MAILBOX_MSGSTATUS(m) (0x0c0 + 4 * (m))
  29. #define OMAP2_MAILBOX_IRQSTATUS(u) (0x100 + 8 * (u))
  30. #define OMAP2_MAILBOX_IRQENABLE(u) (0x104 + 8 * (u))
  31. #define OMAP4_MAILBOX_IRQSTATUS(u) (0x104 + 0x10 * (u))
  32. #define OMAP4_MAILBOX_IRQENABLE(u) (0x108 + 0x10 * (u))
  33. #define OMAP4_MAILBOX_IRQENABLE_CLR(u) (0x10c + 0x10 * (u))
  34. #define MAILBOX_IRQSTATUS(type, u) (type ? OMAP4_MAILBOX_IRQSTATUS(u) : \
  35. OMAP2_MAILBOX_IRQSTATUS(u))
  36. #define MAILBOX_IRQENABLE(type, u) (type ? OMAP4_MAILBOX_IRQENABLE(u) : \
  37. OMAP2_MAILBOX_IRQENABLE(u))
  38. #define MAILBOX_IRQDISABLE(type, u) (type ? OMAP4_MAILBOX_IRQENABLE_CLR(u) \
  39. : OMAP2_MAILBOX_IRQENABLE(u))
  40. #define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m)))
  41. #define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1))
  42. /* Interrupt register configuration types */
  43. #define MBOX_INTR_CFG_TYPE1 0
  44. #define MBOX_INTR_CFG_TYPE2 1
  45. typedef enum {
  46. IRQ_TX = 1,
  47. IRQ_RX = 2,
  48. } omap_mbox_irq_t;
  49. struct omap_mbox_fifo {
  50. unsigned long msg;
  51. unsigned long fifo_stat;
  52. unsigned long msg_stat;
  53. unsigned long irqenable;
  54. unsigned long irqstatus;
  55. unsigned long irqdisable;
  56. u32 intr_bit;
  57. };
  58. struct omap_mbox_match_data {
  59. u32 intr_type;
  60. };
  61. struct omap_mbox_device {
  62. struct device *dev;
  63. struct mutex cfg_lock;
  64. void __iomem *mbox_base;
  65. u32 *irq_ctx;
  66. u32 num_users;
  67. u32 num_fifos;
  68. u32 intr_type;
  69. };
  70. struct omap_mbox {
  71. const char *name;
  72. int irq;
  73. struct omap_mbox_device *parent;
  74. struct omap_mbox_fifo tx_fifo;
  75. struct omap_mbox_fifo rx_fifo;
  76. u32 intr_type;
  77. struct mbox_chan *chan;
  78. bool send_no_irq;
  79. };
  80. static inline
  81. unsigned int mbox_read_reg(struct omap_mbox_device *mdev, size_t ofs)
  82. {
  83. return __raw_readl(mdev->mbox_base + ofs);
  84. }
  85. static inline
  86. void mbox_write_reg(struct omap_mbox_device *mdev, u32 val, size_t ofs)
  87. {
  88. __raw_writel(val, mdev->mbox_base + ofs);
  89. }
  90. /* Mailbox FIFO handle functions */
  91. static u32 mbox_fifo_read(struct omap_mbox *mbox)
  92. {
  93. struct omap_mbox_fifo *fifo = &mbox->rx_fifo;
  94. return mbox_read_reg(mbox->parent, fifo->msg);
  95. }
  96. static void mbox_fifo_write(struct omap_mbox *mbox, u32 msg)
  97. {
  98. struct omap_mbox_fifo *fifo = &mbox->tx_fifo;
  99. mbox_write_reg(mbox->parent, msg, fifo->msg);
  100. }
  101. static int mbox_fifo_empty(struct omap_mbox *mbox)
  102. {
  103. struct omap_mbox_fifo *fifo = &mbox->rx_fifo;
  104. return (mbox_read_reg(mbox->parent, fifo->msg_stat) == 0);
  105. }
  106. static int mbox_fifo_full(struct omap_mbox *mbox)
  107. {
  108. struct omap_mbox_fifo *fifo = &mbox->tx_fifo;
  109. return mbox_read_reg(mbox->parent, fifo->fifo_stat);
  110. }
  111. /* Mailbox IRQ handle functions */
  112. static void ack_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
  113. {
  114. struct omap_mbox_fifo *fifo = (irq == IRQ_TX) ?
  115. &mbox->tx_fifo : &mbox->rx_fifo;
  116. u32 bit = fifo->intr_bit;
  117. u32 irqstatus = fifo->irqstatus;
  118. mbox_write_reg(mbox->parent, bit, irqstatus);
  119. /* Flush posted write for irq status to avoid spurious interrupts */
  120. mbox_read_reg(mbox->parent, irqstatus);
  121. }
  122. static int is_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
  123. {
  124. struct omap_mbox_fifo *fifo = (irq == IRQ_TX) ?
  125. &mbox->tx_fifo : &mbox->rx_fifo;
  126. u32 bit = fifo->intr_bit;
  127. u32 irqenable = fifo->irqenable;
  128. u32 irqstatus = fifo->irqstatus;
  129. u32 enable = mbox_read_reg(mbox->parent, irqenable);
  130. u32 status = mbox_read_reg(mbox->parent, irqstatus);
  131. return (int)(enable & status & bit);
  132. }
  133. static void omap_mbox_enable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
  134. {
  135. u32 l;
  136. struct omap_mbox_fifo *fifo = (irq == IRQ_TX) ?
  137. &mbox->tx_fifo : &mbox->rx_fifo;
  138. u32 bit = fifo->intr_bit;
  139. u32 irqenable = fifo->irqenable;
  140. l = mbox_read_reg(mbox->parent, irqenable);
  141. l |= bit;
  142. mbox_write_reg(mbox->parent, l, irqenable);
  143. }
  144. static void omap_mbox_disable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
  145. {
  146. struct omap_mbox_fifo *fifo = (irq == IRQ_TX) ?
  147. &mbox->tx_fifo : &mbox->rx_fifo;
  148. u32 bit = fifo->intr_bit;
  149. u32 irqdisable = fifo->irqdisable;
  150. /*
  151. * Read and update the interrupt configuration register for pre-OMAP4.
  152. * OMAP4 and later SoCs have a dedicated interrupt disabling register.
  153. */
  154. if (!mbox->intr_type)
  155. bit = mbox_read_reg(mbox->parent, irqdisable) & ~bit;
  156. mbox_write_reg(mbox->parent, bit, irqdisable);
  157. }
  158. /*
  159. * Mailbox interrupt handler
  160. */
  161. static void __mbox_tx_interrupt(struct omap_mbox *mbox)
  162. {
  163. omap_mbox_disable_irq(mbox, IRQ_TX);
  164. ack_mbox_irq(mbox, IRQ_TX);
  165. mbox_chan_txdone(mbox->chan, 0);
  166. }
  167. static void __mbox_rx_interrupt(struct omap_mbox *mbox)
  168. {
  169. u32 msg;
  170. while (!mbox_fifo_empty(mbox)) {
  171. msg = mbox_fifo_read(mbox);
  172. mbox_chan_received_data(mbox->chan, (void *)(uintptr_t)msg);
  173. }
  174. /* clear IRQ source. */
  175. ack_mbox_irq(mbox, IRQ_RX);
  176. }
  177. static irqreturn_t mbox_interrupt(int irq, void *p)
  178. {
  179. struct omap_mbox *mbox = p;
  180. if (is_mbox_irq(mbox, IRQ_TX))
  181. __mbox_tx_interrupt(mbox);
  182. if (is_mbox_irq(mbox, IRQ_RX))
  183. __mbox_rx_interrupt(mbox);
  184. return IRQ_HANDLED;
  185. }
  186. static int omap_mbox_startup(struct omap_mbox *mbox)
  187. {
  188. int ret = 0;
  189. ret = request_threaded_irq(mbox->irq, NULL, mbox_interrupt,
  190. IRQF_SHARED | IRQF_ONESHOT, mbox->name,
  191. mbox);
  192. if (unlikely(ret)) {
  193. pr_err("failed to register mailbox interrupt:%d\n", ret);
  194. return ret;
  195. }
  196. if (mbox->send_no_irq)
  197. mbox->chan->txdone_method = TXDONE_BY_ACK;
  198. omap_mbox_enable_irq(mbox, IRQ_RX);
  199. return 0;
  200. }
  201. static void omap_mbox_fini(struct omap_mbox *mbox)
  202. {
  203. omap_mbox_disable_irq(mbox, IRQ_RX);
  204. free_irq(mbox->irq, mbox);
  205. }
  206. static int omap_mbox_chan_startup(struct mbox_chan *chan)
  207. {
  208. struct omap_mbox *mbox = chan->con_priv;
  209. struct omap_mbox_device *mdev = mbox->parent;
  210. int ret = 0;
  211. mutex_lock(&mdev->cfg_lock);
  212. pm_runtime_get_sync(mdev->dev);
  213. ret = omap_mbox_startup(mbox);
  214. if (ret)
  215. pm_runtime_put_sync(mdev->dev);
  216. mutex_unlock(&mdev->cfg_lock);
  217. return ret;
  218. }
  219. static void omap_mbox_chan_shutdown(struct mbox_chan *chan)
  220. {
  221. struct omap_mbox *mbox = chan->con_priv;
  222. struct omap_mbox_device *mdev = mbox->parent;
  223. mutex_lock(&mdev->cfg_lock);
  224. omap_mbox_fini(mbox);
  225. pm_runtime_put_sync(mdev->dev);
  226. mutex_unlock(&mdev->cfg_lock);
  227. }
  228. static int omap_mbox_chan_send_noirq(struct omap_mbox *mbox, u32 msg)
  229. {
  230. if (mbox_fifo_full(mbox))
  231. return -EBUSY;
  232. omap_mbox_enable_irq(mbox, IRQ_RX);
  233. mbox_fifo_write(mbox, msg);
  234. omap_mbox_disable_irq(mbox, IRQ_RX);
  235. /* we must read and ack the interrupt directly from here */
  236. mbox_fifo_read(mbox);
  237. ack_mbox_irq(mbox, IRQ_RX);
  238. return 0;
  239. }
  240. static int omap_mbox_chan_send(struct omap_mbox *mbox, u32 msg)
  241. {
  242. if (mbox_fifo_full(mbox)) {
  243. /* always enable the interrupt */
  244. omap_mbox_enable_irq(mbox, IRQ_TX);
  245. return -EBUSY;
  246. }
  247. mbox_fifo_write(mbox, msg);
  248. /* always enable the interrupt */
  249. omap_mbox_enable_irq(mbox, IRQ_TX);
  250. return 0;
  251. }
  252. static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data)
  253. {
  254. struct omap_mbox *mbox = chan->con_priv;
  255. int ret;
  256. u32 msg = (u32)(uintptr_t)(data);
  257. if (!mbox)
  258. return -EINVAL;
  259. if (mbox->send_no_irq)
  260. ret = omap_mbox_chan_send_noirq(mbox, msg);
  261. else
  262. ret = omap_mbox_chan_send(mbox, msg);
  263. return ret;
  264. }
  265. static const struct mbox_chan_ops omap_mbox_chan_ops = {
  266. .startup = omap_mbox_chan_startup,
  267. .send_data = omap_mbox_chan_send_data,
  268. .shutdown = omap_mbox_chan_shutdown,
  269. };
  270. #ifdef CONFIG_PM_SLEEP
  271. static int omap_mbox_suspend(struct device *dev)
  272. {
  273. struct omap_mbox_device *mdev = dev_get_drvdata(dev);
  274. u32 usr, fifo, reg;
  275. if (pm_runtime_status_suspended(dev))
  276. return 0;
  277. for (fifo = 0; fifo < mdev->num_fifos; fifo++) {
  278. if (mbox_read_reg(mdev, MAILBOX_MSGSTATUS(fifo))) {
  279. dev_err(mdev->dev, "fifo %d has unexpected unread messages\n",
  280. fifo);
  281. return -EBUSY;
  282. }
  283. }
  284. for (usr = 0; usr < mdev->num_users; usr++) {
  285. reg = MAILBOX_IRQENABLE(mdev->intr_type, usr);
  286. mdev->irq_ctx[usr] = mbox_read_reg(mdev, reg);
  287. }
  288. return 0;
  289. }
  290. static int omap_mbox_resume(struct device *dev)
  291. {
  292. struct omap_mbox_device *mdev = dev_get_drvdata(dev);
  293. u32 usr, reg;
  294. if (pm_runtime_status_suspended(dev))
  295. return 0;
  296. for (usr = 0; usr < mdev->num_users; usr++) {
  297. reg = MAILBOX_IRQENABLE(mdev->intr_type, usr);
  298. mbox_write_reg(mdev, mdev->irq_ctx[usr], reg);
  299. }
  300. return 0;
  301. }
  302. #endif
  303. static const struct dev_pm_ops omap_mbox_pm_ops = {
  304. SET_SYSTEM_SLEEP_PM_OPS(omap_mbox_suspend, omap_mbox_resume)
  305. };
  306. static const struct omap_mbox_match_data omap2_data = { MBOX_INTR_CFG_TYPE1 };
  307. static const struct omap_mbox_match_data omap4_data = { MBOX_INTR_CFG_TYPE2 };
  308. static const struct of_device_id omap_mailbox_of_match[] = {
  309. {
  310. .compatible = "ti,omap2-mailbox",
  311. .data = &omap2_data,
  312. },
  313. {
  314. .compatible = "ti,omap3-mailbox",
  315. .data = &omap2_data,
  316. },
  317. {
  318. .compatible = "ti,omap4-mailbox",
  319. .data = &omap4_data,
  320. },
  321. {
  322. .compatible = "ti,am654-mailbox",
  323. .data = &omap4_data,
  324. },
  325. {
  326. .compatible = "ti,am64-mailbox",
  327. .data = &omap4_data,
  328. },
  329. {
  330. /* end */
  331. },
  332. };
  333. MODULE_DEVICE_TABLE(of, omap_mailbox_of_match);
  334. static struct mbox_chan *omap_mbox_of_xlate(struct mbox_controller *controller,
  335. const struct of_phandle_args *sp)
  336. {
  337. phandle phandle = sp->args[0];
  338. struct device_node *node;
  339. struct omap_mbox_device *mdev;
  340. struct omap_mbox *mbox;
  341. int i;
  342. mdev = dev_get_drvdata(controller->dev);
  343. if (WARN_ON(!mdev))
  344. return ERR_PTR(-EINVAL);
  345. node = of_find_node_by_phandle(phandle);
  346. if (!node) {
  347. pr_err("%s: could not find node phandle 0x%x\n",
  348. __func__, phandle);
  349. return ERR_PTR(-ENODEV);
  350. }
  351. for (i = 0; i < controller->num_chans; i++) {
  352. mbox = controller->chans[i].con_priv;
  353. if (!strcmp(mbox->name, node->name)) {
  354. of_node_put(node);
  355. return &controller->chans[i];
  356. }
  357. }
  358. of_node_put(node);
  359. return ERR_PTR(-ENOENT);
  360. }
  361. static int omap_mbox_probe(struct platform_device *pdev)
  362. {
  363. int ret;
  364. struct mbox_chan *chnls;
  365. struct omap_mbox *mbox;
  366. struct omap_mbox_device *mdev;
  367. struct omap_mbox_fifo *fifo;
  368. struct device_node *node = pdev->dev.of_node;
  369. struct device_node *child;
  370. const struct omap_mbox_match_data *match_data;
  371. struct mbox_controller *controller;
  372. u32 intr_type, info_count;
  373. u32 num_users, num_fifos;
  374. u32 tmp[3];
  375. u32 l;
  376. int i;
  377. if (!node) {
  378. pr_err("%s: only DT-based devices are supported\n", __func__);
  379. return -ENODEV;
  380. }
  381. match_data = of_device_get_match_data(&pdev->dev);
  382. if (!match_data)
  383. return -ENODEV;
  384. intr_type = match_data->intr_type;
  385. if (of_property_read_u32(node, "ti,mbox-num-users", &num_users))
  386. return -ENODEV;
  387. if (of_property_read_u32(node, "ti,mbox-num-fifos", &num_fifos))
  388. return -ENODEV;
  389. info_count = of_get_available_child_count(node);
  390. if (!info_count) {
  391. dev_err(&pdev->dev, "no available mbox devices found\n");
  392. return -ENODEV;
  393. }
  394. mdev = devm_kzalloc(&pdev->dev, sizeof(*mdev), GFP_KERNEL);
  395. if (!mdev)
  396. return -ENOMEM;
  397. mdev->mbox_base = devm_platform_ioremap_resource(pdev, 0);
  398. if (IS_ERR(mdev->mbox_base))
  399. return PTR_ERR(mdev->mbox_base);
  400. mdev->irq_ctx = devm_kcalloc(&pdev->dev, num_users, sizeof(u32),
  401. GFP_KERNEL);
  402. if (!mdev->irq_ctx)
  403. return -ENOMEM;
  404. chnls = devm_kcalloc(&pdev->dev, info_count + 1, sizeof(*chnls),
  405. GFP_KERNEL);
  406. if (!chnls)
  407. return -ENOMEM;
  408. child = NULL;
  409. for (i = 0; i < info_count; i++) {
  410. int tx_id, tx_irq, tx_usr;
  411. int rx_id, rx_usr;
  412. mbox = devm_kzalloc(&pdev->dev, sizeof(*mbox), GFP_KERNEL);
  413. if (!mbox)
  414. return -ENOMEM;
  415. child = of_get_next_available_child(node, child);
  416. ret = of_property_read_u32_array(child, "ti,mbox-tx", tmp,
  417. ARRAY_SIZE(tmp));
  418. if (ret)
  419. return ret;
  420. tx_id = tmp[0];
  421. tx_irq = tmp[1];
  422. tx_usr = tmp[2];
  423. ret = of_property_read_u32_array(child, "ti,mbox-rx", tmp,
  424. ARRAY_SIZE(tmp));
  425. if (ret)
  426. return ret;
  427. rx_id = tmp[0];
  428. /* rx_irq = tmp[1]; */
  429. rx_usr = tmp[2];
  430. if (tx_id >= num_fifos || rx_id >= num_fifos ||
  431. tx_usr >= num_users || rx_usr >= num_users)
  432. return -EINVAL;
  433. fifo = &mbox->tx_fifo;
  434. fifo->msg = MAILBOX_MESSAGE(tx_id);
  435. fifo->fifo_stat = MAILBOX_FIFOSTATUS(tx_id);
  436. fifo->intr_bit = MAILBOX_IRQ_NOTFULL(tx_id);
  437. fifo->irqenable = MAILBOX_IRQENABLE(intr_type, tx_usr);
  438. fifo->irqstatus = MAILBOX_IRQSTATUS(intr_type, tx_usr);
  439. fifo->irqdisable = MAILBOX_IRQDISABLE(intr_type, tx_usr);
  440. fifo = &mbox->rx_fifo;
  441. fifo->msg = MAILBOX_MESSAGE(rx_id);
  442. fifo->msg_stat = MAILBOX_MSGSTATUS(rx_id);
  443. fifo->intr_bit = MAILBOX_IRQ_NEWMSG(rx_id);
  444. fifo->irqenable = MAILBOX_IRQENABLE(intr_type, rx_usr);
  445. fifo->irqstatus = MAILBOX_IRQSTATUS(intr_type, rx_usr);
  446. fifo->irqdisable = MAILBOX_IRQDISABLE(intr_type, rx_usr);
  447. mbox->send_no_irq = of_property_read_bool(child, "ti,mbox-send-noirq");
  448. mbox->intr_type = intr_type;
  449. mbox->parent = mdev;
  450. mbox->name = child->name;
  451. mbox->irq = platform_get_irq(pdev, tx_irq);
  452. if (mbox->irq < 0)
  453. return mbox->irq;
  454. mbox->chan = &chnls[i];
  455. chnls[i].con_priv = mbox;
  456. }
  457. mutex_init(&mdev->cfg_lock);
  458. mdev->dev = &pdev->dev;
  459. mdev->num_users = num_users;
  460. mdev->num_fifos = num_fifos;
  461. mdev->intr_type = intr_type;
  462. controller = devm_kzalloc(&pdev->dev, sizeof(*controller), GFP_KERNEL);
  463. if (!controller)
  464. return -ENOMEM;
  465. /*
  466. * OMAP/K3 Mailbox IP does not have a Tx-Done IRQ, but rather a Tx-Ready
  467. * IRQ and is needed to run the Tx state machine
  468. */
  469. controller->txdone_irq = true;
  470. controller->dev = mdev->dev;
  471. controller->ops = &omap_mbox_chan_ops;
  472. controller->chans = chnls;
  473. controller->num_chans = info_count;
  474. controller->of_xlate = omap_mbox_of_xlate;
  475. ret = devm_mbox_controller_register(mdev->dev, controller);
  476. if (ret)
  477. return ret;
  478. platform_set_drvdata(pdev, mdev);
  479. devm_pm_runtime_enable(mdev->dev);
  480. ret = pm_runtime_resume_and_get(mdev->dev);
  481. if (ret < 0)
  482. return ret;
  483. /*
  484. * just print the raw revision register, the format is not
  485. * uniform across all SoCs
  486. */
  487. l = mbox_read_reg(mdev, MAILBOX_REVISION);
  488. dev_info(mdev->dev, "omap mailbox rev 0x%x\n", l);
  489. ret = pm_runtime_put_sync(mdev->dev);
  490. if (ret < 0 && ret != -ENOSYS)
  491. return ret;
  492. return 0;
  493. }
  494. static struct platform_driver omap_mbox_driver = {
  495. .probe = omap_mbox_probe,
  496. .driver = {
  497. .name = "omap-mailbox",
  498. .pm = &omap_mbox_pm_ops,
  499. .of_match_table = omap_mailbox_of_match,
  500. },
  501. };
  502. module_platform_driver(omap_mbox_driver);
  503. MODULE_LICENSE("GPL v2");
  504. MODULE_DESCRIPTION("omap mailbox: interrupt driven messaging");
  505. MODULE_AUTHOR("Toshihiro Kobayashi");
  506. MODULE_AUTHOR("Hiroshi DOYU");