#include <linux/module.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/reset.h>
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/list.h>
#include <linux/irq.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/irqdomain.h>
#include <linux/of.h>
#include <linux/of_graph.h>
#include <drm/drm_fourcc.h>
#include <video/imx-ipu-v3.h>
#include "ipu-prv.h"
static inline u32 ipu_cm_read(struct ipu_soc *ipu, unsigned offset)
{ … }
static inline void ipu_cm_write(struct ipu_soc *ipu, u32 value, unsigned offset)
{ … }
int ipu_get_num(struct ipu_soc *ipu)
{ … }
EXPORT_SYMBOL_GPL(…);
void ipu_srm_dp_update(struct ipu_soc *ipu, bool sync)
{ … }
EXPORT_SYMBOL_GPL(…);
enum ipu_color_space ipu_drm_fourcc_to_colorspace(u32 drm_fourcc)
{ … }
EXPORT_SYMBOL_GPL(…);
enum ipu_color_space ipu_pixelformat_to_colorspace(u32 pixelformat)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_degrees_to_rot_mode(enum ipu_rotate_mode *mode, int degrees,
bool hflip, bool vflip)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_rot_mode_to_degrees(int *degrees, enum ipu_rotate_mode mode,
bool hflip, bool vflip)
{ … }
EXPORT_SYMBOL_GPL(…);
struct ipuv3_channel *ipu_idmac_get(struct ipu_soc *ipu, unsigned num)
{ … }
EXPORT_SYMBOL_GPL(…);
void ipu_idmac_put(struct ipuv3_channel *channel)
{ … }
EXPORT_SYMBOL_GPL(…);
#define idma_mask(ch) …
static void __ipu_idmac_reset_current_buffer(struct ipuv3_channel *channel)
{ … }
void ipu_idmac_set_double_buffer(struct ipuv3_channel *channel,
bool doublebuffer)
{ … }
EXPORT_SYMBOL_GPL(…);
static const struct { … } idmac_lock_en_info[] = …;
int ipu_idmac_lock_enable(struct ipuv3_channel *channel, int num_bursts)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_module_enable(struct ipu_soc *ipu, u32 mask)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_module_disable(struct ipu_soc *ipu, u32 mask)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_idmac_get_current_buffer(struct ipuv3_channel *channel)
{ … }
EXPORT_SYMBOL_GPL(…);
bool ipu_idmac_buffer_is_ready(struct ipuv3_channel *channel, u32 buf_num)
{ … }
EXPORT_SYMBOL_GPL(…);
void ipu_idmac_select_buffer(struct ipuv3_channel *channel, u32 buf_num)
{ … }
EXPORT_SYMBOL_GPL(…);
void ipu_idmac_clear_buffer(struct ipuv3_channel *channel, u32 buf_num)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_idmac_enable_channel(struct ipuv3_channel *channel)
{ … }
EXPORT_SYMBOL_GPL(…);
bool ipu_idmac_channel_busy(struct ipu_soc *ipu, unsigned int chno)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_idmac_wait_busy(struct ipuv3_channel *channel, int ms)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_idmac_disable_channel(struct ipuv3_channel *channel)
{ … }
EXPORT_SYMBOL_GPL(…);
void ipu_idmac_enable_watermark(struct ipuv3_channel *channel, bool enable)
{ … }
EXPORT_SYMBOL_GPL(…);
static int ipu_memory_reset(struct ipu_soc *ipu)
{ … }
void ipu_set_csi_src_mux(struct ipu_soc *ipu, int csi_id, bool mipi_csi2)
{ … }
EXPORT_SYMBOL_GPL(…);
void ipu_set_ic_src_mux(struct ipu_soc *ipu, int csi_id, bool vdi)
{ … }
EXPORT_SYMBOL_GPL(…);
struct fsu_link_reg_info { … };
struct fsu_link_info { … };
static const struct fsu_link_info fsu_link_info[] = …;
static const struct fsu_link_info *find_fsu_link_info(int src, int sink)
{ … }
int ipu_fsu_link(struct ipu_soc *ipu, int src_ch, int sink_ch)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_fsu_unlink(struct ipu_soc *ipu, int src_ch, int sink_ch)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_idmac_link(struct ipuv3_channel *src, struct ipuv3_channel *sink)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_idmac_unlink(struct ipuv3_channel *src, struct ipuv3_channel *sink)
{ … }
EXPORT_SYMBOL_GPL(…);
struct ipu_devtype { … };
static struct ipu_devtype ipu_type_imx51 = …;
static struct ipu_devtype ipu_type_imx53 = …;
static struct ipu_devtype ipu_type_imx6q = …;
static const struct of_device_id imx_ipu_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, imx_ipu_dt_ids);
static int ipu_submodules_init(struct ipu_soc *ipu,
struct platform_device *pdev, unsigned long ipu_base,
struct clk *ipu_clk)
{ … }
static void ipu_irq_handle(struct ipu_soc *ipu, const int *regs, int num_regs)
{ … }
static void ipu_irq_handler(struct irq_desc *desc)
{ … }
static void ipu_err_irq_handler(struct irq_desc *desc)
{ … }
int ipu_map_irq(struct ipu_soc *ipu, int irq)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipu_idmac_channel_irq(struct ipu_soc *ipu, struct ipuv3_channel *channel,
enum ipu_channel_irq irq_type)
{ … }
EXPORT_SYMBOL_GPL(…);
static void ipu_submodules_exit(struct ipu_soc *ipu)
{ … }
static int platform_remove_devices_fn(struct device *dev, void *unused)
{ … }
static void platform_device_unregister_children(struct platform_device *pdev)
{ … }
struct ipu_platform_reg { … };
static struct ipu_platform_reg client_reg[] = …;
static DEFINE_MUTEX(ipu_client_id_mutex);
static int ipu_client_id;
static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
{ … }
static int ipu_irq_init(struct ipu_soc *ipu)
{ … }
static void ipu_irq_exit(struct ipu_soc *ipu)
{ … }
void ipu_dump(struct ipu_soc *ipu)
{ … }
EXPORT_SYMBOL_GPL(…);
static int ipu_probe(struct platform_device *pdev)
{ … }
static void ipu_remove(struct platform_device *pdev)
{ … }
static struct platform_driver imx_ipu_driver = …;
static struct platform_driver * const drivers[] = …;
static int __init imx_ipu_init(void)
{ … }
module_init(…) …;
static void __exit imx_ipu_exit(void)
{ … }
module_exit(imx_ipu_exit);
MODULE_ALIAS(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;