]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'for-tony-mailbox'
authorTony Lindgren <tony@atomide.com>
Mon, 22 Dec 2008 15:27:47 +0000 (17:27 +0200)
committerTony Lindgren <tony@atomide.com>
Mon, 22 Dec 2008 15:27:47 +0000 (17:27 +0200)
Conflicts:

arch/arm/plat-omap/Kconfig
arch/arm/plat-omap/include/mach/omap34xx.h
arch/arm/plat-omap/mailbox.c

1  2 
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/mailbox.c
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/mailbox.c
arch/arm/plat-omap/Kconfig
arch/arm/plat-omap/include/mach/omap34xx.h

Simple merge
index 59abbf331a96b886ab8b4bbde9b84386dbe210b0,47f6eb88f420a05cb5844dcd74e10d6431c9af5a..87539db7658b348c8edcb0bbcf5eb7a1d8fe6068
  #include <linux/resource.h>
  #include <linux/interrupt.h>
  #include <linux/platform_device.h>
 +#include <linux/io.h>
  #include <mach/mailbox.h>
  #include <mach/irqs.h>
 -#include <asm/io.h>
  
+ #define DRV_NAME "omap1-mailbox"
  #define MAILBOX_ARM2DSP1              0x00
  #define MAILBOX_ARM2DSP1b             0x04
  #define MAILBOX_DSP2ARM1              0x08
