blob: 7a1f5c25fd17cff568e9c158dc2b96065d777b22 [file] [log] [blame]
Hiroshi DOYU340a6142006-12-07 15:43:59 -08001/*
2 * OMAP mailbox driver
3 *
Hiroshi DOYUf48cca82009-03-23 18:07:24 -07004 * Copyright (C) 2006-2009 Nokia Corporation. All rights reserved.
Hiroshi DOYU340a6142006-12-07 15:43:59 -08005 *
Hiroshi DOYUf48cca82009-03-23 18:07:24 -07006 * Contact: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Hiroshi DOYU340a6142006-12-07 15:43:59 -08007 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23
Hiroshi DOYU340a6142006-12-07 15:43:59 -080024#include <linux/module.h>
Hiroshi DOYU340a6142006-12-07 15:43:59 -080025#include <linux/interrupt.h>
26#include <linux/device.h>
Hiroshi DOYU340a6142006-12-07 15:43:59 -080027#include <linux/delay.h>
Hiroshi DOYU8dff0fa2009-03-23 18:07:32 -070028
Russell Kinga09e64f2008-08-05 16:14:15 +010029#include <mach/mailbox.h>
Hiroshi DOYU340a6142006-12-07 15:43:59 -080030
Hiroshi DOYU7a781af2009-03-23 18:07:31 -070031static int enable_seq_bit;
32module_param(enable_seq_bit, bool, 0);
33MODULE_PARM_DESC(enable_seq_bit, "Enable sequence bit checking.");
34
Hiroshi DOYU340a6142006-12-07 15:43:59 -080035static struct omap_mbox *mboxes;
36static DEFINE_RWLOCK(mboxes_lock);
37
Hiroshi DOYU9ae0ee02009-03-23 18:07:26 -070038/*
39 * Mailbox sequence bit API
40 */
Hiroshi DOYU9ae0ee02009-03-23 18:07:26 -070041
Hiroshi DOYU9ae0ee02009-03-23 18:07:26 -070042/* seq_rcv should be initialized with any value other than
43 * 0 and 1 << 31, to allow either value for the first
44 * message. */
45static inline void mbox_seq_init(struct omap_mbox *mbox)
46{
Hiroshi DOYU7a781af2009-03-23 18:07:31 -070047 if (!enable_seq_bit)
48 return;
49
Hiroshi DOYU9ae0ee02009-03-23 18:07:26 -070050 /* any value other than 0 and 1 << 31 */
51 mbox->seq_rcv = 0xffffffff;
52}
53
54static inline void mbox_seq_toggle(struct omap_mbox *mbox, mbox_msg_t * msg)
55{
Hiroshi DOYU7a781af2009-03-23 18:07:31 -070056 if (!enable_seq_bit)
57 return;
58
Hiroshi DOYU9ae0ee02009-03-23 18:07:26 -070059 /* add seq_snd to msg */
60 *msg = (*msg & 0x7fffffff) | mbox->seq_snd;
61 /* flip seq_snd */
62 mbox->seq_snd ^= 1 << 31;
63}
64
65static inline int mbox_seq_test(struct omap_mbox *mbox, mbox_msg_t msg)
66{
Hiroshi DOYU7a781af2009-03-23 18:07:31 -070067 mbox_msg_t seq;
68
69 if (!enable_seq_bit)
70 return 0;
71
72 seq = msg & (1 << 31);
Hiroshi DOYU9ae0ee02009-03-23 18:07:26 -070073 if (seq == mbox->seq_rcv)
74 return -1;
75 mbox->seq_rcv = seq;
76 return 0;
77}
Hiroshi DOYU9ae0ee02009-03-23 18:07:26 -070078
79/* Mailbox FIFO handle functions */
80static inline mbox_msg_t mbox_fifo_read(struct omap_mbox *mbox)
81{
82 return mbox->ops->fifo_read(mbox);
83}
84static inline void mbox_fifo_write(struct omap_mbox *mbox, mbox_msg_t msg)
85{
86 mbox->ops->fifo_write(mbox, msg);
87}
88static inline int mbox_fifo_empty(struct omap_mbox *mbox)
89{
90 return mbox->ops->fifo_empty(mbox);
91}
92static inline int mbox_fifo_full(struct omap_mbox *mbox)
93{
94 return mbox->ops->fifo_full(mbox);
95}
96
97/* Mailbox IRQ handle functions */
98static inline void enable_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
99{
100 mbox->ops->enable_irq(mbox, irq);
101}
102static inline void disable_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
103{
104 mbox->ops->disable_irq(mbox, irq);
105}
106static inline void ack_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
107{
108 if (mbox->ops->ack_irq)
109 mbox->ops->ack_irq(mbox, irq);
110}
111static inline int is_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
112{
113 return mbox->ops->is_irq(mbox, irq);
114}
115
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800116/* Mailbox Sequence Bit function */
117void omap_mbox_init_seq(struct omap_mbox *mbox)
118{
119 mbox_seq_init(mbox);
120}
121EXPORT_SYMBOL(omap_mbox_init_seq);
122
123/*
124 * message sender
125 */
126static int __mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg, void *arg)
127{
128 int ret = 0, i = 1000;
129
130 while (mbox_fifo_full(mbox)) {
131 if (mbox->ops->type == OMAP_MBOX_TYPE2)
132 return -1;
133 if (--i == 0)
134 return -1;
135 udelay(1);
136 }
137
138 if (arg && mbox->txq->callback) {
139 ret = mbox->txq->callback(arg);
140 if (ret)
141 goto out;
142 }
143
144 mbox_seq_toggle(mbox, &msg);
145 mbox_fifo_write(mbox, msg);
146 out:
147 return ret;
148}
149
Tejun Heoec247512009-04-23 11:05:20 +0900150struct omap_msg_tx_data {
151 mbox_msg_t msg;
152 void *arg;
153};
154
155static void omap_msg_tx_end_io(struct request *rq, int error)
156{
157 kfree(rq->special);
158 __blk_put_request(rq->q, rq);
159}
160
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800161int omap_mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg, void* arg)
162{
Tejun Heoec247512009-04-23 11:05:20 +0900163 struct omap_msg_tx_data *tx_data;
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800164 struct request *rq;
165 struct request_queue *q = mbox->txq->queue;
Tejun Heoec247512009-04-23 11:05:20 +0900166
167 tx_data = kmalloc(sizeof(*tx_data), GFP_ATOMIC);
168 if (unlikely(!tx_data))
169 return -ENOMEM;
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800170
171 rq = blk_get_request(q, WRITE, GFP_ATOMIC);
172 if (unlikely(!rq)) {
Tejun Heoec247512009-04-23 11:05:20 +0900173 kfree(tx_data);
174 return -ENOMEM;
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800175 }
176
Tejun Heoec247512009-04-23 11:05:20 +0900177 tx_data->msg = msg;
178 tx_data->arg = arg;
179 rq->end_io = omap_msg_tx_end_io;
180 blk_insert_request(q, rq, 0, tx_data);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800181
182 schedule_work(&mbox->txq->work);
Tejun Heoec247512009-04-23 11:05:20 +0900183 return 0;
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800184}
185EXPORT_SYMBOL(omap_mbox_msg_send);
186
187static void mbox_tx_work(struct work_struct *work)
188{
189 int ret;
190 struct request *rq;
191 struct omap_mbox_queue *mq = container_of(work,
192 struct omap_mbox_queue, work);
193 struct omap_mbox *mbox = mq->queue->queuedata;
194 struct request_queue *q = mbox->txq->queue;
195
196 while (1) {
Tejun Heoec247512009-04-23 11:05:20 +0900197 struct omap_msg_tx_data *tx_data;
198
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800199 spin_lock(q->queue_lock);
200 rq = elv_next_request(q);
Tejun Heo296b2f62009-05-08 11:54:15 +0900201 if (rq)
202 blkdev_dequeue_request(rq);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800203 spin_unlock(q->queue_lock);
204
205 if (!rq)
206 break;
207
Tejun Heoec247512009-04-23 11:05:20 +0900208 tx_data = rq->special;
209
210 ret = __mbox_msg_send(mbox, tx_data->msg, tx_data->arg);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800211 if (ret) {
212 enable_mbox_irq(mbox, IRQ_TX);
Tejun Heo296b2f62009-05-08 11:54:15 +0900213 spin_lock(q->queue_lock);
214 blk_requeue_request(q, rq);
215 spin_unlock(q->queue_lock);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800216 return;
217 }
218
219 spin_lock(q->queue_lock);
Tejun Heo40cbbb72009-04-23 11:05:19 +0900220 __blk_end_request_all(rq, 0);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800221 spin_unlock(q->queue_lock);
222 }
223}
224
225/*
226 * Message receiver(workqueue)
227 */
228static void mbox_rx_work(struct work_struct *work)
229{
230 struct omap_mbox_queue *mq =
231 container_of(work, struct omap_mbox_queue, work);
232 struct omap_mbox *mbox = mq->queue->queuedata;
233 struct request_queue *q = mbox->rxq->queue;
234 struct request *rq;
235 mbox_msg_t msg;
236 unsigned long flags;
237
238 if (mbox->rxq->callback == NULL) {
Hiroshi DOYUf48cca82009-03-23 18:07:24 -0700239 sysfs_notify(&mbox->dev->kobj, NULL, "mbox");
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800240 return;
241 }
242
243 while (1) {
244 spin_lock_irqsave(q->queue_lock, flags);
245 rq = elv_next_request(q);
Tejun Heo296b2f62009-05-08 11:54:15 +0900246 if (rq)
247 blkdev_dequeue_request(rq);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800248 spin_unlock_irqrestore(q->queue_lock, flags);
249 if (!rq)
250 break;
251
Tejun Heoec247512009-04-23 11:05:20 +0900252 msg = (mbox_msg_t)rq->special;
Tejun Heo40cbbb72009-04-23 11:05:19 +0900253 blk_end_request_all(rq, 0);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800254 mbox->rxq->callback((void *)msg);
255 }
256}
257
258/*
259 * Mailbox interrupt handler
260 */
Jens Axboe165125e2007-07-24 09:28:11 +0200261static void mbox_txq_fn(struct request_queue * q)
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800262{
263}
264
Jens Axboe165125e2007-07-24 09:28:11 +0200265static void mbox_rxq_fn(struct request_queue * q)
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800266{
267}
268
269static void __mbox_tx_interrupt(struct omap_mbox *mbox)
270{
271 disable_mbox_irq(mbox, IRQ_TX);
272 ack_mbox_irq(mbox, IRQ_TX);
273 schedule_work(&mbox->txq->work);
274}
275
276static void __mbox_rx_interrupt(struct omap_mbox *mbox)
277{
278 struct request *rq;
279 mbox_msg_t msg;
Jens Axboe165125e2007-07-24 09:28:11 +0200280 struct request_queue *q = mbox->rxq->queue;
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800281
282 disable_mbox_irq(mbox, IRQ_RX);
283
284 while (!mbox_fifo_empty(mbox)) {
285 rq = blk_get_request(q, WRITE, GFP_ATOMIC);
286 if (unlikely(!rq))
287 goto nomem;
288
289 msg = mbox_fifo_read(mbox);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800290
291 if (unlikely(mbox_seq_test(mbox, msg))) {
292 pr_info("mbox: Illegal seq bit!(%08x)\n", msg);
293 if (mbox->err_notify)
294 mbox->err_notify();
295 }
296
Tejun Heoec247512009-04-23 11:05:20 +0900297 blk_insert_request(q, rq, 0, (void *)msg);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800298 if (mbox->ops->type == OMAP_MBOX_TYPE1)
299 break;
300 }
301
302 /* no more messages in the fifo. clear IRQ source. */
303 ack_mbox_irq(mbox, IRQ_RX);
304 enable_mbox_irq(mbox, IRQ_RX);
Hiroshi DOYUf48cca82009-03-23 18:07:24 -0700305nomem:
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800306 schedule_work(&mbox->rxq->work);
307}
308
309static irqreturn_t mbox_interrupt(int irq, void *p)
310{
Jeff Garzik2a7057e2007-10-26 05:40:22 -0400311 struct omap_mbox *mbox = p;
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800312
313 if (is_mbox_irq(mbox, IRQ_TX))
314 __mbox_tx_interrupt(mbox);
315
316 if (is_mbox_irq(mbox, IRQ_RX))
317 __mbox_rx_interrupt(mbox);
318
319 return IRQ_HANDLED;
320}
321
322/*
323 * sysfs files
324 */
325static ssize_t
326omap_mbox_write(struct device *dev, struct device_attribute *attr,
327 const char * buf, size_t count)
328{
329 int ret;
330 mbox_msg_t *p = (mbox_msg_t *)buf;
331 struct omap_mbox *mbox = dev_get_drvdata(dev);
332
333 for (; count >= sizeof(mbox_msg_t); count -= sizeof(mbox_msg_t)) {
334 ret = omap_mbox_msg_send(mbox, be32_to_cpu(*p), NULL);
335 if (ret)
336 return -EAGAIN;
337 p++;
338 }
339
340 return (size_t)((char *)p - buf);
341}
342
343static ssize_t
344omap_mbox_read(struct device *dev, struct device_attribute *attr, char *buf)
345{
346 unsigned long flags;
347 struct request *rq;
348 mbox_msg_t *p = (mbox_msg_t *) buf;
349 struct omap_mbox *mbox = dev_get_drvdata(dev);
350 struct request_queue *q = mbox->rxq->queue;
351
352 while (1) {
353 spin_lock_irqsave(q->queue_lock, flags);
354 rq = elv_next_request(q);
Tejun Heo296b2f62009-05-08 11:54:15 +0900355 if (rq)
356 blkdev_dequeue_request(rq);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800357 spin_unlock_irqrestore(q->queue_lock, flags);
358
359 if (!rq)
360 break;
361
Tejun Heoec247512009-04-23 11:05:20 +0900362 *p = (mbox_msg_t)rq->special;
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800363
Tejun Heo40cbbb72009-04-23 11:05:19 +0900364 blk_end_request_all(rq, 0);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800365
366 if (unlikely(mbox_seq_test(mbox, *p))) {
367 pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p);
368 continue;
369 }
370 p++;
371 }
372
373 pr_debug("%02x %02x %02x %02x\n", buf[0], buf[1], buf[2], buf[3]);
374
375 return (size_t) ((char *)p - buf);
376}
377
378static DEVICE_ATTR(mbox, S_IRUGO | S_IWUSR, omap_mbox_read, omap_mbox_write);
379
380static ssize_t mbox_show(struct class *class, char *buf)
381{
382 return sprintf(buf, "mbox");
383}
384
385static CLASS_ATTR(mbox, S_IRUGO, mbox_show, NULL);
386
387static struct class omap_mbox_class = {
Hiroshi DOYUf48cca82009-03-23 18:07:24 -0700388 .name = "omap-mailbox",
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800389};
390
391static struct omap_mbox_queue *mbox_queue_alloc(struct omap_mbox *mbox,
392 request_fn_proc * proc,
393 void (*work) (struct work_struct *))
394{
Jens Axboe165125e2007-07-24 09:28:11 +0200395 struct request_queue *q;
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800396 struct omap_mbox_queue *mq;
397
398 mq = kzalloc(sizeof(struct omap_mbox_queue), GFP_KERNEL);
399 if (!mq)
400 return NULL;
401
402 spin_lock_init(&mq->lock);
403
404 q = blk_init_queue(proc, &mq->lock);
405 if (!q)
406 goto error;
407 q->queuedata = mbox;
408 mq->queue = q;
409
410 INIT_WORK(&mq->work, work);
411
412 return mq;
413error:
414 kfree(mq);
415 return NULL;
416}
417
418static void mbox_queue_free(struct omap_mbox_queue *q)
419{
420 blk_cleanup_queue(q->queue);
421 kfree(q);
422}
423
424static int omap_mbox_init(struct omap_mbox *mbox)
425{
426 int ret;
427 struct omap_mbox_queue *mq;
428
429 if (likely(mbox->ops->startup)) {
430 ret = mbox->ops->startup(mbox);
431 if (unlikely(ret))
432 return ret;
433 }
434
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800435 ret = request_irq(mbox->irq, mbox_interrupt, IRQF_DISABLED,
436 mbox->name, mbox);
437 if (unlikely(ret)) {
438 printk(KERN_ERR
439 "failed to register mailbox interrupt:%d\n", ret);
440 goto fail_request_irq;
441 }
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800442
443 mq = mbox_queue_alloc(mbox, mbox_txq_fn, mbox_tx_work);
444 if (!mq) {
445 ret = -ENOMEM;
446 goto fail_alloc_txq;
447 }
448 mbox->txq = mq;
449
450 mq = mbox_queue_alloc(mbox, mbox_rxq_fn, mbox_rx_work);
451 if (!mq) {
452 ret = -ENOMEM;
453 goto fail_alloc_rxq;
454 }
455 mbox->rxq = mq;
456
457 return 0;
458
459 fail_alloc_rxq:
460 mbox_queue_free(mbox->txq);
461 fail_alloc_txq:
462 free_irq(mbox->irq, mbox);
463 fail_request_irq:
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800464 if (unlikely(mbox->ops->shutdown))
465 mbox->ops->shutdown(mbox);
466
467 return ret;
468}
469
470static void omap_mbox_fini(struct omap_mbox *mbox)
471{
472 mbox_queue_free(mbox->txq);
473 mbox_queue_free(mbox->rxq);
474
475 free_irq(mbox->irq, mbox);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800476
477 if (unlikely(mbox->ops->shutdown))
478 mbox->ops->shutdown(mbox);
479}
480
481static struct omap_mbox **find_mboxes(const char *name)
482{
483 struct omap_mbox **p;
484
485 for (p = &mboxes; *p; p = &(*p)->next) {
486 if (strcmp((*p)->name, name) == 0)
487 break;
488 }
489
490 return p;
491}
492
493struct omap_mbox *omap_mbox_get(const char *name)
494{
495 struct omap_mbox *mbox;
496 int ret;
497
498 read_lock(&mboxes_lock);
499 mbox = *(find_mboxes(name));
500 if (mbox == NULL) {
501 read_unlock(&mboxes_lock);
502 return ERR_PTR(-ENOENT);
503 }
504
505 read_unlock(&mboxes_lock);
506
507 ret = omap_mbox_init(mbox);
508 if (ret)
509 return ERR_PTR(-ENODEV);
510
511 return mbox;
512}
513EXPORT_SYMBOL(omap_mbox_get);
514
515void omap_mbox_put(struct omap_mbox *mbox)
516{
517 omap_mbox_fini(mbox);
518}
519EXPORT_SYMBOL(omap_mbox_put);
520
Hiroshi DOYUf48cca82009-03-23 18:07:24 -0700521int omap_mbox_register(struct device *parent, struct omap_mbox *mbox)
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800522{
523 int ret = 0;
524 struct omap_mbox **tmp;
525
526 if (!mbox)
527 return -EINVAL;
528 if (mbox->next)
529 return -EBUSY;
530
Hiroshi DOYUf48cca82009-03-23 18:07:24 -0700531 mbox->dev = device_create(&omap_mbox_class,
532 parent, 0, mbox, "%s", mbox->name);
533 if (IS_ERR(mbox->dev))
534 return PTR_ERR(mbox->dev);
535
536 ret = device_create_file(mbox->dev, &dev_attr_mbox);
537 if (ret)
538 goto err_sysfs;
539
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800540 write_lock(&mboxes_lock);
541 tmp = find_mboxes(mbox->name);
Hiroshi DOYUf48cca82009-03-23 18:07:24 -0700542 if (*tmp) {
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800543 ret = -EBUSY;
Hiroshi DOYUf48cca82009-03-23 18:07:24 -0700544 write_unlock(&mboxes_lock);
545 goto err_find;
546 }
547 *tmp = mbox;
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800548 write_unlock(&mboxes_lock);
549
Hiroshi DOYUf48cca82009-03-23 18:07:24 -0700550 return 0;
551
552err_find:
553 device_remove_file(mbox->dev, &dev_attr_mbox);
554err_sysfs:
555 device_unregister(mbox->dev);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800556 return ret;
557}
558EXPORT_SYMBOL(omap_mbox_register);
559
560int omap_mbox_unregister(struct omap_mbox *mbox)
561{
562 struct omap_mbox **tmp;
563
564 write_lock(&mboxes_lock);
565 tmp = &mboxes;
566 while (*tmp) {
567 if (mbox == *tmp) {
568 *tmp = mbox->next;
569 mbox->next = NULL;
570 write_unlock(&mboxes_lock);
Hiroshi DOYUf48cca82009-03-23 18:07:24 -0700571 device_remove_file(mbox->dev, &dev_attr_mbox);
572 device_unregister(mbox->dev);
Hiroshi DOYU340a6142006-12-07 15:43:59 -0800573 return 0;
574 }
575 tmp = &(*tmp)->next;
576 }
577 write_unlock(&mboxes_lock);
578
579 return -EINVAL;
580}
581EXPORT_SYMBOL(omap_mbox_unregister);
582
583static int __init omap_mbox_class_init(void)
584{
585 int ret = class_register(&omap_mbox_class);
586 if (!ret)
587 ret = class_create_file(&omap_mbox_class, &class_attr_mbox);
588
589 return ret;
590}
591
592static void __exit omap_mbox_class_exit(void)
593{
594 class_remove_file(&omap_mbox_class, &class_attr_mbox);
595 class_unregister(&omap_mbox_class);
596}
597
598subsys_initcall(omap_mbox_class_init);
599module_exit(omap_mbox_class_exit);
600
Hiroshi DOYUf48cca82009-03-23 18:07:24 -0700601MODULE_LICENSE("GPL v2");
602MODULE_DESCRIPTION("omap mailbox: interrupt driven messaging");
603MODULE_AUTHOR("Toshihiro Kobayashi and Hiroshi DOYU");