mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 06:02:38 +00:00
[media] Visstrim M10: Add support for Coda
Support the codadx6 that is included in the i.MX27 SoC. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
186b250a07
commit
b6c14dc297
@ -32,13 +32,13 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
#include <linux/memblock.h>
|
|
||||||
#include <media/soc_camera.h>
|
#include <media/soc_camera.h>
|
||||||
#include <sound/tlv320aic32x4.h>
|
#include <sound/tlv320aic32x4.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
#include <asm/mach/time.h>
|
#include <asm/mach/time.h>
|
||||||
#include <asm/system_info.h>
|
#include <asm/system_info.h>
|
||||||
|
#include <asm/memblock.h>
|
||||||
#include <mach/common.h>
|
#include <mach/common.h>
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/iomux-mx27.h>
|
#include <mach/iomux-mx27.h>
|
||||||
@ -233,10 +233,8 @@ static void __init visstrim_camera_init(void)
|
|||||||
static void __init visstrim_reserve(void)
|
static void __init visstrim_reserve(void)
|
||||||
{
|
{
|
||||||
/* reserve 4 MiB for mx2-camera */
|
/* reserve 4 MiB for mx2-camera */
|
||||||
mx2_camera_base = memblock_alloc(MX2_CAMERA_BUF_SIZE,
|
mx2_camera_base = arm_memblock_steal(2 * MX2_CAMERA_BUF_SIZE,
|
||||||
MX2_CAMERA_BUF_SIZE);
|
MX2_CAMERA_BUF_SIZE);
|
||||||
memblock_free(mx2_camera_base, MX2_CAMERA_BUF_SIZE);
|
|
||||||
memblock_remove(mx2_camera_base, MX2_CAMERA_BUF_SIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GPIOs used as events for applications */
|
/* GPIOs used as events for applications */
|
||||||
@ -405,6 +403,23 @@ static const struct imx_ssi_platform_data visstrim_m10_ssi_pdata __initconst = {
|
|||||||
.flags = IMX_SSI_DMA | IMX_SSI_SYN,
|
.flags = IMX_SSI_DMA | IMX_SSI_SYN,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* coda */
|
||||||
|
|
||||||
|
static void __init visstrim_coda_init(void)
|
||||||
|
{
|
||||||
|
struct platform_device *pdev;
|
||||||
|
int dma;
|
||||||
|
|
||||||
|
pdev = imx27_add_coda();
|
||||||
|
dma = dma_declare_coherent_memory(&pdev->dev,
|
||||||
|
mx2_camera_base + MX2_CAMERA_BUF_SIZE,
|
||||||
|
mx2_camera_base + MX2_CAMERA_BUF_SIZE,
|
||||||
|
MX2_CAMERA_BUF_SIZE,
|
||||||
|
DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
|
||||||
|
if (!(dma & DMA_MEMORY_MAP))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
static void __init visstrim_m10_revision(void)
|
static void __init visstrim_m10_revision(void)
|
||||||
{
|
{
|
||||||
int exp_version = 0;
|
int exp_version = 0;
|
||||||
@ -468,6 +483,7 @@ static void __init visstrim_m10_board_init(void)
|
|||||||
&iclink_tvp5150, sizeof(iclink_tvp5150));
|
&iclink_tvp5150, sizeof(iclink_tvp5150));
|
||||||
gpio_led_register_device(0, &visstrim_m10_led_data);
|
gpio_led_register_device(0, &visstrim_m10_led_data);
|
||||||
visstrim_camera_init();
|
visstrim_camera_init();
|
||||||
|
visstrim_coda_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init visstrim_m10_timer_init(void)
|
static void __init visstrim_m10_timer_init(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user