index 423647e14bfc300a6795dc8ed87c19f3a7e81fbd,7c33856a17dd00028272d4a072808ef6a1aae7ef..937fb1840b7372126e76761e2a8d18ce820afed5
@@@ -37,61 -36,46 +37,62 @@@ static struct resource cam_resources[] 
                .flags          = IORESOURCE_MEM,
        },
        {
 -              .start          = OMAP2_I2C_INT2,
 +              .start          = INT_24XX_CAM_IRQ,
                .flags          = IORESOURCE_IRQ,
 -      },
 +      }
  };
  
 -static struct platform_device omap_i2c_device2 = {
 -      .name           = "i2c_omap",
 -      .id             = 2,
 -      .num_resources  = ARRAY_SIZE(i2c_resources2),
 -      .resource       = i2c_resources2,
 +static struct platform_device omap_cam_device = {
 +      .name           = "omap24xxcam",
 +      .id             = -1,
 +      .num_resources  = ARRAY_SIZE(cam_resources),
 +      .resource       = cam_resources,
  };
  
 -/* See also arch/arm/plat-omap/devices.c for first I2C on 24xx */
 -static void omap_init_i2c(void)
 +static inline void omap_init_camera(void)
  {
 -      /* REVISIT: Second I2C not in use on H4? */
 -      if (machine_is_omap_h4())
 -              return;
 -
 -      if (!cpu_is_omap2430()) {
 -              omap_cfg_reg(J15_24XX_I2C2_SCL);
 -              omap_cfg_reg(H19_24XX_I2C2_SDA);
 -      }
 -      (void) platform_device_register(&omap_i2c_device2);
 +      platform_device_register(&omap_cam_device);
  }
  
 -#else
 +#elif defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
 +
 +static struct resource cam_resources[] = {
 +      {
 +              .start          = OMAP34XX_CAMERA_BASE,
 +              .end            = OMAP34XX_CAMERA_BASE + 0x1B70,
 +              .flags          = IORESOURCE_MEM,
 +      },
 +      {
 +              .start          = INT_34XX_CAM_IRQ,
 +              .flags          = IORESOURCE_IRQ,
 +      }
 +};
  
 -static void omap_init_i2c(void) {}
 +static struct platform_device omap_cam_device = {
 +      .name           = "omap34xxcam",
 +      .id             = -1,
 +      .num_resources  = ARRAY_SIZE(cam_resources),
 +      .resource       = cam_resources,
 +};
  
 +static inline void omap_init_camera(void)
 +{
 +      platform_device_register(&omap_cam_device);
 +}
 +#else
 +static inline void omap_init_camera(void)
 +{
 +}
  #endif
  
- #if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
- #define OMAP2_MBOX_BASE               IO_ADDRESS(OMAP24XX_MAILBOX_BASE)
+ #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
  
- static struct resource mbox_resources[] = {
+ #define MBOX_REG_SIZE 0x120
+ static struct resource omap2_mbox_resources[] = {
        {
-               .start          = OMAP2_MBOX_BASE,
-               .end            = OMAP2_MBOX_BASE + 0x11f,
+               .start          = OMAP24XX_MAILBOX_BASE,
+               .end            = OMAP24XX_MAILBOX_BASE + MBOX_REG_SIZE - 1,
                .flags          = IORESOURCE_MEM,
        },
        {
index 32b7af3c610b6bad518bccc2caae5b4a9d647afb,571aea7166aaf6bc6219b1cfb7f22436e8d314cb..544dde9d07b254b546c87134d875025db702855f
  #include <linux/clk.h>
  #include <linux/err.h>
  #include <linux/platform_device.h>
 +#include <linux/io.h>
  #include <mach/mailbox.h>
  #include <mach/irqs.h>
 -#include <asm/io.h>
  
- #define MAILBOX_REVISION              0x00
- #define MAILBOX_SYSCONFIG             0x10
- #define MAILBOX_SYSSTATUS             0x14
- #define MAILBOX_MESSAGE_0             0x40
- #define MAILBOX_MESSAGE_1             0x44
- #define MAILBOX_MESSAGE_2             0x48
- #define MAILBOX_MESSAGE_3             0x4c
- #define MAILBOX_MESSAGE_4             0x50
- #define MAILBOX_MESSAGE_5             0x54
- #define MAILBOX_FIFOSTATUS_0          0x80
- #define MAILBOX_FIFOSTATUS_1          0x84
- #define MAILBOX_FIFOSTATUS_2          0x88
- #define MAILBOX_FIFOSTATUS_3          0x8c
- #define MAILBOX_FIFOSTATUS_4          0x90
- #define MAILBOX_FIFOSTATUS_5          0x94
- #define MAILBOX_MSGSTATUS_0           0xc0
- #define MAILBOX_MSGSTATUS_1           0xc4
- #define MAILBOX_MSGSTATUS_2           0xc8
- #define MAILBOX_MSGSTATUS_3           0xcc
- #define MAILBOX_MSGSTATUS_4           0xd0
- #define MAILBOX_MSGSTATUS_5           0xd4
- #define MAILBOX_IRQSTATUS_0           0x100
- #define MAILBOX_IRQENABLE_0           0x104
- #define MAILBOX_IRQSTATUS_1           0x108
- #define MAILBOX_IRQENABLE_1           0x10c
- #define MAILBOX_IRQSTATUS_2           0x110
- #define MAILBOX_IRQENABLE_2           0x114
- #define MAILBOX_IRQSTATUS_3           0x118
- #define MAILBOX_IRQENABLE_3           0x11c
- static unsigned long mbox_base;
- #define MAILBOX_IRQ_NOTFULL(n)                (1 << (2 * (n) + 1))
- #define MAILBOX_IRQ_NEWMSG(n)         (1 << (2 * (n)))
+ #define DRV_NAME "omap2-mailbox"
+ #define MAILBOX_REVISION              0x000
+ #define MAILBOX_SYSCONFIG             0x010
+ #define MAILBOX_SYSSTATUS             0x014
+ #define MAILBOX_MESSAGE(m)            (0x040 + 4 * (m))
+ #define MAILBOX_FIFOSTATUS(m)         (0x080 + 4 * (m))
+ #define MAILBOX_MSGSTATUS(m)          (0x0c0 + 4 * (m))
+ #define MAILBOX_IRQSTATUS(u)          (0x100 + 8 * (u))
+ #define MAILBOX_IRQENABLE(u)          (0x108 + 8 * (u))
+ #define MAILBOX_IRQ_NEWMSG(u)         (1 << (2 * (u)))
+ #define MAILBOX_IRQ_NOTFULL(u)                (1 << (2 * (u) + 1))
+ #define MBOX_REG_SIZE                 0x120
+ static void __iomem *mbox_base;
  
  struct omap_mbox2_fifo {
        unsigned long msg;
Simple merge
index 0a137c124907da1ae84776355a80b62161f51b34,89173f16b9b7cd95bd1d3a7c57605f051777179c..2f82e28eda0914450f3a00df11d699859a9afe0d
@@@ -63,7 -61,7 +63,8 @@@
  #define OMAP2_CM_BASE                 OMAP3430_CM_BASE
  #define OMAP2_PRM_BASE                        OMAP3430_PRM_BASE
  #define OMAP2_VA_IC_BASE              IO_ADDRESS(OMAP34XX_IC_BASE)
 +#define OMAP34XX_CAMERA_BASE          (L4_34XX_BASE + 0xBC000)
+ #define OMAP34XX_MAILBOX_BASE         (L4_34XX_BASE + 0x94000)
  
  #endif