aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/mailbox.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2010-06-11 11:51:38 -0400
committerHiroshi DOYU <Hiroshi.DOYU@nokia.com>2010-08-04 08:50:17 -0400
commit07d65d8b91c2f514e32014ae4b02f58cbd35820c (patch)
tree0cbf32b3b82a4c775f94bf3909c4743022add13d /arch/arm/mach-omap2/mailbox.c
parent909f9dc71e31e77b6a354b54141e7e9905281156 (diff)
omap: mailbox: reorganize structures
OMAP4 ones messed up the organization. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Diffstat (limited to 'arch/arm/mach-omap2/mailbox.c')
-rw-r--r--arch/arm/mach-omap2/mailbox.c68
1 files changed, 35 insertions, 33 deletions
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 8c1070c8e5b7..edcfec6ff67b 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -283,6 +283,7 @@ static struct omap_mbox_ops omap2_mbox_ops = {
283 */ 283 */
284 284
285/* FIXME: the following structs should be filled automatically by the user id */ 285/* FIXME: the following structs should be filled automatically by the user id */
286
286/* DSP */ 287/* DSP */
287static struct omap_mbox2_priv omap2_mbox_dsp_priv = { 288static struct omap_mbox2_priv omap2_mbox_dsp_priv = {
288 .tx_fifo = { 289 .tx_fifo = {
@@ -300,8 +301,40 @@ static struct omap_mbox2_priv omap2_mbox_dsp_priv = {
300 .irqdisable = MAILBOX_IRQENABLE(0), 301 .irqdisable = MAILBOX_IRQENABLE(0),
301}; 302};
302 303
303/* OMAP4 specific data structure. Use the cpu_is_omap4xxx() 304struct omap_mbox mbox_dsp_info = {
304to use this*/ 305 .name = "dsp",
306 .ops = &omap2_mbox_ops,
307 .priv = &omap2_mbox_dsp_priv,
308};
309EXPORT_SYMBOL(mbox_dsp_info);
310
311#if defined(CONFIG_ARCH_OMAP2420)
312
313/* IVA */
314static struct omap_mbox2_priv omap2_mbox_iva_priv = {
315 .tx_fifo = {
316 .msg = MAILBOX_MESSAGE(2),
317 .fifo_stat = MAILBOX_FIFOSTATUS(2),
318 },
319 .rx_fifo = {
320 .msg = MAILBOX_MESSAGE(3),
321 .msg_stat = MAILBOX_MSGSTATUS(3),
322 },
323 .irqenable = MAILBOX_IRQENABLE(3),
324 .irqstatus = MAILBOX_IRQSTATUS(3),
325 .notfull_bit = MAILBOX_IRQ_NOTFULL(2),
326 .newmsg_bit = MAILBOX_IRQ_NEWMSG(3),
327 .irqdisable = MAILBOX_IRQENABLE(3),
328};
329
330static struct omap_mbox mbox_iva_info = {
331 .name = "iva",
332 .ops = &omap2_mbox_ops,
333 .priv = &omap2_mbox_iva_priv,
334};
335#endif
336
337/* OMAP4 */
305static struct omap_mbox2_priv omap2_mbox_1_priv = { 338static struct omap_mbox2_priv omap2_mbox_1_priv = {
306 .tx_fifo = { 339 .tx_fifo = {
307 .msg = MAILBOX_MESSAGE(0), 340 .msg = MAILBOX_MESSAGE(0),
@@ -325,13 +358,6 @@ struct omap_mbox mbox_1_info = {
325}; 358};
326EXPORT_SYMBOL(mbox_1_info); 359EXPORT_SYMBOL(mbox_1_info);
327 360
328struct omap_mbox mbox_dsp_info = {
329 .name = "dsp",
330 .ops = &omap2_mbox_ops,
331 .priv = &omap2_mbox_dsp_priv,
332};
333EXPORT_SYMBOL(mbox_dsp_info);
334
335static struct omap_mbox2_priv omap2_mbox_2_priv = { 361static struct omap_mbox2_priv omap2_mbox_2_priv = {
336 .tx_fifo = { 362 .tx_fifo = {
337 .msg = MAILBOX_MESSAGE(3), 363 .msg = MAILBOX_MESSAGE(3),
@@ -355,30 +381,6 @@ struct omap_mbox mbox_2_info = {
355}; 381};
356EXPORT_SYMBOL(mbox_2_info); 382EXPORT_SYMBOL(mbox_2_info);
357 383
358#if defined(CONFIG_ARCH_OMAP2420) /* IVA */
359static struct omap_mbox2_priv omap2_mbox_iva_priv = {
360 .tx_fifo = {
361 .msg = MAILBOX_MESSAGE(2),
362 .fifo_stat = MAILBOX_FIFOSTATUS(2),
363 },
364 .rx_fifo = {
365 .msg = MAILBOX_MESSAGE(3),
366 .msg_stat = MAILBOX_MSGSTATUS(3),
367 },
368 .irqenable = MAILBOX_IRQENABLE(3),
369 .irqstatus = MAILBOX_IRQSTATUS(3),
370 .notfull_bit = MAILBOX_IRQ_NOTFULL(2),
371 .newmsg_bit = MAILBOX_IRQ_NEWMSG(3),
372 .irqdisable = MAILBOX_IRQENABLE(3),
373};
374
375static struct omap_mbox mbox_iva_info = {
376 .name = "iva",
377 .ops = &omap2_mbox_ops,
378 .priv = &omap2_mbox_iva_priv,
379};
380#endif
381
382static int __devinit omap2_mbox_probe(struct platform_device *pdev) 384static int __devinit omap2_mbox_probe(struct platform_device *pdev)
383{ 385{
384 struct resource *res; 386 struct resource *res;