mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 01:00:58 +07:00
bdc621fced
This is a V4L2 driver for TI OMAP1 SoC camera interface. Both videobuf-dma versions are supported, contig and sg, selectable with a module option. The former uses less processing power, but often fails to allocate contignuous buffer memory. The latter is free of this problem, but generates tens of DMA interrupts per frame. If contig memory allocation ever fails, the driver falls back to sg automatically on next open, but still can be switched back to contig manually. Both paths work stable for me, even under heavy load, on my OMAP1510 based Amstrad Delta videophone, that is the oldest, least powerfull OMAP1 implementation. The interface generally works in pass-through mode. Since input data byte endianess can be swapped, it provides up to two v4l2 pixel formats per each of several soc_mbus formats that have their swapped endian counterparts. Boards using this driver can provide it with the following platform data: - if and what freqency clock is expected by an on-board camera sensor, - what is the maximum pixel clock that should be accepted from the sensor, - what is the polarity of the sensor provided pixel clock, - if the interface GPIO line is connected to a sensor reset/powerdown input and what is the input polarity. Created and tested against linux-2.6.36-rc5 on Amstrad Delta. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
36 lines
880 B
C
36 lines
880 B
C
/*
|
|
* Header for V4L2 SoC Camera driver for OMAP1 Camera Interface
|
|
*
|
|
* Copyright (C) 2010, Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef __MEDIA_OMAP1_CAMERA_H_
|
|
#define __MEDIA_OMAP1_CAMERA_H_
|
|
|
|
#include <linux/bitops.h>
|
|
|
|
#define OMAP1_CAMERA_IOSIZE 0x1c
|
|
|
|
enum omap1_cam_vb_mode {
|
|
OMAP1_CAM_DMA_CONTIG = 0,
|
|
OMAP1_CAM_DMA_SG,
|
|
};
|
|
|
|
#define OMAP1_CAMERA_MIN_BUF_COUNT(x) ((x) == OMAP1_CAM_DMA_CONTIG ? 3 : 2)
|
|
|
|
struct omap1_cam_platform_data {
|
|
unsigned long camexclk_khz;
|
|
unsigned long lclk_khz_max;
|
|
unsigned long flags;
|
|
};
|
|
|
|
#define OMAP1_CAMERA_LCLK_RISING BIT(0)
|
|
#define OMAP1_CAMERA_RST_LOW BIT(1)
|
|
#define OMAP1_CAMERA_RST_HIGH BIT(2)
|
|
|
|
#endif /* __MEDIA_OMAP1_CAMERA_H_ */
|