]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/arm/mach-omap2/mailbox.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / arch / arm / mach-omap2 / mailbox.c
index 40ddecab93a9b42694216619cb4fa9834e50eb69..24b88504df0f403227c3a0e20fb229f876649902 100644 (file)
@@ -193,10 +193,12 @@ static void omap2_mbox_disable_irq(struct omap_mbox *mbox,
                omap_mbox_type_t irq)
 {
        struct omap_mbox2_priv *p = mbox->priv;
-       u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
-       l = mbox_read_reg(p->irqdisable);
-       l &= ~bit;
-       mbox_write_reg(l, p->irqdisable);
+       u32 bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
+
+       if (!cpu_is_omap44xx())
+               bit = mbox_read_reg(p->irqdisable) & ~bit;
+
+       mbox_write_reg(bit, p->irqdisable);
 }
 
 static void omap2_mbox_ack_irq(struct omap_mbox *mbox,
@@ -281,7 +283,7 @@ static struct omap_mbox_ops omap2_mbox_ops = {
 
 /* FIXME: the following structs should be filled automatically by the user id */
 
-#if defined(CONFIG_ARCH_OMAP3430) || defined(CONFIG_ARCH_OMAP2420)
+#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP2)
 /* DSP */
 static struct omap_mbox2_priv omap2_mbox_dsp_priv = {
        .tx_fifo = {
@@ -306,7 +308,7 @@ struct omap_mbox mbox_dsp_info = {
 };
 #endif
 
-#if defined(CONFIG_ARCH_OMAP3430)
+#if defined(CONFIG_ARCH_OMAP3)
 struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL };
 #endif
 
@@ -334,7 +336,7 @@ static struct omap_mbox mbox_iva_info = {
        .priv   = &omap2_mbox_iva_priv,
 };
 
-struct omap_mbox *omap2_mboxes[] = { &mbox_iva_info, &mbox_dsp_info, NULL };
+struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info, &mbox_iva_info, NULL };
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4)
@@ -394,15 +396,19 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
 
        if (false)
                ;
-#if defined(CONFIG_ARCH_OMAP3430)
-       else if (cpu_is_omap3430()) {
+#if defined(CONFIG_ARCH_OMAP3)
+       else if (cpu_is_omap34xx()) {
                list = omap3_mboxes;
 
                list[0]->irq = platform_get_irq_byname(pdev, "dsp");
        }
 #endif
-#if defined(CONFIG_ARCH_OMAP2420)
-       else if (cpu_is_omap2420()) {
+#if defined(CONFIG_ARCH_OMAP2)
+       else if (cpu_is_omap2430()) {
+               list = omap2_mboxes;
+
+               list[0]->irq = platform_get_irq_byname(pdev, "dsp");
+       } else if (cpu_is_omap2420()) {
                list = omap2_mboxes;
 
                list[0]->irq = platform_get_irq_byname(pdev, "dsp");
@@ -432,9 +438,8 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
                iounmap(mbox_base);
                return ret;
        }
-       return 0;
 
-       return ret;
+       return 0;
 }
 
 static int __devexit omap2_mbox_remove(struct platform_device *pdev)