diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2010-06-11 11:51:38 -0400 |
---|---|---|
committer | Hiroshi DOYU <Hiroshi.DOYU@nokia.com> | 2010-08-04 08:50:17 -0400 |
commit | 07d65d8b91c2f514e32014ae4b02f58cbd35820c (patch) | |
tree | 0cbf32b3b82a4c775f94bf3909c4743022add13d /arch/arm/mach-omap2/mailbox.c | |
parent | 909f9dc71e31e77b6a354b54141e7e9905281156 (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.c | 68 |
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 */ |
287 | static struct omap_mbox2_priv omap2_mbox_dsp_priv = { | 288 | static 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() | 304 | struct omap_mbox mbox_dsp_info = { |
304 | to use this*/ | 305 | .name = "dsp", |
306 | .ops = &omap2_mbox_ops, | ||
307 | .priv = &omap2_mbox_dsp_priv, | ||
308 | }; | ||
309 | EXPORT_SYMBOL(mbox_dsp_info); | ||
310 | |||
311 | #if defined(CONFIG_ARCH_OMAP2420) | ||
312 | |||
313 | /* IVA */ | ||
314 | static 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 | |||
330 | static 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 */ | ||
305 | static struct omap_mbox2_priv omap2_mbox_1_priv = { | 338 | static 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 | }; |
326 | EXPORT_SYMBOL(mbox_1_info); | 359 | EXPORT_SYMBOL(mbox_1_info); |
327 | 360 | ||
328 | struct omap_mbox mbox_dsp_info = { | ||
329 | .name = "dsp", | ||
330 | .ops = &omap2_mbox_ops, | ||
331 | .priv = &omap2_mbox_dsp_priv, | ||
332 | }; | ||
333 | EXPORT_SYMBOL(mbox_dsp_info); | ||
334 | |||
335 | static struct omap_mbox2_priv omap2_mbox_2_priv = { | 361 | static 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 | }; |
356 | EXPORT_SYMBOL(mbox_2_info); | 382 | EXPORT_SYMBOL(mbox_2_info); |
357 | 383 | ||
358 | #if defined(CONFIG_ARCH_OMAP2420) /* IVA */ | ||
359 | static 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 | |||
375 | static struct omap_mbox mbox_iva_info = { | ||
376 | .name = "iva", | ||
377 | .ops = &omap2_mbox_ops, | ||
378 | .priv = &omap2_mbox_iva_priv, | ||
379 | }; | ||
380 | #endif | ||
381 | |||
382 | static int __devinit omap2_mbox_probe(struct platform_device *pdev) | 384 | static int __devinit omap2_mbox_probe(struct platform_device *pdev) |
383 | { | 385 | { |
384 | struct resource *res; | 386 | struct resource *res; |