Commit 49b2f4c5 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[media] exynos4-is: Remove support for non-dt platforms

All platforms supported by this driver are going to get device tree
support in this kernel release so remove code that would have been
actually not used any more.
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 4073f942
...@@ -140,39 +140,9 @@ You can either grep through the kernel log to find relevant information, i.e. ...@@ -140,39 +140,9 @@ You can either grep through the kernel log to find relevant information, i.e.
or retrieve the information from /dev/media? with help of the media-ctl tool: or retrieve the information from /dev/media? with help of the media-ctl tool:
# media-ctl -p # media-ctl -p
6. Platform support
===================
The machine code (arch/arm/plat-samsung and arch/arm/mach-*) must select
following options:
CONFIG_S5P_DEV_FIMC0 mandatory
CONFIG_S5P_DEV_FIMC1 \
CONFIG_S5P_DEV_FIMC2 | optional
CONFIG_S5P_DEV_FIMC3 |
CONFIG_S5P_SETUP_FIMC /
CONFIG_S5P_DEV_CSIS0 \ optional for MIPI-CSI interface
CONFIG_S5P_DEV_CSIS1 /
Except that, relevant s5p_device_fimc? should be registered in the machine code
in addition to a "s5p-fimc-md" platform device to which the media device driver
is bound. The "s5p-fimc-md" device instance is required even if only mem-to-mem
operation is used.
The description of sensor(s) attached to FIMC/MIPI-CSIS camera inputs should be
passed as the "s5p-fimc-md" device platform_data. The platform data structure
is defined in file include/media/s5p_fimc.h.
7. Build 7. Build
======== ========
This driver depends on following config options:
PLAT_S5P,
PM_RUNTIME,
I2C,
REGULATOR,
VIDEO_V4L2_SUBDEV_API,
If the driver is built as a loadable kernel module (CONFIG_VIDEO_SAMSUNG_S5P_FIMC=m) If the driver is built as a loadable kernel module (CONFIG_VIDEO_SAMSUNG_S5P_FIMC=m)
two modules are created (in addition to the core v4l2 modules): s5p-fimc.ko and two modules are created (in addition to the core v4l2 modules): s5p-fimc.ko and
optional s5p-csis.ko (MIPI-CSI receiver subdev). optional s5p-csis.ko (MIPI-CSI receiver subdev).
...@@ -7654,7 +7654,6 @@ L: linux-media@vger.kernel.org ...@@ -7654,7 +7654,6 @@ L: linux-media@vger.kernel.org
Q: https://patchwork.linuxtv.org/project/linux-media/list/ Q: https://patchwork.linuxtv.org/project/linux-media/list/
S: Supported S: Supported
F: drivers/media/platform/exynos4-is/ F: drivers/media/platform/exynos4-is/
F: include/media/s5p_fimc.h
SAMSUNG S3C24XX/S3C64XX SOC SERIES CAMIF DRIVER SAMSUNG S3C24XX/S3C64XX SOC SERIES CAMIF DRIVER
M: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> M: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
......
...@@ -3,6 +3,7 @@ config VIDEO_SAMSUNG_EXYNOS4_IS ...@@ -3,6 +3,7 @@ config VIDEO_SAMSUNG_EXYNOS4_IS
bool "Samsung S5P/EXYNOS4 SoC series Camera Subsystem driver" bool "Samsung S5P/EXYNOS4 SoC series Camera Subsystem driver"
depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
depends on (PLAT_S5P || ARCH_EXYNOS) depends on (PLAT_S5P || ARCH_EXYNOS)
depends on OF && COMMON_CLK
help help
Say Y here to enable camera host interface devices for Say Y here to enable camera host interface devices for
Samsung S5P and EXYNOS SoC series. Samsung S5P and EXYNOS SoC series.
...@@ -17,7 +18,7 @@ config VIDEO_S5P_FIMC ...@@ -17,7 +18,7 @@ config VIDEO_S5P_FIMC
depends on I2C depends on I2C
select VIDEOBUF2_DMA_CONTIG select VIDEOBUF2_DMA_CONTIG
select V4L2_MEM2MEM_DEV select V4L2_MEM2MEM_DEV
select MFD_SYSCON if OF select MFD_SYSCON
select VIDEO_EXYNOS4_IS_COMMON select VIDEO_EXYNOS4_IS_COMMON
help help
This is a V4L2 driver for Samsung S5P and EXYNOS4 SoC camera host This is a V4L2 driver for Samsung S5P and EXYNOS4 SoC camera host
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <media/s5p_fimc.h> #include <media/exynos-fimc.h>
#include "common.h" #include "common.h"
/* Called with the media graph mutex held or entity->stream_count > 0. */ /* Called with the media graph mutex held or entity->stream_count > 0. */
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <media/v4l2-device.h> #include <media/v4l2-device.h>
#include <media/v4l2-mem2mem.h> #include <media/v4l2-mem2mem.h>
#include <media/v4l2-mediabus.h> #include <media/v4l2-mediabus.h>
#include <media/s5p_fimc.h> #include <media/exynos-fimc.h>
#define dbg(fmt, args...) \ #define dbg(fmt, args...) \
pr_debug("%s:%d: " fmt "\n", __func__, __LINE__, ##args) pr_debug("%s:%d: " fmt "\n", __func__, __LINE__, ##args)
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <media/v4l2-ioctl.h> #include <media/v4l2-ioctl.h>
#include <media/videobuf2-core.h> #include <media/videobuf2-core.h>
#include <media/videobuf2-dma-contig.h> #include <media/videobuf2-dma-contig.h>
#include <media/s5p_fimc.h> #include <media/exynos-fimc.h>
#include "common.h" #include "common.h"
#include "media-dev.h" #include "media-dev.h"
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <media/videobuf2-core.h> #include <media/videobuf2-core.h>
#include <media/v4l2-device.h> #include <media/v4l2-device.h>
#include <media/v4l2-mediabus.h> #include <media/v4l2-mediabus.h>
#include <media/s5p_fimc.h> #include <media/exynos-fimc.h>
extern int fimc_isp_debug; extern int fimc_isp_debug;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <media/s5p_fimc.h> #include <media/exynos-fimc.h>
#include "fimc-lite-reg.h" #include "fimc-lite-reg.h"
#include "fimc-lite.h" #include "fimc-lite.h"
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <media/v4l2-mem2mem.h> #include <media/v4l2-mem2mem.h>
#include <media/videobuf2-core.h> #include <media/videobuf2-core.h>
#include <media/videobuf2-dma-contig.h> #include <media/videobuf2-dma-contig.h>
#include <media/s5p_fimc.h> #include <media/exynos-fimc.h>
#include "common.h" #include "common.h"
#include "fimc-core.h" #include "fimc-core.h"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <media/v4l2-ctrls.h> #include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h> #include <media/v4l2-device.h>
#include <media/v4l2-mediabus.h> #include <media/v4l2-mediabus.h>
#include <media/s5p_fimc.h> #include <media/exynos-fimc.h>
#define FIMC_LITE_DRV_NAME "exynos-fimc-lite" #define FIMC_LITE_DRV_NAME "exynos-fimc-lite"
#define FLITE_CLK_NAME "flite" #define FLITE_CLK_NAME "flite"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/regmap.h> #include <linux/regmap.h>
#include <media/s5p_fimc.h> #include <media/exynos-fimc.h>
#include "media-dev.h" #include "media-dev.h"
#include "fimc-reg.h" #include "fimc-reg.h"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <media/media-entity.h> #include <media/media-entity.h>
#include <media/v4l2-device.h> #include <media/v4l2-device.h>
#include <media/v4l2-subdev.h> #include <media/v4l2-subdev.h>
#include <media/s5p_fimc.h> #include <media/exynos-fimc.h>
#include "fimc-core.h" #include "fimc-core.h"
#include "fimc-lite.h" #include "fimc-lite.h"
...@@ -94,9 +94,7 @@ struct fimc_sensor_info { ...@@ -94,9 +94,7 @@ struct fimc_sensor_info {
}; };
struct cam_clk { struct cam_clk {
#ifdef CONFIG_COMMON_CLK
struct clk_hw hw; struct clk_hw hw;
#endif
struct fimc_md *fmd; struct fimc_md *fmd;
}; };
#define to_cam_clk(_hw) container_of(_hw, struct cam_clk, hw) #define to_cam_clk(_hw) container_of(_hw, struct cam_clk, hw)
...@@ -144,9 +142,7 @@ struct fimc_md { ...@@ -144,9 +142,7 @@ struct fimc_md {
struct cam_clk_provider { struct cam_clk_provider {
struct clk *clks[FIMC_MAX_CAMCLKS]; struct clk *clks[FIMC_MAX_CAMCLKS];
#ifdef CONFIG_COMMON_CLK
struct clk_onecell_data clk_data; struct clk_onecell_data clk_data;
#endif
struct device_node *of_node; struct device_node *of_node;
struct cam_clk camclk[FIMC_MAX_CAMCLKS]; struct cam_clk camclk[FIMC_MAX_CAMCLKS];
int num_clocks; int num_clocks;
......
...@@ -22,14 +22,13 @@ ...@@ -22,14 +22,13 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_graph.h> #include <linux/of_graph.h>
#include <linux/phy/phy.h> #include <linux/phy/phy.h>
#include <linux/platform_data/mipi-csis.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <media/s5p_fimc.h> #include <media/exynos-fimc.h>
#include <media/v4l2-of.h> #include <media/v4l2-of.h>
#include <media/v4l2-subdev.h> #include <media/v4l2-subdev.h>
...@@ -730,26 +729,6 @@ static irqreturn_t s5pcsis_irq_handler(int irq, void *dev_id) ...@@ -730,26 +729,6 @@ static irqreturn_t s5pcsis_irq_handler(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static int s5pcsis_get_platform_data(struct platform_device *pdev,
struct csis_state *state)
{
struct s5p_platform_mipi_csis *pdata = pdev->dev.platform_data;
if (pdata == NULL) {
dev_err(&pdev->dev, "Platform data not specified\n");
return -EINVAL;
}
state->clk_frequency = pdata->clk_rate;
state->num_lanes = pdata->lanes;
state->hs_settle = pdata->hs_settle;
state->index = max(0, pdev->id);
state->max_num_lanes = state->index ? CSIS1_MAX_LANES :
CSIS0_MAX_LANES;
return 0;
}
#ifdef CONFIG_OF
static int s5pcsis_parse_dt(struct platform_device *pdev, static int s5pcsis_parse_dt(struct platform_device *pdev,
struct csis_state *state) struct csis_state *state)
{ {
...@@ -787,9 +766,6 @@ static int s5pcsis_parse_dt(struct platform_device *pdev, ...@@ -787,9 +766,6 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
return 0; return 0;
} }
#else
#define s5pcsis_parse_dt(pdev, state) (-ENOSYS)
#endif
static int s5pcsis_pm_resume(struct device *dev, bool runtime); static int s5pcsis_pm_resume(struct device *dev, bool runtime);
static const struct of_device_id s5pcsis_of_match[]; static const struct of_device_id s5pcsis_of_match[];
...@@ -812,7 +788,6 @@ static int s5pcsis_probe(struct platform_device *pdev) ...@@ -812,7 +788,6 @@ static int s5pcsis_probe(struct platform_device *pdev)
spin_lock_init(&state->slock); spin_lock_init(&state->slock);
state->pdev = pdev; state->pdev = pdev;
if (dev->of_node) {
of_id = of_match_node(s5pcsis_of_match, dev->of_node); of_id = of_match_node(s5pcsis_of_match, dev->of_node);
if (WARN_ON(of_id == NULL)) if (WARN_ON(of_id == NULL))
return -EINVAL; return -EINVAL;
...@@ -821,10 +796,6 @@ static int s5pcsis_probe(struct platform_device *pdev) ...@@ -821,10 +796,6 @@ static int s5pcsis_probe(struct platform_device *pdev)
state->interrupt_mask = drv_data->interrupt_mask; state->interrupt_mask = drv_data->interrupt_mask;
ret = s5pcsis_parse_dt(pdev, state); ret = s5pcsis_parse_dt(pdev, state);
} else {
ret = s5pcsis_get_platform_data(pdev, state);
}
if (ret < 0) if (ret < 0)
return ret; return ret;
......
/*
* Copyright (C) 2010 - 2012 Samsung Electronics Co., Ltd.
*
* Samsung S5P/Exynos SoC series MIPI CSIS device support
*
* 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 __PLAT_SAMSUNG_MIPI_CSIS_H_
#define __PLAT_SAMSUNG_MIPI_CSIS_H_ __FILE__
/**
* struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver
* @clk_rate: bus clock frequency
* @wclk_source: CSI wrapper clock selection: 0 - bus clock, 1 - ext. SCLK_CAM
* @lanes: number of data lanes used
* @hs_settle: HS-RX settle time
*/
struct s5p_platform_mipi_csis {
unsigned long clk_rate;
u8 wclk_source;
u8 lanes;
u8 hs_settle;
};
#endif /* __PLAT_SAMSUNG_MIPI_CSIS_H_ */
...@@ -61,41 +61,20 @@ enum fimc_bus_type { ...@@ -61,41 +61,20 @@ enum fimc_bus_type {
#define GRP_ID_FLITE (1 << 13) #define GRP_ID_FLITE (1 << 13)
#define GRP_ID_FIMC_IS (1 << 14) #define GRP_ID_FIMC_IS (1 << 14)
struct i2c_board_info;
/** /**
* struct fimc_source_info - video source description required for the host * struct fimc_source_info - video source description required for the host
* interface configuration * interface configuration
* *
* @board_info: pointer to I2C subdevice's board info
* @clk_frequency: frequency of the clock the host interface provides to sensor
* @fimc_bus_type: FIMC camera input type * @fimc_bus_type: FIMC camera input type
* @sensor_bus_type: image sensor bus type, MIPI, ITU-R BT.601 etc. * @sensor_bus_type: image sensor bus type, MIPI, ITU-R BT.601 etc.
* @flags: the parallel sensor bus flags defining signals polarity (V4L2_MBUS_*) * @flags: the parallel sensor bus flags defining signals polarity (V4L2_MBUS_*)
* @i2c_bus_num: i2c control bus id the sensor is attached to
* @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU)
* @clk_id: index of the SoC peripheral clock for sensors
*/ */
struct fimc_source_info { struct fimc_source_info {
struct i2c_board_info *board_info;
unsigned long clk_frequency;
enum fimc_bus_type fimc_bus_type; enum fimc_bus_type fimc_bus_type;
enum fimc_bus_type sensor_bus_type; enum fimc_bus_type sensor_bus_type;
u16 flags; u16 flags;
u16 i2c_bus_num;
u16 mux_id; u16 mux_id;
u8 clk_id;
};
/**
* struct s5p_platform_fimc - camera host interface platform data
*
* @source_info: properties of an image source for the host interface setup
* @num_clients: the number of attached image sources
*/
struct s5p_platform_fimc {
struct fimc_source_info *source_info;
int num_clients;
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment