diff options
author | Sergio Aguirre <saaguirre@ti.com> | 2011-12-16 12:58:40 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-12-26 22:32:39 +0800 |
commit | bc7158df2b7fa8fe7ccbfd1665737639c38113a1 (patch) | |
tree | db6f26d01bfcb562c0fdd01da72eea38177c01d7 /arch | |
parent | aa9815aa78f08352ed3a5421c44076cb49237209 (diff) |
OMAP4: Add base addresses for ISS
NOTE: This isn't the whole list of features that the
ISS supports, but the only ones supported at the moment.
Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 32 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap44xx.h | 9 |
2 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index af9316c2f5a..0a3affeb9c6 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -34,6 +34,7 @@ #include <plat/omap_hwmod.h> #include <plat/omap_device.h> #include <plat/omap4-keypad.h> +#include <plat/omap4-iss.h> #include <sound/omap-abe-dsp.h> @@ -221,6 +222,37 @@ int omap3_init_camera(struct isp_platform_data *pdata) return platform_device_register(&omap3isp_device); } +int omap4_init_camera(struct iss_platform_data *pdata, struct omap_board_data *bdata) +{ + struct platform_device *pdev; + struct omap_hwmod *oh; + struct iss_platform_data *omap4iss_pdata; + char *oh_name = "iss"; + char *name = "omap4iss"; + unsigned int id = -1; + + oh = omap_hwmod_lookup(oh_name); + if (!oh) { + pr_err("Could not look up %s\n", oh_name); + return -ENODEV; + } + + omap4iss_pdata = pdata; + + pdev = omap_device_build(name, id, oh, omap4iss_pdata, + sizeof(struct iss_platform_data), NULL, 0, 0); + + if (IS_ERR(pdev)) { + WARN(1, "Can't build omap_device for %s:%s.\n", + name, oh->name); + return PTR_ERR(pdev); + } + + oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); + + return 0; +} + static inline void omap_init_camera(void) { #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h index 4bf4f56e499..d794980d83e 100644 --- a/arch/arm/plat-omap/include/plat/omap44xx.h +++ b/arch/arm/plat-omap/include/plat/omap44xx.h @@ -51,6 +51,15 @@ #define OMAP44XX_MAILBOX_BASE (L4_44XX_BASE + 0xF4000) #define OMAP44XX_HSUSB_OTG_BASE (L4_44XX_BASE + 0xAB000) +#define OMAP44XX_ISS_BASE 0x52000000 +#define OMAP44XX_ISS_TOP_BASE (OMAP44XX_ISS_BASE + 0x0) +#define OMAP44XX_ISS_CSI2_A_REGS1_BASE (OMAP44XX_ISS_BASE + 0x1000) +#define OMAP44XX_ISS_CAMERARX_CORE1_BASE (OMAP44XX_ISS_BASE + 0x1170) + +#define OMAP44XX_ISS_TOP_END (OMAP44XX_ISS_TOP_BASE + 256 - 1) +#define OMAP44XX_ISS_CSI2_A_REGS1_END (OMAP44XX_ISS_CSI2_A_REGS1_BASE + 368 - 1) +#define OMAP44XX_ISS_CAMERARX_CORE1_END (OMAP44XX_ISS_CAMERARX_CORE1_BASE + 32 - 1) + #define OMAP4_MMU1_BASE 0x55082000 #define OMAP4_MMU2_BASE 0x4A066000 |