Samsung S5P SoC camera interface driver
Subsystems (4)
v3 cover Samsung S5P SoC camera interface driver
Hello,
This is a third version of my patch series adding support for camera interface, video output and video processing IP contained in Samsung's S3C/S5P SoCs.
Changes since v1:
- support for multiple SoC variants through the platform device name overriding (S5PC100 and SPV210 version definitions included)
Changes since v2:
- reworked register definition, minor synchronization fixes, whitespace cleanup
- removed support for FIFO mode output to the lcd controller due to hardware limitations (removed fifo link and platform data setup code and v4l2_subdevice in s3c-fb driver)
The following patch series contains:
[PATCH v3 1/8] ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface [PATCH v3 2/8] v4l: Add driver for Samsung S3C/S5P SoC video postprocessor [PATCH v3 3/8] ARM: Samsung: Add platform definitions and helpers for FIMC driver [PATCH v3 4/8] ARM: Samsung: Add common Aquila and GONI code
[PATCH v3 5/8] ARM: s5pv210: enable FIMC on Aquila
[PATCH v3 6/8] ARM: s5pv210: enable FIMC on Goni
[PATCH v3 7/8] ARM: S5PC100: enable FIMC on SMDKC100
[PATCH v3 8/8] ARM: s5pv210: Override FIMC driver name on Aquila board
Best regards,
--
Sylwester Nawrocki
Linux Platform Group
Samsung Poland R&D Center
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
Add register definitions for the camera interface/video postprocessor contained in Samsung's S5P SoC series.
--- arch/arm/plat-samsung/include/plat/regs-fimc.h | 294 ++++++++++++++++++++++++ 1 files changed, 294 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-samsung/include/plat/regs-fimc.h
arch/arm/plat-samsung/include/plat/regs-fimc.h new file +294 -0
@@ -0,0 +1,294 @@ +/* arch/arm/plat-s5p/include/plat/regs-fimc.h +* +* Register definition file for Samsung Camera Interface (FIMC) driver +* +* Copyright (c) 2010 Samsung Electronics +* +* 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 REGS_FIMC_H_ +#define REGS_FIMC_H_ + +#define S5P_CIOYSA (__x) (0x18 + (__x) * 4) +#define S5P_CIOCBSA (__x) (0x28 + (__x) * 4) +#define S5P_CIOCRSA (__x) (0x38 + (__x) * 4) + +/* Input source format */ +#define S5P_CISRCFMT 0x00 +#define S5P_CISRCFMT_ITU601_8BIT (1 << 31) +#define S5P_CISRCFMT_ITU601_16BIT (1 << 29) +#define S5P_CISRCFMT_ORDER422_YCBYCR (0 << 14) +#define S5P_CISRCFMT_ORDER422_YCRYCB (1 << 14) +#define S5P_CISRCFMT_ORDER422_CBYCRY (2 << 14) +#define S5P_CISRCFMT_ORDER422_CRYCBY (3 << 14) +#define S5P_CISRCFMT_HSIZE (x) ((x) << 16) +#define S5P_CISRCFMT_VSIZE (x) ((x) << 0) + +/* Window offset */ +#define S5P_CIWDOFST 0x04 +#define S5P_CIWDOFST_WINOFSEN (1 << 31) +#define S5P_CIWDOFST_CLROVFIY (1 << 30) +#define S5P_CIWDOFST_CLROVRLB (1 << 29) +#define S5P_CIWDOFST_WINHOROFST_MASK (0x7ff << 16) +#define S5P_CIWDOFST_CLROVFICB (1 << 15) +#define S5P_CIWDOFST_CLROVFICR (1 << 14) +#define S5P_CIWDOFST_WINHOROFST (x) ((x) << 16) +#define S5P_CIWDOFST_WINVEROFST (x) ((x) << 0) +#define S5P_CIWDOFST_WINVEROFST_MASK (0xfff << 0) + +/* Global control */ +#define S5P_CIGCTRL 0x08 +#define S5P_CIGCTRL_SWRST (1 << 31) +#define S5P_CIGCTRL_CAMRST_A (1 << 30) +#define S5P_CIGCTRL_SELCAM_ITU_A (1 << 29) +#define S5P_CIGCTRL_SELCAM_ITU_MASK (1 << 29) +#define S5P_CIGCTRL_TESTPAT_NORMAL (0 << 27) +#define S5P_CIGCTRL_TESTPAT_COLOR_BAR (1 << 27) +#define S5P_CIGCTRL_TESTPAT_HOR_INC (2 << 27) +#define S5P_CIGCTRL_TESTPAT_VER_INC (3 << 27) +#define S5P_CIGCTRL_TESTPAT_MASK (3 << 27) +#define S5P_CIGCTRL_TESTPAT_SHIFT (27) +#define S5P_CIGCTRL_INVPOLPCLK (1 << 26) +#define S5P_CIGCTRL_INVPOLVSYNC (1 << 25) +#define S5P_CIGCTRL_INVPOLHREF (1 << 24) +#define S5P_CIGCTRL_IRQ_OVFEN (1 << 22) +#define S5P_CIGCTRL_HREF_MASK (1 << 21) +#define S5P_CIGCTRL_IRQ_LEVEL (1 << 20) +#define S5P_CIGCTRL_IRQ_CLR (1 << 19) +#define S5P_CIGCTRL_IRQ_ENABLE (1 << 16) +#define S5P_CIGCTRL_SHDW_DISABLE (1 << 12) +#define S5P_CIGCTRL_SELCAM_MIPI_A (1 << 7) +#define S5P_CIGCTRL_CAMIF_SELWB (1 << 6) +#define S5P_CIGCTRL_INVPOLHSYNC (1 << 4) +#define S5P_CIGCTRL_SELCAM_MIPI (1 << 3) +#define S5P_CIGCTRL_INTERLACE (1 << 0) + +/* Window offset 2 */ +#define S5P_CIWDOFST2 0x14 +#define S5P_CIWDOFST2_HOROFF_MASK (0xfff << 16) +#define S5P_CIWDOFST2_VEROFF_MASK (0xfff << 0) +#define S5P_CIWDOFST2_HOROFF (x) ((x) << 16) +#define S5P_CIWDOFST2_VEROFF (x) ((x) << 0) + +/* Output DMA Y plane start address */ +#define S5P_CIOYSA1 0x18 +#define S5P_CIOYSA2 0x1c +#define S5P_CIOYSA3 0x20 +#define S5P_CIOYSA4 0x24 + +/* Output DMA Cb plane start address */ +#define S5P_CIOCBSA1 0x28 +#define S5P_CIOCBSA2 0x2c +#define S5P_CIOCBSA3 0x30 +#define S5P_CIOCBSA4 0x34 + +/* Output DMA Cr plane start address */ +#define S5P_CIOCRSA1 0x38 +#define S5P_CIOCRSA2 0x3c +#define S5P_CIOCRSA3 0x40 +#define S5P_CIOCRSA4 0x44 + +/* Target image format */ +#define S5P_CITRGFMT 0x48 +#define S5P_CITRGFMT_INROT90 (1 << 31) +#define S5P_CITRGFMT_YCBCR420 (0 << 29) +#define S5P_CITRGFMT_YCBCR422 (1 << 29) +#define S5P_CITRGFMT_YCBCR422_1P (2 << 29) +#define S5P_CITRGFMT_RGB (3 << 29) +#define S5P_CITRGFMT_FMT_MASK (3 << 29) +#define S5P_CITRGFMT_HSIZE_MASK (0xfff << 16) +#define S5P_CITRGFMT_FLIP_SHIFT (14) +#define S5P_CITRGFMT_FLIP_NORMAL (0 << 14) +#define S5P_CITRGFMT_FLIP_X_MIRROR (1 << 14) +#define S5P_CITRGFMT_FLIP_Y_MIRROR (2 << 14) +#define S5P_CITRGFMT_FLIP_180 (3 << 14) +#define S5P_CITRGFMT_FLIP_MASK (3 << 14) +#define S5P_CITRGFMT_OUTROT90 (1 << 13) +#define S5P_CITRGFMT_VSIZE_MASK (0xfff << 0) +#define S5P_CITRGFMT_HSIZE (x) ((x) << 16) +#define S5P_CITRGFMT_VSIZE (x) ((x) << 0) + +/* Output DMA control */ +#define S5P_CIOCTRL 0x4c +#define S5P_CIOCTRL_ORDER422_MASK (3 << 0) +#define S5P_CIOCTRL_ORDER422_CRYCBY (0 << 0) +#define S5P_CIOCTRL_ORDER422_YCRYCB (1 << 0) +#define S5P_CIOCTRL_ORDER422_CBYCRY (2 << 0) +#define S5P_CIOCTRL_ORDER422_YCBYCR (3 << 0) +#define S5P_CIOCTRL_LASTIRQ_ENABLE (1 << 2) +#define S5P_CIOCTRL_YCBCR_3PLANE (0 << 3) +#define S5P_CIOCTRL_YCBCR_2PLANE (1 << 3) +#define S5P_CIOCTRL_YCBCR_PLANE_MASK (1 << 3) +#define S5P_CIOCTRL_ORDER2P_SHIFT (24) +#define S5P_CIOCTRL_ORDER2P_MASK (3 << 24) +#define S5P_CIOCTRL_ORDER422_2P_LSB_CRCB (0 << 24) + +/* Pre-scaler control 1 */ +#define S5P_CISCPRERATIO 0x50 +#define S5P_CISCPRERATIO_SHFACTOR (x) ((x) << 28) +#define S5P_CISCPRERATIO_HOR (x) ((x) << 16) +#define S5P_CISCPRERATIO_VER (x) ((x) << 0) + +#define S5P_CISCPREDST 0x54 +#define S5P_CISCPREDST_WIDTH (x) ((x) << 16) +#define S5P_CISCPREDST_HEIGHT (x) ((x) << 0) + +/* Main scaler control */ +#define S5P_CISCCTRL 0x58 +#define S5P_CISCCTRL_SCALERBYPASS (1 << 31) +#define S5P_CISCCTRL_SCALEUP_H (1 << 30) +#define S5P_CISCCTRL_SCALEUP_V (1 << 29) +#define S5P_CISCCTRL_CSCR2Y_WIDE (1 << 28) +#define S5P_CISCCTRL_CSCY2R_WIDE (1 << 27) +#define S5P_CISCCTRL_LCDPATHEN_FIFO (1 << 26) +#define S5P_CISCCTRL_INTERLACE (1 << 25) +#define S5P_CISCCTRL_SCALERSTART (1 << 15) +#define S5P_CISCCTRL_INRGB_FMT_RGB565 (0 << 13) +#define S5P_CISCCTRL_INRGB_FMT_RGB666 (1 << 13) +#define S5P_CISCCTRL_INRGB_FMT_RGB888 (2 << 13) +#define S5P_CISCCTRL_INRGB_FMT_MASK (3 << 13) +#define S5P_CISCCTRL_OUTRGB_FMT_RGB565 (0 << 11) +#define S5P_CISCCTRL_OUTRGB_FMT_RGB666 (1 << 11) +#define S5P_CISCCTRL_OUTRGB_FMT_RGB888 (2 << 11) +#define S5P_CISCCTRL_OUTRGB_FMT_MASK (3 << 11) +#define S5P_CISCCTRL_RGB_EXT (1 << 10) +#define S5P_CISCCTRL_ONE2ONE (1 << 9) +#define S5P_CISCCTRL_SC_HORRATIO (x) ((x) << 16) +#define S5P_CISCCTRL_SC_VERRATIO (x) ((x) << 0) + +/* Target area */ +#define S5P_CITAREA 0x5c +#define S5P_CITAREA_MASK 0x0fffffff + +/* General status */ +#define S5P_CISTATUS 0x64 +#define S5P_CISTATUS_OVFIY (1 << 31) +#define S5P_CISTATUS_OVFICB (1 << 30) +#define S5P_CISTATUS_OVFICR (1 << 29) +#define S5P_CISTATUS_VSYNC (1 << 28) +#define S5P_CISTATUS_WINOFF_EN (1 << 25) +#define S5P_CISTATUS_IMGCPT_EN (1 << 22) +#define S5P_CISTATUS_IMGCPT_SCEN (1 << 21) +#define S5P_CISTATUS_VSYNC_A (1 << 20) +#define S5P_CISTATUS_VSYNC_B (1 << 19) +#define S5P_CISTATUS_OVRLB (1 << 18) +#define S5P_CISTATUS_FRAME_END (1 << 17) +#define S5P_CISTATUS_LASTCAPT_END (1 << 16) +#define S5P_CISTATUS_VVALID_A (1 << 15) +#define S5P_CISTATUS_VVALID_B (1 << 14) + +/* Image capture control */ +#define S5P_CIIMGCPT 0xc0 +#define S5P_CIIMGCPT_IMGCPTEN (1 << 31) +#define S5P_CIIMGCPT_IMGCPTEN_SC (1 << 30) +#define S5P_CIIMGCPT_CPT_FREN_ENABLE (1 << 25) +#define S5P_CIIMGCPT_CPT_FRMOD_CNT (1 << 18) + +/* Frame capture sequence */ +#define S5P_CICPTSEQ 0xc4 + +/* Image effect */ +#define S5P_CIIMGEFF 0xd0 +#define S5P_CIIMGEFF_IE_DISABLE (0 << 30) +#define S5P_CIIMGEFF_IE_ENABLE (1 << 30) +#define S5P_CIIMGEFF_IE_SC_BEFORE (0 << 29) +#define S5P_CIIMGEFF_IE_SC_AFTER (1 << 29) +#define S5P_CIIMGEFF_FIN_BYPASS (0 << 26) +#define S5P_CIIMGEFF_FIN_ARBITRARY (1 << 26) +#define S5P_CIIMGEFF_FIN_NEGATIVE (2 << 26) +#define S5P_CIIMGEFF_FIN_ARTFREEZE (3 << 26) +#define S5P_CIIMGEFF_FIN_EMBOSSING (4 << 26) +#define S5P_CIIMGEFF_FIN_SILHOUETTE (5 << 26) +#define S5P_CIIMGEFF_FIN_MASK (7 << 26) +#define S5P_CIIMGEFF_PAT_CBCR_MASK ((0xff < 13) | (0xff < 0)) +#define S5P_CIIMGEFF_PAT_CB (x) ((x) << 13) +#define S5P_CIIMGEFF_PAT_CR (x) ((x) << 0) + +/* Input DMA Y/Cb/Cr plane start address 0 */ +#define S5P_CIIYSA0 0xd4 +#define S5P_CIICBSA0 0xd8 +#define S5P_CIICRSA0 0xdc + +/* Real input DMA image size */ +#define S5P_CIREAL_ISIZE 0xf8 +#define S5P_CIREAL_ISIZE_AUTOLOAD_EN (1 << 31) +#define S5P_CIREAL_ISIZE_ADDR_CH_DIS (1 << 30) +#define S5P_CIREAL_ISIZE_HEIGHT (x) ((x) << 16) +#define S5P_CIREAL_ISIZE_WIDTH (x) ((x) << 0) + + +/* Input DMA control */ +#define S5P_MSCTRL 0xfc +#define S5P_MSCTRL_IN_BURST_COUNT_MASK (3 << 24) +#define S5P_MSCTRL_2P_IN_ORDER_MASK (3 << 16) +#define S5P_MSCTRL_2P_IN_ORDER_SHIFT 16 +#define S5P_MSCTRL_C_INT_IN_3PLANE (0 << 15) +#define S5P_MSCTRL_C_INT_IN_2PLANE (1 << 15) +#define S5P_MSCTRL_C_INT_IN_MASK (1 << 15) +#define S5P_MSCTRL_FLIP_SHIFT 13 +#define S5P_MSCTRL_FLIP_MASK (3 << 13) +#define S5P_MSCTRL_FLIP_NORMAL (0 << 13) +#define S5P_MSCTRL_FLIP_X_MIRROR (1 << 13) +#define S5P_MSCTRL_FLIP_Y_MIRROR (2 << 13) +#define S5P_MSCTRL_FLIP_180 (3 << 13) +#define S5P_MSCTRL_ORDER422_SHIFT 4 +#define S5P_MSCTRL_ORDER422_CRYCBY (0 << 4) +#define S5P_MSCTRL_ORDER422_YCRYCB (1 << 4) +#define S5P_MSCTRL_ORDER422_CBYCRY (2 << 4) +#define S5P_MSCTRL_ORDER422_YCBYCR (3 << 4) +#define S5P_MSCTRL_ORDER422_MASK (3 << 4) +#define S5P_MSCTRL_INPUT_EXTCAM (0 << 3) +#define S5P_MSCTRL_INPUT_MEMORY (1 << 3) +#define S5P_MSCTRL_INPUT_MASK (1 << 3) +#define S5P_MSCTRL_INFORMAT_YCBCR420 (0 << 1) +#define S5P_MSCTRL_INFORMAT_YCBCR422 (1 << 1) +#define S5P_MSCTRL_INFORMAT_YCBCR422_1P (2 << 1) +#define S5P_MSCTRL_INFORMAT_RGB (3 << 1) +#define S5P_MSCTRL_INFORMAT_MASK (3 << 1) +#define S5P_MSCTRL_ENVID (1 << 0) +#define S5P_MSCTRL_FRAME_COUNT (x) ((x) << 24) + +/* Input DMA Y/Cb/Cr plane start address 1 */ +#define S5P_CIIYSA1 0x144 +#define S5P_CIICBSA1 0x148 +#define S5P_CIICRSA1 0x14c + +/* Output DMA Y/Cb/Cr offset */ +#define S5P_CIOYOFF 0x168 +#define S5P_CIOCBOFF 0x16c +#define S5P_CIOCROFF 0x170 + +/* Input DMA Y/Cb/Cr offset */ +#define S5P_CIIYOFF 0x174 +#define S5P_CIICBOFF 0x178 +#define S5P_CIICROFF 0x17c + +#define S5P_CIO_OFFS_VER (x) ((x) << 16) +#define S5P_CIO_OFFS_HOR (x) ((x) << 0) + +/* Input DMA original image size */ +#define S5P_ORGISIZE 0x180 + +/* Output DMA original image size */ +#define S5P_ORGOSIZE 0x184 + +#define S5P_ORIG_SIZE_VER (x) ((x) << 16) +#define S5P_ORIG_SIZE_HOR (x) ((x) << 0) + +/* Real output DMA image size (extension register) */ +#define S5P_CIEXTEN 0x188 + +#define S5P_CIDMAPARAM 0x18c +#define S5P_CIDMAPARAM_R_LINEAR (0 << 29) +#define S5P_CIDMAPARAM_R_64X32 (3 << 29) +#define S5P_CIDMAPARAM_W_LINEAR (0 << 13) +#define S5P_CIDMAPARAM_W_64X32 (3 << 13) +#define S5P_CIDMAPARAM_TILE_MASK ((3 << 29) | (3 << 13)) + +/* MIPI CSI image format */ +#define S5P_CSIIMGFMT 0x194 + +#endif /* REGS_FIMC_H_ */
Signature · 1 line
1.7.2
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
Quoted 8 lines · Sylwester Nawrocki
Add register definitions for the camera interface/video postprocessor contained in Samsung's S5P SoC series.
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Reviewed-by Pawel Osciak <[email protected]>Reviewed-by Marek Szyprowski <[email protected]>
Review
Quoted 7 lines
--- arch/arm/plat-samsung/include/plat/regs-fimc.h | 294 ++++++++++++++++++++++++ 1 files changed, 294 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-samsung/include/plat/regs-fimc.h(quoted diff) +0
-0
b/arch/arm/plat-
Quoted 291 lines
samsung/include/plat/regs-fimc.h
new file mode 100644
index 0000000..7f3141carch/arm/plat-samsung/include/plat/regs-fimc.h new file +285
-0@@ -0,0 +1,294 @@ +/* arch/arm/plat-s5p/include/plat/regs-fimc.h +* +* Register definition file for Samsung Camera Interface (FIMC) driver +* +* Copyright (c) 2010 Samsung Electronics +* +* 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 REGS_FIMC_H_ +#define REGS_FIMC_H_ + +#define S5P_CIOYSA (__x) (0x18 + (__x) * 4) +#define S5P_CIOCBSA (__x) (0x28 + (__x) * 4) +#define S5P_CIOCRSA (__x) (0x38 + (__x) * 4) + +/* Input source format */ +#define S5P_CISRCFMT 0x00 +#define S5P_CISRCFMT_ITU601_8BIT (1 << 31) +#define S5P_CISRCFMT_ITU601_16BIT (1 << 29) +#define S5P_CISRCFMT_ORDER422_YCBYCR (0 << 14) +#define S5P_CISRCFMT_ORDER422_YCRYCB (1 << 14) +#define S5P_CISRCFMT_ORDER422_CBYCRY (2 << 14) +#define S5P_CISRCFMT_ORDER422_CRYCBY (3 << 14) +#define S5P_CISRCFMT_HSIZE (x) ((x) << 16) +#define S5P_CISRCFMT_VSIZE (x) ((x) << 0) + +/* Window offset */ +#define S5P_CIWDOFST 0x04 +#define S5P_CIWDOFST_WINOFSEN (1 << 31) +#define S5P_CIWDOFST_CLROVFIY (1 << 30) +#define S5P_CIWDOFST_CLROVRLB (1 << 29) +#define S5P_CIWDOFST_WINHOROFST_MASK (0x7ff << 16) +#define S5P_CIWDOFST_CLROVFICB (1 << 15) +#define S5P_CIWDOFST_CLROVFICR (1 << 14) +#define S5P_CIWDOFST_WINHOROFST (x) ((x) << 16) +#define S5P_CIWDOFST_WINVEROFST (x) ((x) << 0) +#define S5P_CIWDOFST_WINVEROFST_MASK (0xfff << 0) + +/* Global control */ +#define S5P_CIGCTRL 0x08 +#define S5P_CIGCTRL_SWRST (1 << 31) +#define S5P_CIGCTRL_CAMRST_A (1 << 30) +#define S5P_CIGCTRL_SELCAM_ITU_A (1 << 29) +#define S5P_CIGCTRL_SELCAM_ITU_MASK (1 << 29) +#define S5P_CIGCTRL_TESTPAT_NORMAL (0 << 27) +#define S5P_CIGCTRL_TESTPAT_COLOR_BAR (1 << 27) +#define S5P_CIGCTRL_TESTPAT_HOR_INC (2 << 27) +#define S5P_CIGCTRL_TESTPAT_VER_INC (3 << 27) +#define S5P_CIGCTRL_TESTPAT_MASK (3 << 27) +#define S5P_CIGCTRL_TESTPAT_SHIFT (27) +#define S5P_CIGCTRL_INVPOLPCLK (1 << 26) +#define S5P_CIGCTRL_INVPOLVSYNC (1 << 25) +#define S5P_CIGCTRL_INVPOLHREF (1 << 24) +#define S5P_CIGCTRL_IRQ_OVFEN (1 << 22) +#define S5P_CIGCTRL_HREF_MASK (1 << 21) +#define S5P_CIGCTRL_IRQ_LEVEL (1 << 20) +#define S5P_CIGCTRL_IRQ_CLR (1 << 19) +#define S5P_CIGCTRL_IRQ_ENABLE (1 << 16) +#define S5P_CIGCTRL_SHDW_DISABLE (1 << 12) +#define S5P_CIGCTRL_SELCAM_MIPI_A (1 << 7) +#define S5P_CIGCTRL_CAMIF_SELWB (1 << 6) +#define S5P_CIGCTRL_INVPOLHSYNC (1 << 4) +#define S5P_CIGCTRL_SELCAM_MIPI (1 << 3) +#define S5P_CIGCTRL_INTERLACE (1 << 0) + +/* Window offset 2 */ +#define S5P_CIWDOFST2 0x14 +#define S5P_CIWDOFST2_HOROFF_MASK (0xfff << 16) +#define S5P_CIWDOFST2_VEROFF_MASK (0xfff << 0) +#define S5P_CIWDOFST2_HOROFF (x) ((x) << 16) +#define S5P_CIWDOFST2_VEROFF (x) ((x) << 0) + +/* Output DMA Y plane start address */ +#define S5P_CIOYSA1 0x18 +#define S5P_CIOYSA2 0x1c +#define S5P_CIOYSA3 0x20 +#define S5P_CIOYSA4 0x24 + +/* Output DMA Cb plane start address */ +#define S5P_CIOCBSA1 0x28 +#define S5P_CIOCBSA2 0x2c +#define S5P_CIOCBSA3 0x30 +#define S5P_CIOCBSA4 0x34 + +/* Output DMA Cr plane start address */ +#define S5P_CIOCRSA1 0x38 +#define S5P_CIOCRSA2 0x3c +#define S5P_CIOCRSA3 0x40 +#define S5P_CIOCRSA4 0x44 + +/* Target image format */ +#define S5P_CITRGFMT 0x48 +#define S5P_CITRGFMT_INROT90 (1 << 31) +#define S5P_CITRGFMT_YCBCR420 (0 << 29) +#define S5P_CITRGFMT_YCBCR422 (1 << 29) +#define S5P_CITRGFMT_YCBCR422_1P (2 << 29) +#define S5P_CITRGFMT_RGB (3 << 29) +#define S5P_CITRGFMT_FMT_MASK (3 << 29) +#define S5P_CITRGFMT_HSIZE_MASK (0xfff << 16) +#define S5P_CITRGFMT_FLIP_SHIFT (14) +#define S5P_CITRGFMT_FLIP_NORMAL (0 << 14) +#define S5P_CITRGFMT_FLIP_X_MIRROR (1 << 14) +#define S5P_CITRGFMT_FLIP_Y_MIRROR (2 << 14) +#define S5P_CITRGFMT_FLIP_180 (3 << 14) +#define S5P_CITRGFMT_FLIP_MASK (3 << 14) +#define S5P_CITRGFMT_OUTROT90 (1 << 13) +#define S5P_CITRGFMT_VSIZE_MASK (0xfff << 0) +#define S5P_CITRGFMT_HSIZE (x) ((x) << 16) +#define S5P_CITRGFMT_VSIZE (x) ((x) << 0) + +/* Output DMA control */ +#define S5P_CIOCTRL 0x4c +#define S5P_CIOCTRL_ORDER422_MASK (3 << 0) +#define S5P_CIOCTRL_ORDER422_CRYCBY (0 << 0) +#define S5P_CIOCTRL_ORDER422_YCRYCB (1 << 0) +#define S5P_CIOCTRL_ORDER422_CBYCRY (2 << 0) +#define S5P_CIOCTRL_ORDER422_YCBYCR (3 << 0) +#define S5P_CIOCTRL_LASTIRQ_ENABLE (1 << 2) +#define S5P_CIOCTRL_YCBCR_3PLANE (0 << 3) +#define S5P_CIOCTRL_YCBCR_2PLANE (1 << 3) +#define S5P_CIOCTRL_YCBCR_PLANE_MASK (1 << 3) +#define S5P_CIOCTRL_ORDER2P_SHIFT (24) +#define S5P_CIOCTRL_ORDER2P_MASK (3 << 24) +#define S5P_CIOCTRL_ORDER422_2P_LSB_CRCB (0 << 24) + +/* Pre-scaler control 1 */ +#define S5P_CISCPRERATIO 0x50 +#define S5P_CISCPRERATIO_SHFACTOR (x) ((x) << 28) +#define S5P_CISCPRERATIO_HOR (x) ((x) << 16) +#define S5P_CISCPRERATIO_VER (x) ((x) << 0) + +#define S5P_CISCPREDST 0x54 +#define S5P_CISCPREDST_WIDTH (x) ((x) << 16) +#define S5P_CISCPREDST_HEIGHT (x) ((x) << 0) + +/* Main scaler control */ +#define S5P_CISCCTRL 0x58 +#define S5P_CISCCTRL_SCALERBYPASS (1 << 31) +#define S5P_CISCCTRL_SCALEUP_H (1 << 30) +#define S5P_CISCCTRL_SCALEUP_V (1 << 29) +#define S5P_CISCCTRL_CSCR2Y_WIDE (1 << 28) +#define S5P_CISCCTRL_CSCY2R_WIDE (1 << 27) +#define S5P_CISCCTRL_LCDPATHEN_FIFO (1 << 26) +#define S5P_CISCCTRL_INTERLACE (1 << 25) +#define S5P_CISCCTRL_SCALERSTART (1 << 15) +#define S5P_CISCCTRL_INRGB_FMT_RGB565 (0 << 13) +#define S5P_CISCCTRL_INRGB_FMT_RGB666 (1 << 13) +#define S5P_CISCCTRL_INRGB_FMT_RGB888 (2 << 13) +#define S5P_CISCCTRL_INRGB_FMT_MASK (3 << 13) +#define S5P_CISCCTRL_OUTRGB_FMT_RGB565 (0 << 11) +#define S5P_CISCCTRL_OUTRGB_FMT_RGB666 (1 << 11) +#define S5P_CISCCTRL_OUTRGB_FMT_RGB888 (2 << 11) +#define S5P_CISCCTRL_OUTRGB_FMT_MASK (3 << 11) +#define S5P_CISCCTRL_RGB_EXT (1 << 10) +#define S5P_CISCCTRL_ONE2ONE (1 << 9) +#define S5P_CISCCTRL_SC_HORRATIO (x) ((x) << 16) +#define S5P_CISCCTRL_SC_VERRATIO (x) ((x) << 0) + +/* Target area */ +#define S5P_CITAREA 0x5c +#define S5P_CITAREA_MASK 0x0fffffff + +/* General status */ +#define S5P_CISTATUS 0x64 +#define S5P_CISTATUS_OVFIY (1 << 31) +#define S5P_CISTATUS_OVFICB (1 << 30) +#define S5P_CISTATUS_OVFICR (1 << 29) +#define S5P_CISTATUS_VSYNC (1 << 28) +#define S5P_CISTATUS_WINOFF_EN (1 << 25) +#define S5P_CISTATUS_IMGCPT_EN (1 << 22) +#define S5P_CISTATUS_IMGCPT_SCEN (1 << 21) +#define S5P_CISTATUS_VSYNC_A (1 << 20) +#define S5P_CISTATUS_VSYNC_B (1 << 19) +#define S5P_CISTATUS_OVRLB (1 << 18) +#define S5P_CISTATUS_FRAME_END (1 << 17) +#define S5P_CISTATUS_LASTCAPT_END (1 << 16) +#define S5P_CISTATUS_VVALID_A (1 << 15) +#define S5P_CISTATUS_VVALID_B (1 << 14) + +/* Image capture control */ +#define S5P_CIIMGCPT 0xc0 +#define S5P_CIIMGCPT_IMGCPTEN (1 << 31) +#define S5P_CIIMGCPT_IMGCPTEN_SC (1 << 30) +#define S5P_CIIMGCPT_CPT_FREN_ENABLE (1 << 25) +#define S5P_CIIMGCPT_CPT_FRMOD_CNT (1 << 18) + +/* Frame capture sequence */ +#define S5P_CICPTSEQ 0xc4 + +/* Image effect */ +#define S5P_CIIMGEFF 0xd0 +#define S5P_CIIMGEFF_IE_DISABLE (0 << 30) +#define S5P_CIIMGEFF_IE_ENABLE (1 << 30) +#define S5P_CIIMGEFF_IE_SC_BEFORE (0 << 29) +#define S5P_CIIMGEFF_IE_SC_AFTER (1 << 29) +#define S5P_CIIMGEFF_FIN_BYPASS (0 << 26) +#define S5P_CIIMGEFF_FIN_ARBITRARY (1 << 26) +#define S5P_CIIMGEFF_FIN_NEGATIVE (2 << 26) +#define S5P_CIIMGEFF_FIN_ARTFREEZE (3 << 26) +#define S5P_CIIMGEFF_FIN_EMBOSSING (4 << 26) +#define S5P_CIIMGEFF_FIN_SILHOUETTE (5 << 26) +#define S5P_CIIMGEFF_FIN_MASK (7 << 26) +#define S5P_CIIMGEFF_PAT_CBCR_MASK ((0xff < 13) | (0xff < 0)) +#define S5P_CIIMGEFF_PAT_CB (x) ((x) << 13) +#define S5P_CIIMGEFF_PAT_CR (x) ((x) << 0) + +/* Input DMA Y/Cb/Cr plane start address 0 */ +#define S5P_CIIYSA0 0xd4 +#define S5P_CIICBSA0 0xd8 +#define S5P_CIICRSA0 0xdc + +/* Real input DMA image size */ +#define S5P_CIREAL_ISIZE 0xf8 +#define S5P_CIREAL_ISIZE_AUTOLOAD_EN (1 << 31) +#define S5P_CIREAL_ISIZE_ADDR_CH_DIS (1 << 30) +#define S5P_CIREAL_ISIZE_HEIGHT (x) ((x) << 16) +#define S5P_CIREAL_ISIZE_WIDTH (x) ((x) << 0) + + +/* Input DMA control */ +#define S5P_MSCTRL 0xfc +#define S5P_MSCTRL_IN_BURST_COUNT_MASK (3 << 24) +#define S5P_MSCTRL_2P_IN_ORDER_MASK (3 << 16) +#define S5P_MSCTRL_2P_IN_ORDER_SHIFT 16 +#define S5P_MSCTRL_C_INT_IN_3PLANE (0 << 15) +#define S5P_MSCTRL_C_INT_IN_2PLANE (1 << 15) +#define S5P_MSCTRL_C_INT_IN_MASK (1 << 15) +#define S5P_MSCTRL_FLIP_SHIFT 13 +#define S5P_MSCTRL_FLIP_MASK (3 << 13) +#define S5P_MSCTRL_FLIP_NORMAL (0 << 13) +#define S5P_MSCTRL_FLIP_X_MIRROR (1 << 13) +#define S5P_MSCTRL_FLIP_Y_MIRROR (2 << 13) +#define S5P_MSCTRL_FLIP_180 (3 << 13) +#define S5P_MSCTRL_ORDER422_SHIFT 4 +#define S5P_MSCTRL_ORDER422_CRYCBY (0 << 4) +#define S5P_MSCTRL_ORDER422_YCRYCB (1 << 4) +#define S5P_MSCTRL_ORDER422_CBYCRY (2 << 4) +#define S5P_MSCTRL_ORDER422_YCBYCR (3 << 4) +#define S5P_MSCTRL_ORDER422_MASK (3 << 4) +#define S5P_MSCTRL_INPUT_EXTCAM (0 << 3) +#define S5P_MSCTRL_INPUT_MEMORY (1 << 3) +#define S5P_MSCTRL_INPUT_MASK (1 << 3) +#define S5P_MSCTRL_INFORMAT_YCBCR420 (0 << 1) +#define S5P_MSCTRL_INFORMAT_YCBCR422 (1 << 1) +#define S5P_MSCTRL_INFORMAT_YCBCR422_1P (2 << 1) +#define S5P_MSCTRL_INFORMAT_RGB (3 << 1) +#define S5P_MSCTRL_INFORMAT_MASK (3 << 1) +#define S5P_MSCTRL_ENVID (1 << 0) +#define S5P_MSCTRL_FRAME_COUNT (x) ((x) << 24) + +/* Input DMA Y/Cb/Cr plane start address 1 */ +#define S5P_CIIYSA1 0x144 +#define S5P_CIICBSA1 0x148 +#define S5P_CIICRSA1 0x14c + +/* Output DMA Y/Cb/Cr offset */ +#define S5P_CIOYOFF 0x168 +#define S5P_CIOCBOFF 0x16c +#define S5P_CIOCROFF 0x170 + +/* Input DMA Y/Cb/Cr offset */ +#define S5P_CIIYOFF 0x174 +#define S5P_CIICBOFF 0x178 +#define S5P_CIICROFF 0x17c + +#define S5P_CIO_OFFS_VER (x) ((x) << 16) +#define S5P_CIO_OFFS_HOR (x) ((x) << 0) + +/* Input DMA original image size */ +#define S5P_ORGISIZE 0x180 + +/* Output DMA original image size */ +#define S5P_ORGOSIZE 0x184 + +#define S5P_ORIG_SIZE_VER (x) ((x) << 16) +#define S5P_ORIG_SIZE_HOR (x) ((x) << 0) + +/* Real output DMA image size (extension register) */ +#define S5P_CIEXTEN 0x188 + +#define S5P_CIDMAPARAM 0x18c +#define S5P_CIDMAPARAM_R_LINEAR (0 << 29)
arch/arm/plat-samsung/include/plat/regs-fimc.h
Quoted 10 lines
arch/arm/plat-samsung/include/plat/regs-fimc.h new file +9
-1+#define S5P_CIDMAPARAM_R_64X32 (3 << 29) +#define S5P_CIDMAPARAM_W_LINEAR (0 << 13) +#define S5P_CIDMAPARAM_W_64X32 (3 << 13) +#define S5P_CIDMAPARAM_TILE_MASK ((3 << 29) | (3 << 13)) + +/* MIPI CSI image format */ +#define S5P_CSIIMGFMT 0x194 + +#endif /* REGS_FIMC_H_ */ --
Looks ok...however, I'm still thinking whether really need all these definitions.
Hmm...
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
Hello,
Quoted 27 lines
Kukjin Kim <[email protected]> wrote:
Quoted 8 lines · Sylwester Nawrocki
Add register definitions for the camera interface/video postprocessor contained in Samsung's S5P SoC series.
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Reviewed-by Pawel Osciak <[email protected]>Reviewed-by Marek Szyprowski <[email protected]>Review
Quoted 7 lines
--- arch/arm/plat-samsung/include/plat/regs-fimc.h | 294 ++++++++++++++++++++++++ 1 files changed, 294 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-samsung/include/plat/regs-fimc.h(quoted diff) +0
-0b/arch/arm/plat-
Quoted 9 lines
samsung/include/plat/regs-fimc.h
new file mode 100644
index 0000000..7f3141carch/arm/plat-samsung/include/plat/regs-fimc.h new file +3
-0@@ -0,0 +1,294 @@ +/* arch/arm/plat-s5p/include/plat/regs-fimc.h +* +* Register definition file for Samsung Camera Interface (FIMC) driver
<snip>
Quoted 6 lines
Looks ok...however, I'm still thinking whether really need all these definitions.
Hmm...
Well, some of them are indeed unused, but it's not an uncommon practice in kernel and might help future developers.
Best regards
--
Pawel Osciak
Linux Platform Group
Samsung Poland R&D Center
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
Quoted 2 lines · Pawel Osciak
Well, some of them are indeed unused, but it's not an uncommon practice in kernel and might help future developers.
On the other hand, arch/arm is getting soo big that we need to do something about this - and one solution is to avoid unnecessary definitions that we're not using.
Another good idea is to put definitions along side the drivers which they're relevant to - maybe in a local driver-name.h file which driver-name.c includes, or maybe even within driver-name.c if they're not excessive. This has the advantage of distributing the "bloat" to where its actually used, and means that the driver isn't dependent so much on arch/arm or even the SoC itself.
Take a look at arch/arm/mach-vexpress/include/mach/ct-ca9x4.h and arch/arm/mach-vexpress/include/mach/motherboard.h - these are the only two files which contain platform definitions which are actually used for Versatile Express. Compare that with arch/arm/mach-realview/include/mach/platform.h which contains lots more...
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
Hello,
Quoted 9 lines · Russell King
Quoted 1 line · Pawel Osciak
Well, some of them are indeed unused, but it's not an uncommon practice
in
Quoted 1 line
kernel and might help future developers.
On the other hand,
arch/armis getting soo big that we need to do something about this - and one solution is to avoid unnecessary definitions that we're not using.
Quoted 6 lines
Another good idea is to put definitions along side the drivers which they're relevant to - maybe in a local
driver-name.hfile whichdriver-name.cincludes, or maybe even withindriver-name.cif they're not excessive. This has the advantage of distributing the "bloat" to where its actually used, and means that the driver isn't dependent so much onarch/armor even the SoC itself.
Well, with FIMC driver we just followed the style from other Samsung drivers. Just take a look at video/s3c-fb or usb/gadget/s3c-hsotg.c. I personally like to keep the same style for all drivers for Samsung IPs. Changing the style of all of them requires some amount of work, that would delay this particular driver even more so we will definitely miss the merge window.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
In reply to Russell King - ARM LinuxEm 02-08-2010 07:52, Russell King - ARM Linux escreveu:
Quoted 8 lines · Pawel Osciak
Quoted 2 lines
Well, some of them are indeed unused, but it's not an uncommon practice in kernel and might help future developers.
On the other hand,
arch/armis getting soo big that we need to do something about this - and one solution is to avoid unnecessary definitions that we're not using.
Quoted 6 lines
Another good idea is to put definitions along side the drivers which they're relevant to - maybe in a local
driver-name.hfile whichdriver-name.cincludes, or maybe even withindriver-name.cif they're not excessive. This has the advantage of distributing the "bloat" to where its actually used, and means that the driver isn't dependent so much onarch/armor even the SoC itself.
Very much appreciated from my side. It is very hard to sync changes that happen via arm trees when merging from my tree. There were several cases in the past were I needed to coordinate with an ARM maintainer about when he would merge from his tree, as the patches I had on media tree were highly dependent on the patches at arch.
On several cases, I suspect that we had git bisect breakages (compilation or driver miss-functioning) due to those sync issues between two trees.
A per-driver *.h file makes things easier, as such header file can be merged/maintained together with the subsystem tree where the driver belongs.
Quoted 10 lines
Take a look at
arch/arm/mach-vexpress/include/mach/ct-ca9x4.handarch/arm/mach-vexpress/include/mach/motherboard.h- these are the only two files which contain platform definitions which are actually used for Versatile Express. Compare that witharch/arm/mach-realview/include/mach/platform.hwhich contains lots more...
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheers,
Mauro
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
Quoted 16 lines · Mauro Carvalho Chehab
Em 02-08-2010 07:52, Russell King - ARM Linux escreveu:
Quoted 8 lines · Pawel Osciak
Quoted 2 lines
Well, some of them are indeed unused, but it's not an uncommon practice in kernel and might help future developers.
On the other hand,
arch/armis getting soo big that we need to do something about this - and one solution is to avoid unnecessary definitions that we're not using.Quoted 6 lines
Another good idea is to put definitions along side the drivers which they're relevant to - maybe in a local
driver-name.hfile whichdriver-name.cincludes, or maybe even withindriver-name.cif they're not excessive. This has the advantage of distributing the "bloat" to where its actually used, and means that the driver isn't dependent so much onarch/armor even the SoC itself.
Quoted 5 lines
Very much appreciated from my side. It is very hard to sync changes that happen via arm trees when merging from my tree. There were several cases in the past were I needed to coordinate with an ARM maintainer about when he would merge from his tree, as the patches I had on media tree were highly dependent on the patches at arch.
That's a separate problem - one which occurs when there's platform code in arch/arm/ which shares a common data structure with driver code under drivers/.
I don't think there's an easy resolution to that one, because if you split the arch/arm/ change (which may depend on other arch/arm/ changes) from the drivers/ change, someone ends up losing no matter where the header file with the common data structure is placed.
One answer to that is to kill the idea that every ARM architecture needs to define their own watchdog platform data - and instead replace it with a shared watchdog_platform_data structure, much like the flash_platform_data structure in arch/arm/include/asm/mach/flash.h (which'd would be nice to be under include/linux ...)
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
In reply to Russell King - ARM LinuxQuoted 16 lines
Russell King - ARM Linux <[email protected]> wrote:
Quoted 2 lines · Pawel Osciak
Well, some of them are indeed unused, but it's not an uncommon practice in kernel and might help future developers.
On the other hand,
arch/armis getting soo big that we need to do something about this - and one solution is to avoid unnecessary definitions that we're not using.Another good idea is to put definitions along side the drivers which they're relevant to - maybe in a local
driver-name.hfile whichdriver-name.cincludes, or maybe even withindriver-name.cif they're not excessive. This has the advantage of distributing the "bloat" to where its actually used, and means that the driver isn't dependent so much onarch/armor even the SoC itself.
Quoted 6 lines
Take a look at
arch/arm/mach-vexpress/include/mach/ct-ca9x4.handarch/arm/mach-vexpress/include/mach/motherboard.h- these are the only two files which contain platform definitions which are actually used for Versatile Express. Compare that witharch/arm/mach-realview/include/mach/platform.hwhich contains lots more...
So basically, what you and Mauro are recommending is that we move the *.h file with register definitions to drivers/media?
Best regards
--
Pawel Osciak
Linux Platform Group
Samsung Poland R&D Center
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
Quoted 23 lines · Pawel Osciak
Quoted 16 lines
Russell King - ARM Linux <[email protected]> wrote:
Quoted 2 lines · Pawel Osciak
Well, some of them are indeed unused, but it's not an uncommon practice in kernel and might help future developers.
On the other hand,
arch/armis getting soo big that we need to do something about this - and one solution is to avoid unnecessary definitions that we're not using.Another good idea is to put definitions along side the drivers which they're relevant to - maybe in a local
driver-name.hfile whichdriver-name.cincludes, or maybe even withindriver-name.cif they're not excessive. This has the advantage of distributing the "bloat" to where its actually used, and means that the driver isn't dependent so much onarch/armor even the SoC itself.Quoted 6 lines
Take a look at
arch/arm/mach-vexpress/include/mach/ct-ca9x4.handarch/arm/mach-vexpress/include/mach/motherboard.h- these are the only two files which contain platform definitions which are actually used for Versatile Express. Compare that witharch/arm/mach-realview/include/mach/platform.hwhich contains lots more...
Quoted 2 lines
So basically, what you and Mauro are recommending is that we move the *.h file with register definitions to
drivers/media?
What I'm suggesting is what's been pretty standard in Linux for a long time. Take a look at: drivers/net/3c503.[ch], or for a more recent driver, drivers/net/e1000/*.[ch]. Or drivers/mmc/host/mmci.[ch]
Putting definitions which are only used by one driver in arch/arm/*/include is silly.
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
Quoted 5 lines · Russell King
Quoted 3 lines · Pawel Osciak
Quoted 3 lines
Russell King - ARM Linux <[email protected]> wrote:
Quoted 1 line · Pawel Osciak
Well, some of them are indeed unused, but it's not an uncommon
practice in
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 1 line
kernel and might help future developers.
On the other hand,
arch/armis getting soo big that we need to do something about this - and one solution is to avoid unnecessary definitions that we're not using.Another good idea is to put definitions along side the drivers which they're relevant to - maybe in a local
driver-name.hfile whichdriver-name.cincludes, or maybe even withindriver-name.cif they're not excessive. This has the advantage of distributing the "bloat" to where its actually used, and means that the driver isn't dependent so much onarch/armor even the SoC itself.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Take a look at
arch/arm/mach-vexpress/include/mach/ct-ca9x4.handarch/arm/mach-vexpress/include/mach/motherboard.h- these are the only two files which contain platform definitions which are actually used for Versatile Express. Compare that witharch/arm/mach-realview/include/mach/platform.hwhich contains lots more...So basically, what you and Mauro are recommending is that we move the
*.h
Quoted 6 lines
Quoted 1 line
file with register definitions to
drivers/media?What I'm suggesting is what's been pretty standard in Linux for a long time. Take a look at: drivers/net/3c503.[ch], or for a more recent driver, drivers/net/e1000/*.[ch]. Or drivers/mmc/host/mmci.[ch]
I agree with Russell's opinion.
I don't want to add unnecessary(or unavailable in arch/arm) definitions in arch/arm/*/include
Quoted 1 line
Putting definitions which are only used by one driver in
arch/arm/*/include
Quoted 1 line
is silly.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v3 1/8 ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface
Quoted 35 lines · Kukjin Kim
Quoted 5 lines · Russell King
Quoted 3 lines · Pawel Osciak
Quoted 3 lines
Russell King - ARM Linux <[email protected]> wrote:
Quoted 1 line · Pawel Osciak
Well, some of them are indeed unused, but it's not an uncommon
practice in
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 1 line
kernel and might help future developers.
On the other hand,
arch/armis getting soo big that we need to do something about this - and one solution is to avoid unnecessary definitions that we're not using.Another good idea is to put definitions along side the drivers which they're relevant to - maybe in a local
driver-name.hfile whichdriver-name.cincludes, or maybe even withindriver-name.cif they're not excessive. ?This has the advantage of distributing the "bloat" to where its actually used, and means that the driver isn't dependent so much onarch/armor even the SoC itself.Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Take a look at
arch/arm/mach-vexpress/include/mach/ct-ca9x4.handarch/arm/mach-vexpress/include/mach/motherboard.h- these are the only two files which contain platform definitions which are actually used for Versatile Express. ?Compare that witharch/arm/mach-realview/include/mach/platform.hwhich contains lots more...So basically, what you and Mauro are recommending is that we move the
*.h
Quoted 6 lines
Quoted 1 line
file with register definitions to
drivers/media?What I'm suggesting is what's been pretty standard in Linux for a long time. ?Take a look at: drivers/net/3c503.[ch], or for a more recent driver, drivers/net/e1000/*.[ch]. ?Or drivers/mmc/host/mmci.[ch]
Quoted 7 lines
I agree with Russell's opinion.
I don't want to add unnecessary(or unavailable inarch/arm) definitions inarch/arm/*/includeQuoted 1 line
Putting definitions which are only used by one driver in
arch/arm/*/includeQuoted 1 line
is silly.
I also happy with this method.
Thank you,
Kyungmin Park
PATCH v3 2/8 v4l: Add driver for Samsung S3C/S5P SoC video postprocessor
In reply to Sylwester NawrockiThis driver exports a video device node per each camera interface/ video postprocessor (FIMC) device contained in Samsung S3C/S5P SoC series. The driver is based on v4l2-mem2mem framework.
--- drivers/media/video/Kconfig | 20 + drivers/media/video/Makefile | 1 + drivers/media/video/samsung/fimc/Makefile | 3 + drivers/media/video/samsung/fimc/fimc-core.c | 1568 ++++++++++++++++++++++++++ drivers/media/video/samsung/fimc/fimc-core.h | 490 ++++++++ drivers/media/video/samsung/fimc/fimc-reg.c | 571 ++++++++++ include/linux/videodev2.h | 1 + 7 files changed, 2654 insertions(+), 0 deletions(-) create mode 100644 drivers/media/video/samsung/fimc/Makefile create mode 100644 drivers/media/video/samsung/fimc/fimc-core.c create mode 100644 drivers/media/video/samsung/fimc/fimc-core.h create mode 100644 drivers/media/video/samsung/fimc/fimc-reg.c
drivers/media/video/Kconfig +20 -0
@@ -969,6 +969,16 @@ config VIDEO_OMAP2 ---help--- This is a v4l2 driver for the TI OMAP2 camera capture interface +config VIDEO_SAMSUNG_FIMC + tristate "Samsung S3C/S5P FIMC (video postprocessor) driver" + depends on VIDEO_DEV && VIDEO_V4L2 + select VIDEOBUF_DMA_CONTIG + select V4L2_MEM2MEM_DEV + default n + help + This is a v4l2 driver for the S3C/S5P camera interface + (video postprocessor). + # # USB Multimedia device configuration #
@@ -1150,4 +1160,14 @@ config VIDEO_MEM2MEM_TESTDEV This is a virtual test device for the memory-to-memory driver framework. +config VIDEO_SAMSUNG_FIMC + tristate "Samsung S3C/S5P FIMC (video postprocessor) driver" + depends on VIDEO_DEV && VIDEO_V4L2 + select VIDEOBUF_DMA_CONTIG + select V4L2_MEM2MEM_DEV + default n + help + This is a v4l2 driver for the S3C/S5P camera interface + (video postprocessor) + endif # V4L_MEM2MEM_DRIVERS
drivers/media/video/Makefile +1 -0
@@ -165,6 +165,7 @@ obj-$(CONFIG_VIDEO_MX1) += mx1_camera.o obj-$(CONFIG_VIDEO_MX3) += mx3_camera.o obj-$(CONFIG_VIDEO_PXA27x) += pxa_camera.o obj-$(CONFIG_VIDEO_SH_MOBILE_CEU) += sh_mobile_ceu_camera.o +obj-$(CONFIG_VIDEO_SAMSUNG_FIMC) += samsung/fimc/ obj-$(CONFIG_ARCH_DAVINCI) += davinci/
drivers/media/video/samsung/fimc/Makefile new file +3 -0
@@ -0,0 +1,3 @@ + +obj-$(CONFIG_VIDEO_SAMSUNG_FIMC) := samsung-fimc.o +samsung-fimc-y := fimc-core.o fimc-reg.o
drivers/media/video/samsung/fimc/fimc-core.c new file +1568 -0
1,568 lines not on this page · raw message
drivers/media/video/samsung/fimc/fimc-core.h new file +490 -0
490 lines not on this page · raw message
drivers/media/video/samsung/fimc/fimc-reg.c new file +571 -0
571 lines not on this page · raw message
include/linux/videodev2.h +1 -0
@@ -277,6 +277,7 @@ struct v4l2_pix_format {#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P')/* 16 RGB-5-6-5 */ #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q')/* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R')/* 16 RGB-5-6-5 BE */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R', 'G', 'B', 'H')/* 18 RGB-6-6-6 */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3')/* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3')/* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4')/* 32 BGR-8-8-8-8 */
Signature · 1 line
1.7.2
PATCH v3 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
In reply to Sylwester NawrockiFIMC (CAMIF) device is a camera interface embedded in S3C/S5P Samsung SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and rotation.
--- arch/arm/mach-s5pc100/include/mach/map.h | 8 ++++ arch/arm/mach-s5pv210/cpu.c | 5 +++ arch/arm/mach-s5pv210/include/mach/map.h | 9 +++++ arch/arm/plat-s5p/Kconfig | 16 ++++++++ arch/arm/plat-s5p/Makefile | 3 ++ arch/arm/plat-s5p/dev-fimc0.c | 35 ++++++++++++++++++ arch/arm/plat-s5p/dev-fimc1.c | 35 ++++++++++++++++++ arch/arm/plat-s5p/dev-fimc2.c | 35 ++++++++++++++++++ arch/arm/plat-samsung/include/plat/fimc-core.h | 45 ++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/fimc.h | 23 ++++++++++++ 10 files changed, 214 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-fimc0.c create mode 100644 arch/arm/plat-s5p/dev-fimc1.c create mode 100644 arch/arm/plat-s5p/dev-fimc2.c create mode 100644 arch/arm/plat-samsung/include/plat/fimc-core.h create mode 100644 arch/arm/plat-samsung/include/plat/fimc.h
arch/arm/mach-s5pc100/include/mach/map.h +8 -0
@@ -118,6 +118,11 @@#define S5PC100_PA_SDRAM (0x20000000)#define S5P_PA_SDRAM S5PC100_PA_SDRAM +/* FIMC */ +#define S5PC100_PA_FIMC0 (0xEE200000) +#define S5PC100_PA_FIMC1 (0xEE300000) +#define S5PC100_PA_FIMC2 (0xEE400000) +/* compatibiltiy defines. */ #define S3C_PA_UART S5PC100_PA_UART#define S3C_PA_IIC S5PC100_PA_IIC0
@@ -141,6 +146,9 @@#define S3C_PA_ONENAND S5PC100_PA_ONENAND#define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF#define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF +#define S5P_PA_FIMC0 S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 S5PC100_PA_FIMC2#define SAMSUNG_PA_ADC S5PC100_PA_TSADC#define SAMSUNG_PA_CFCON S5PC100_PA_CFCON
arch/arm/mach-s5pv210/cpu.c +5 -0
@@ -37,6 +37,7 @@#include <plat/iic-core.h> #include <plat/keypad-core.h> #include <plat/sdhci.h> +#include <plat/fimc-core.h> /* Initial IO mappings */
@@ -98,6 +99,10 @@ void __init s5pv210_map_io(void)/* Use s5pv210-keypad instead of samsung-keypad */ samsung_keypad_setname ("s5pv210-keypad" ); + +s3c_fimc_setname (0 ,"s5pv210-fimc" ); +s3c_fimc_setname (1 ,"s5pv210-fimc" ); +s3c_fimc_setname (2 ,"s5pv210-fimc" ); }void __init s5pv210_init_clocks (int xtal)
arch/arm/mach-s5pv210/include/mach/map.h +9 -0
@@ -96,6 +96,11 @@#define S5PV210_PA_ADC (0xE1700000) +/* FIMC */ +#define S5PV210_PA_FIMC0 (0xFB200000) +#define S5PV210_PA_FIMC1 (0xFB300000) +#define S5PV210_PA_FIMC2 (0xFB400000) +/* compatibiltiy defines. */ #define S3C_PA_UART S5PV210_PA_UART#define S3C_PA_HSMMC0 S5PV210_PA_HSMMC(0)
@@ -112,4 +117,8 @@#define SAMSUNG_PA_CFCON S5PV210_PA_CFCON#define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD +#define S5P_PA_FIMC0 S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 S5PV210_PA_FIMC2 +#endif /* __ASM_ARCH_MAP_H */
arch/arm/plat-s5p/Kconfig +16 -0
@@ -5,6 +5,22 @@ # # Licensed under GPLv2 +config S5P_DEV_FIMC0 + bool + help + Compile in platform device definitions for FIMC controller 0 + +config S5P_DEV_FIMC1 + bool + help + Compile in platform device definitions for FIMC controller 1 + +config S5P_DEV_FIMC2 + bool + help + Compile in platform device definitions for FIMC controller 2 + + config PLAT_S5P bool depends on (ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PC100 || ARCH_S5PV210)
arch/arm/plat-s5p/Makefile +3 -0
@@ -19,3 +19,6 @@ obj-y += clock.o obj-y += irq.o obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o +obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o +obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o +obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o
arch/arm/plat-s5p/dev-fimc0.c new file +35 -0
@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc0.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC0 resource and device definitions +* +* 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. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC0 , + .end =S5P_PA_FIMC0 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC0 , + .end =IRQ_FIMC0 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc0 = { + .name ="s5p-fimc" , + .id =0 , + .num_resources =ARRAY_SIZE (s5p_fimc_resource), + .resource = s5p_fimc_resource, +};
arch/arm/plat-s5p/dev-fimc1.c new file +35 -0
@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc1.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC1 resource and device definitions +* +* 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. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC1 , + .end =S5P_PA_FIMC1 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC1 , + .end =IRQ_FIMC1 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc1 = { + .name ="s5p-fimc" , + .id =1 , + .num_resources =ARRAY_SIZE (s5p_fimc_resource), + .resource = s5p_fimc_resource, +};
arch/arm/plat-s5p/dev-fimc2.c new file +35 -0
@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc2.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC2 resource and device definitions +* +* 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. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC2 , + .end =S5P_PA_FIMC2 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC2 , + .end =IRQ_FIMC2 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc2 = { + .name ="s5p-fimc" , + .id =2 , + .num_resources =ARRAY_SIZE (s5p_fimc_resource), + .resource = s5p_fimc_resource, +};
arch/arm/plat-samsung/include/plat/fimc-core.h new file +45 -0
45 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/fimc.h new file +23 -0
@@ -0,0 +1,23 @@ +/* linux/arch/arm/plat-samsung/include/plat/fimc.h +* +* Platform header file for S3C/S5P FIMC driver +* +* Copyright (c) 2010 Samsung Electronics +* +* Sylwester Nawrocki, <[email protected]> +* +* 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 FIMC_H_ +#define FIMC_H_ + +#include <linux/platform_device.h> + +extern struct platform_device s5p_device_fimc0; +extern struct platform_device s5p_device_fimc1; +extern struct platform_device s5p_device_fimc2; + +#endif /* FIMC_H_ */ +
Signature · 1 line
1.7.2
PATCH v4 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
From: Sylwester Nawrocki <[email protected]>
FIMC (CAMIF) device is a camera interface embedded in S3C/S5P Samsung SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and rotation.
---
This is patch is a v3 version rebased onto latest kgene/for-next tree. New entries in map.h files has been sorted by the physicall address.
I'm resending this patch on behalf of Sylwester who is on holidays this week.
Best regards
Signature · 19 lines
Marek Szyprowski Samsung Poland R&D Center --- arch/arm/mach-s5pc100/include/mach/map.h | 7 ++++ arch/arm/mach-s5pv210/cpu.c | 5 +++ arch/arm/mach-s5pv210/include/mach/map.h | 8 ++++ arch/arm/plat-s5p/Kconfig | 16 ++++++++ arch/arm/plat-s5p/Makefile | 3 ++ arch/arm/plat-s5p/dev-fimc0.c | 35 ++++++++++++++++++ arch/arm/plat-s5p/dev-fimc1.c | 35 ++++++++++++++++++ arch/arm/plat-s5p/dev-fimc2.c | 35 ++++++++++++++++++ arch/arm/plat-samsung/include/plat/fimc-core.h | 45 ++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/fimc.h | 22 +++++++++++ 10 files changed, 211 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-fimc0.c create mode 100644 arch/arm/plat-s5p/dev-fimc1.c create mode 100644 arch/arm/plat-s5p/dev-fimc2.c create mode 100644 arch/arm/plat-samsung/include/plat/fimc-core.h create mode 100644 arch/arm/plat-samsung/include/plat/fimc.h
arch/arm/mach-s5pc100/include/mach/map.h +7 -0
@@ -99,6 +99,10 @@#define S5PC100_PA_FB (0xEE000000) +#define S5PC100_PA_FIMC0 (0xEE200000) +#define S5PC100_PA_FIMC1 (0xEE300000) +#define S5PC100_PA_FIMC2 (0xEE400000) +#define S5PC100_PA_I2S0 (0xF2000000)#define S5PC100_PA_I2S1 (0xF2100000)#define S5PC100_PA_I2S2 (0xF2200000)
@@ -143,6 +147,9 @@#define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF#define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF#define S3C_PA_RTC S5PC100_PA_RTC +#define S5P_PA_FIMC0 S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 S5PC100_PA_FIMC2#define SAMSUNG_PA_ADC S5PC100_PA_TSADC#define SAMSUNG_PA_CFCON S5PC100_PA_CFCON
arch/arm/mach-s5pv210/cpu.c +5 -0
@@ -37,6 +37,7 @@#include <plat/iic-core.h> #include <plat/keypad-core.h> #include <plat/sdhci.h> +#include <plat/fimc-core.h> #include <plat/reset.h> /* Initial IO mappings */
@@ -104,6 +105,10 @@ void __init s5pv210_map_io(void)/* Use s5pv210-keypad instead of samsung-keypad */ samsung_keypad_setname ("s5pv210-keypad" ); + +s3c_fimc_setname (0 ,"s5pv210-fimc" ); +s3c_fimc_setname (1 ,"s5pv210-fimc" ); +s3c_fimc_setname (2 ,"s5pv210-fimc" ); }void __init s5pv210_init_clocks (int xtal)
arch/arm/mach-s5pv210/include/mach/map.h +8 -0
@@ -65,6 +65,10 @@#define S5PV210_PA_FB (0xF8000000) +#define S5PV210_PA_FIMC0 (0xFB200000) +#define S5PV210_PA_FIMC1 (0xFB300000) +#define S5PV210_PA_FIMC2 (0xFB400000) +#define S5PV210_PA_HSMMC (x) (0xEB000000 + ((x) * 0x100000))#define S5PV210_PA_VIC0 (0xF2000000)
@@ -114,4 +118,8 @@#define SAMSUNG_PA_CFCON S5PV210_PA_CFCON#define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD +#define S5P_PA_FIMC0 S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 S5PV210_PA_FIMC2 +#endif /* __ASM_ARCH_MAP_H */
arch/arm/plat-s5p/Kconfig +16 -0
@@ -5,6 +5,22 @@ # # Licensed under GPLv2 +config S5P_DEV_FIMC0 + bool + help + Compile in platform device definitions for FIMC controller 0 + +config S5P_DEV_FIMC1 + bool + help + Compile in platform device definitions for FIMC controller 1 + +config S5P_DEV_FIMC2 + bool + help + Compile in platform device definitions for FIMC controller 2 + + config PLAT_S5P bool depends on (ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_S5PV310)
arch/arm/plat-s5p/Makefile +3 -0
@@ -19,3 +19,6 @@ obj-y += clock.o obj-y += irq.o obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o +obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o +obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o +obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o
arch/arm/plat-s5p/dev-fimc0.c new file +35 -0
@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc0.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC0 resource and device definitions +* +* 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. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC0 , + .end =S5P_PA_FIMC0 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC0 , + .end =IRQ_FIMC0 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc0 = { + .name ="s5p-fimc" , + .id =0 , + .num_resources =ARRAY_SIZE (s5p_fimc_resource), + .resource = s5p_fimc_resource, +};
arch/arm/plat-s5p/dev-fimc1.c new file +35 -0
@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc1.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC1 resource and device definitions +* +* 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. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC1 , + .end =S5P_PA_FIMC1 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC1 , + .end =IRQ_FIMC1 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc1 = { + .name ="s5p-fimc" , + .id =1 , + .num_resources =ARRAY_SIZE (s5p_fimc_resource), + .resource = s5p_fimc_resource, +};
arch/arm/plat-s5p/dev-fimc2.c new file +35 -0
@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc2.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC2 resource and device definitions +* +* 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. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC2 , + .end =S5P_PA_FIMC2 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC2 , + .end =IRQ_FIMC2 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc2 = { + .name ="s5p-fimc" , + .id =2 , + .num_resources =ARRAY_SIZE (s5p_fimc_resource), + .resource = s5p_fimc_resource, +};
arch/arm/plat-samsung/include/plat/fimc-core.h new file +45 -0
45 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/fimc.h new file +22 -0
@@ -0,0 +1,22 @@ +/* linux/arch/arm/plat-samsung/include/plat/fimc.h +* +* Platform header file for S3C/S5P FIMC driver +* +* Copyright (c) 2010 Samsung Electronics +* +* Sylwester Nawrocki, <[email protected]> +* +* 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 FIMC_H_ +#define FIMC_H_ + +#include <linux/platform_device.h> + +extern struct platform_device s5p_device_fimc0; +extern struct platform_device s5p_device_fimc1; +extern struct platform_device s5p_device_fimc2; + +#endif /* FIMC_H_ */
Signature · 1 line
1.7.1.569.g6f426
PATCH v4 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
Quoted 7 lines · Marek Szyprowski
From: Sylwester Nawrocki <[email protected]>
FIMC (CAMIF) device is a camera interface embedded in S3C/S5P Samsung SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and rotation.
Quoted 8 lines
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
This is patch is a v3 version rebased onto latest kgene/for-next tree. New entries in
map.hfiles has been sorted by the physicall address.
Thanks for your addressing.
Quoted 95 lines
I'm resending this patch on behalf of Sylwester who is on holidays this week.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center--- arch/arm/mach-s5pc100/include/mach/map.h | 7 ++++ arch/arm/mach-s5pv210/cpu.c | 5 +++ arch/arm/mach-s5pv210/include/mach/map.h | 8 ++++ arch/arm/plat-s5p/Kconfig | 16 ++++++++ arch/arm/plat-s5p/Makefile | 3 ++ arch/arm/plat-s5p/dev-fimc0.c | 35 ++++++++++++++++++ arch/arm/plat-s5p/dev-fimc1.c | 35 ++++++++++++++++++ arch/arm/plat-s5p/dev-fimc2.c | 35 ++++++++++++++++++ arch/arm/plat-samsung/include/plat/fimc-core.h | 45 ++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/fimc.h | 22 +++++++++++ 10 files changed, 211 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-fimc0.c create mode 100644 arch/arm/plat-s5p/dev-fimc1.c create mode 100644 arch/arm/plat-s5p/dev-fimc2.c create mode 100644 arch/arm/plat-samsung/include/plat/fimc-core.h create mode 100644 arch/arm/plat-samsung/include/plat/fimc.harch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/map.h +0
-0
s5pc100/include/mach/map.h
index c018697..3abe7f5 100644arch/arm/mach-s5pc100/include/mach/map.h +7
-0@@ -99,6 +99,10 @@#define S5PC100_PA_FB (0xEE000000) +#define S5PC100_PA_FIMC0 (0xEE200000) +#define S5PC100_PA_FIMC1 (0xEE300000) +#define S5PC100_PA_FIMC2 (0xEE400000) +#define S5PC100_PA_I2S0 (0xF2000000)#define S5PC100_PA_I2S1 (0xF2100000)#define S5PC100_PA_I2S2 (0xF2200000)@@ -143,6 +147,9 @@#define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF#define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF#define S3C_PA_RTC S5PC100_PA_RTC +#define S5P_PA_FIMC0 S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 S5PC100_PA_FIMC2#define SAMSUNG_PA_ADC S5PC100_PA_TSADC#define SAMSUNG_PA_CFCON S5PC100_PA_CFCONarch/arm/mach-s5pv210/cpu.c +5
-0@@ -37,6 +37,7 @@#include <plat/iic-core.h> #include <plat/keypad-core.h> #include <plat/sdhci.h> +#include <plat/fimc-core.h> #include <plat/reset.h> /* Initial IO mappings */ @@ -104,6 +105,10 @@ void __init s5pv210_map_io(void)/* Use s5pv210-keypad instead of samsung-keypad */ samsung_keypad_setname ("s5pv210-keypad" ); + +s3c_fimc_setname (0 ,"s5pv210-fimc" ); +s3c_fimc_setname (1 ,"s5pv210-fimc" ); +s3c_fimc_setname (2 ,"s5pv210-fimc" ); }void __init s5pv210_init_clocks (int xtal)arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/map.h +0
-0
s5pv210/include/mach/map.h
index 986b285..6a07e55 100644arch/arm/mach-s5pv210/include/mach/map.h +4
-0@@ -65,6 +65,10 @@#define S5PV210_PA_FB (0xF8000000) +#define S5PV210_PA_FIMC0 (0xFB200000) +#define S5PV210_PA_FIMC1 (0xFB300000) +#define S5PV210_PA_FIMC2 (0xFB400000) +#define S5PV210_PA_HSMMC (x) (0xEB000000 + ((x) * 0x100000))#define S5PV210_PA_VIC0 (0xF2000000)
arch/arm/mach-s5pv210/include/mach/map.h line 123
Quoted 6 lines
arch/arm/mach-s5pv210/include/mach/map.h +3
-0@@ -114,4 +118,8 @@#define SAMSUNG_PA_CFCON S5PV210_PA_CFCON#define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD +#define S5P_PA_FIMC0 S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 S5PV210_PA_FIMC2
To use one style is better for reading, merge conflict handling and so on... The style means to add S5P_PA_XXX after S3C_PA_XXX with C100 case or to modify above C100 case like this.
Quoted 16 lines
arch/arm/mach-s5pv210/include/mach/map.h +1
-0+#endif /* __ASM_ARCH_MAP_H */ arch/arm/plat-s5p/Kconfig +6
-0@@ -5,6 +5,22 @@ # # Licensed under GPLv2 +config S5P_DEV_FIMC0 + bool + help + Compile in platform device definitions for FIMC controller 0 + +config S5P_DEV_FIMC1
arch/arm/plat-s5p/Kconfig line 23
Quoted 10 lines
arch/arm/plat-s5p/Kconfig +10
-0+ bool + help + Compile in platform device definitions for FIMC controller 1 + +config S5P_DEV_FIMC2 + bool + help + Compile in platform device definitions for FIMC controller 2 + +
2 empty lines.
arch/arm/plat-s5p/Makefile obj-y += clock.o · line 21
Quoted 12 lines
arch/arm/plat-s5p/Kconfig +0
-0config PLAT_S5P bool depends on (ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PC100 ||
ARCH_S5PV210||ARCH_S5PV310)arch/arm/plat-s5p/Makefile +0
-0@@ -19,3 +19,6 @@ obj-y += clock.o obj-y += irq.o obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o
Please add '# devices' here...
Quoted 9 lines
arch/arm/plat-s5p/Makefile +3
-0+obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o +obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o +obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.oarch/arm/plat-s5p/dev-fimc0.c new file +0
-0
arch/arm/plat-s5p/dev-fimc0.c line 10
Quoted 10 lines
arch/arm/plat-s5p/dev-fimc0.c new file +10
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc0.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC0 resource and device definitions +* +* 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. +*/
Being 1 empty line is better here.
arch/arm/plat-s5p/dev-fimc0.c line 17
Quoted 7 lines
arch/arm/plat-s5p/dev-fimc0.c new file +7
-0+#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = {
Please change to s5p_fimc0_resource...it'd helpful to merging dev-fimcX files later...
Quoted 6 lines
arch/arm/plat-s5p/dev-fimc0.c new file +6
-0+ [0] = { + .start = S5P_PA_FIMC0, + .end = S5P_PA_FIMC0 + SZ_1M - 1, + .flags = IORESOURCE_MEM, + }, + [1] = {
arch/arm/plat-s5p/dev-fimc0.c line 33
Quoted 10 lines
arch/arm/plat-s5p/dev-fimc0.c new file +10
-0+ .start = IRQ_FIMC0, + .end = IRQ_FIMC0, + .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device s5p_device_fimc0 = { + .name ="s5p-fimc" , + .id =0 , + .num_resources = ARRAY_SIZE(s5p_fimc_resource),
s5p_fimc0_resource...
arch/arm/plat-s5p/dev-fimc0.c line 34
Quoted 1 line
arch/arm/plat-s5p/dev-fimc0.c new file +1
-0+ .resource = s5p_fimc_resource,
s5p_fimc0_resource...
Quoted 73 lines
arch/arm/plat-s5p/dev-fimc0.c new file +1
-0+};arch/arm/plat-s5p/dev-fimc1.c new file +35
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc1.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC1 resource and device definitions +* +* 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. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC1 , + .end =S5P_PA_FIMC1 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC1 , + .end =IRQ_FIMC1 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc1 = { + .name ="s5p-fimc" , + .id =1 , + .num_resources =ARRAY_SIZE (s5p_fimc_resource), + .resource = s5p_fimc_resource, +};arch/arm/plat-s5p/dev-fimc2.c new file +25
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc2.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC2 resource and device definitions +* +* 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. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC2 , + .end =S5P_PA_FIMC2 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC2 , + .end =IRQ_FIMC2 ,
arch/arm/plat-s5p/dev-fimc2.c line 35
Quoted 10 lines
arch/arm/plat-s5p/dev-fimc2.c new file +10
-0+ .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device s5p_device_fimc2 = { + .name ="s5p-fimc" , + .id =2 , + .num_resources =ARRAY_SIZE (s5p_fimc_resource), + .resource = s5p_fimc_resource, +};
This is just for your information...
I'm working on handling plat device in case of various # of each AP FIMC with CONFIG_NR_FIMC...
So in this case, all of plat data for FIMC will be merged into 'plat-s5p/dev-fimc.c' or 'devs.c' later.
...but I'm not sure some stuff...anyway...
Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/plat-
Quoted 19 lines
samsung/include/plat/fimc-core.h
new file mode 100644
index 0000000..a884edearch/arm/plat-samsung/include/plat/fimc-core.h new file +13
-0@@ -0,0 +1,45 @@ +/* +* arch/arm/plat-samsung/include/plat/fimc-core.h +* +* Copyright 2010 Samsung Electronics Co., Ltd. +* Sylwester Nawrocki <[email protected]> +* +* Samsung camera interface driver core functions +* +* 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 __ASM_PLAT_FIMC_CORE_H
arch/arm/plat-samsung/include/plat/fimc-core.h line 23
Quoted 10 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +10
-0+#define __ASM_PLAT_FIMC_CORE_H __FILE__ + +/* +* These functions are only for use with the core support code, such as +* the CPU-specific initialization code. +*/ + +#include <plat/fimc.h> + +/* Re-define device name to differentiate the subsystem in various SoCs.
*/
Quoted 39 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +22
-0+static inline void s3c_fimc_setname (int id,char *name) +{ +switch (id) { +#ifdef CONFIG_S5P_DEV_FIMC0 +case 0 : + s5p_device_fimc0.name = name; +break ; +#endif +#ifdef CONFIG_S5P_DEV_FIMC1 +case 1 : + s5p_device_fimc1.name = name; +break ; +#endif +#ifdef CONFIG_S5P_DEV_FIMC2 +case 2 : + s5p_device_fimc2.name = name; +break ; +#endif + } +} + +#endif /* __ASM_PLAT_FIMC_CORE_H */ arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/fimc.h +0
-0
samsung/include/plat/fimc.h
new file mode 100644
index 0000000..fda2040arch/arm/plat-samsung/include/plat/fimc.h new file +10
-0@@ -0,0 +1,22 @@ +/* linux/arch/arm/plat-samsung/include/plat/fimc.h +* +* Platform header file for S3C/S5P FIMC driver +* +* Copyright (c) 2010 Samsung Electronics +* +* Sylwester Nawrocki, <[email protected]> +* +* 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
arch/arm/plat-samsung/include/plat/fimc.h line 20
Quoted 10 lines
arch/arm/plat-samsung/include/plat/fimc.h new file +10
-0+* published by the Free Software Foundation. +*/ +#ifndef FIMC_H_ +#define FIMC_H_ + +#include <linux/platform_device.h> + +extern struct platform_device s5p_device_fimc0; +extern struct platform_device s5p_device_fimc1; +extern struct platform_device s5p_device_fimc2;
Should being in 'plat-samsung/include/plat/devs.h'.
arch/arm/plat-samsung/include/plat/fimc.h
Quoted 3 lines
arch/arm/plat-samsung/include/plat/fimc.h new file +2
-1+ +#endif /* FIMC_H_ */ --
Marek, could you please address as soon as possible?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v4 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
Quoted 116 lines · Kukjin Kim
Quoted 7 lines · Marek Szyprowski
From: Sylwester Nawrocki <[email protected]>
FIMC (CAMIF) device is a camera interface embedded in S3C/S5P Samsung SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and rotation.
Quoted 8 lines
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
This is patch is a v3 version rebased onto latest kgene/for-next tree. New entries in
map.hfiles has been sorted by the physicall address.Thanks for your addressing.
Quoted 98 lines
I'm resending this patch on behalf of Sylwester who is on holidays this week.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
---?arch/arm/mach-s5pc100/include/mach/map.h ? ? ? | ? ?7 ++++ ?arch/arm/mach-s5pv210/cpu.c ? ? ? ? ? ? ? ? ? ?| ? ?5 +++ ?arch/arm/mach-s5pv210/include/mach/map.h ? ? ? | ? ?8 ++++ ?arch/arm/plat-s5p/Kconfig ? ? ? ? ? ? ? ? ? ? ?| ? 16 ++++++++ ?arch/arm/plat-s5p/Makefile ? ? ? ? ? ? ? ? ? ? | ? ?3 ++ ?arch/arm/plat-s5p/dev-fimc0.c ? ? ? ? ? ? ? ? ?| ? 35++++++++++++++++++
?arch/arm/plat-s5p/dev-fimc1.c ? ? ? ? ? ? ? ? ?| ? 35
++++++++++++++++++
?arch/arm/plat-s5p/dev-fimc2.c ? ? ? ? ? ? ? ? ?| ? 35
++++++++++++++++++
?arch/arm/plat-samsung/include/plat/fimc-core.h | ? 45
++++++++++++++++++++++++
?arch/arm/plat-samsung/include/plat/fimc.h ? ? ?| ? 22 +++++++++++ ?10 files changed, 211 insertions(+), 0 deletions(-) ?create mode 100644arch/arm/plat-s5p/dev-fimc0.c?create mode 100644arch/arm/plat-s5p/dev-fimc1.c?create mode 100644arch/arm/plat-s5p/dev-fimc2.c?create mode 100644arch/arm/plat-samsung/include/plat/fimc-core.h?create mode 100644arch/arm/plat-samsung/include/plat/fimc.harch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/map.h +0
-0
s5pc100/include/mach/map.h
index c018697..3abe7f5 100644arch/arm/mach-s5pc100/include/mach/map.h +4
-0@@ -99,6 +99,10 @@ ?#define S5PC100_PA_FB ? ? ? ? ? ? ? ?(0xEE000000) +#define S5PC100_PA_FIMC0 ? ? (0xEE200000) +#define S5PC100_PA_FIMC1 ? ? (0xEE300000) +#define S5PC100_PA_FIMC2 ? ? (0xEE400000) + ?#define S5PC100_PA_I2S0 ? ? ? ? ? ? ?(0xF2000000) ?#define S5PC100_PA_I2S1 ? ? ? ? ? ? ?(0xF2100000) ?#define S5PC100_PA_I2S2 ? ? ? ? ? ? ?(0xF2200000)@@ -143,6 +147,9 @@?#define
S3C_PA_ONENAND_BUF?S5PC100_PA_ONENAND_BUF?#defineS3C_SZ_ONENAND_BUF?S5PC100_SZ_ONENAND_BUF?#defineS3C_PA_RTC? ? ? ? ?S5PC100_PA_RTCarch/arm/mach-s5pc100/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 ? ? ? ? S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? S5PC100_PA_FIMC2?#define
SAMSUNG_PA_ADC? ? ? ? ? ? ?S5PC100_PA_TSADC?#defineSAMSUNG_PA_CFCON? ?S5PC100_PA_CFCONarch/arm/mach-s5pv210/cpu.c +0
-0@@ -37,6 +37,7 @@?#include <
plat/iic-core.h>
?#include <plat/keypad-core.h>
?#include <plat/sdhci.h>
+#include <plat/fimc-core.h>
?#include <plat/reset.h>?/* Initial IO mappings */
arch/arm/mach-s5pv210/cpu.c +0
-0@@ -104,6 +105,10 @@ void __init s5pv210_map_io(void)? ? ? /* Use s5pv210-keypad instead of samsung-keypad */ ? ? ?
samsung_keypad_setname("s5pv210-keypad"); +
+ ? ?s3c_fimc_setname(0, "s5pv210-fimc");
+ ? ?s3c_fimc_setname(1, "s5pv210-fimc");
+ ? ?s3c_fimc_setname(2, "s5pv210-fimc");
?}?void
__inits5pv210_init_clocks(int xtal)arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/map.h +0
-0
s5pv210/include/mach/map.h
index 986b285..6a07e55 100644arch/arm/mach-s5pv210/include/mach/map.h +4
-0@@ -65,6 +65,10 @@ ?#define S5PV210_PA_FB ? ? ? ? ? ? ? ?(0xF8000000) +#define S5PV210_PA_FIMC0 ? ? (0xFB200000) +#define S5PV210_PA_FIMC1 ? ? (0xFB300000) +#define S5PV210_PA_FIMC2 ? ? (0xFB400000) + ?#define S5PV210_PA_HSMMC(x) ?(0xEB000000 + ((x) * 0x100000)) ?#define S5PV210_PA_VIC0 ? ? ? ? ? ? ?(0xF2000000)@@ -114,4 +118,8 @@?#define
SAMSUNG_PA_CFCON? ?S5PV210_PA_CFCON
?#defineSAMSUNG_PA_KEYPAD? ?S5PV210_PA_KEYPAD
Quoted 7 lines
arch/arm/mach-s5pv210/include/mach/map.h
Quoted 3 lines
arch/arm/mach-s5pv210/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 ? ? ? ? S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? S5PV210_PA_FIMC2To use one style is better for reading, merge conflict handling and so on... The style means to add
S5P_PA_XXXafterS3C_PA_XXXwith C100 case or to modify above C100 case like this.
Use the same conversion as previous one. are you okay?
#define S5PV210_PA_VIC0 (0xF2000000)
#define S5P_PA_VIC0 S5PV210_PA_VIC0
#define S5PV210_PA_VIC1 (0xF2100000)
#define S5P_PA_VIC1 S5PV210_PA_VIC1
#define S5PV210_PA_VIC2 (0xF2200000)
#define S5P_PA_VIC2 S5PV210_PA_VIC2
#define S5PV210_PA_VIC3 (0xF2300000)
#define S5P_PA_VIC3 S5PV210_PA_VIC3
#define S5PV210_PA_SDRAM (0x30000000)
#define S5P_PA_SDRAM S5PV210_PA_SDRAM
Quoted 30 lines
Quoted 17 lines
+
?#endif /*__ASM_ARCH_MAP_H*/arch/arm/plat-s5p/Kconfig +0
-0@@ -5,6 +5,22 @@?#
?# Licensed under GPLv2arch/arm/plat-s5p/Kconfig +6
-0+config S5P_DEV_FIMC0 + ? ? bool + ? ? help + ? ? ? Compile in platform device definitions for FIMC controller 0 + +config S5P_DEV_FIMC1arch/arm/plat-s5p/Kconfig
Quoted 10 lines
arch/arm/plat-s5p/Kconfig +10
-0+ ? ? bool + ? ? help + ? ? ? Compile in platform device definitions for FIMC controller 1 + +config S5P_DEV_FIMC2 + ? ? bool + ? ? help + ? ? ? Compile in platform device definitions for FIMC controller 2 + +2 empty lines.
Quoted 14 lines
Quoted 9 lines
?config
PLAT_S5P
? ? ? bool
? ? ? depends on (ARCH_S5P6440||ARCH_S5P6442||ARCH_S5PC100||ARCH_S5PV210||ARCH_S5PV310)arch/arm/plat-s5p/Makefile +0
-0@@ -19,3 +19,6 @@ obj-y ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? += clock.oQuoted 3 lines
?obj-y ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+= irq.o
?obj-$(CONFIG_S5P_EXT_INT) ? ?+= irq-eint.oPlease add '# devices' here...
It's not related with this patch.
Quoted 139 lines
Quoted 10 lines
arch/arm/plat-s5p/Makefile +3
-0+obj-$(CONFIG_S5P_DEV_FIMC0) ?+= dev-fimc0.o +obj-$(CONFIG_S5P_DEV_FIMC1) ?+= dev-fimc1.o +obj-$(CONFIG_S5P_DEV_FIMC2) ?+= dev-fimc2.oarch/arm/plat-s5p/dev-fimc0.c new file +0
-0arch/arm/plat-s5p/dev-fimc0.c line 10
Quoted 10 lines
arch/arm/plat-s5p/dev-fimc0.c new file +10
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc0.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC0 resource and device definitions +* +* 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. +*/ Being 1 empty line is better here.
arch/arm/plat-s5p/dev-fimc0.c line 17
Quoted 7 lines
arch/arm/plat-s5p/dev-fimc0.c new file +7
-0+#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = {Please change to s5p_fimc0_resource...it'd helpful to merging dev-fimcX files later...
Quoted 6 lines
arch/arm/plat-s5p/dev-fimc0.c new file +6
-0+ ? ? [0] = { + ? ? ? ? ? ? .start ?= S5P_PA_FIMC0, + ? ? ? ? ? ? .end ? ?= S5P_PA_FIMC0 + SZ_1M - 1, + ? ? ? ? ? ? .flags ?= IORESOURCE_MEM, + ? ? }, + ? ? [1] = {arch/arm/plat-s5p/dev-fimc0.c line 33
Quoted 10 lines
arch/arm/plat-s5p/dev-fimc0.c new file +10
-0+ ? ? ? ? ? ? .start ?= IRQ_FIMC0, + ? ? ? ? ? ? .end ? ?= IRQ_FIMC0, + ? ? ? ? ? ? .flags ?= IORESOURCE_IRQ, + ? ? }, +}; + +struct platform_device s5p_device_fimc0 = { + ? ? .name ? ? ? ? ? = "s5p-fimc", + ? ? .id ? ? ? ? ? ? = 0, + ? ? .num_resources ?= ARRAY_SIZE(s5p_fimc_resource),
s5p_fimc0_resource...arch/arm/plat-s5p/dev-fimc0.c line 34
Quoted 1 line
arch/arm/plat-s5p/dev-fimc0.c new file +1
-0+ ? ? .resource ? ? ? = s5p_fimc_resource,
s5p_fimc0_resource...Quoted 82 lines
arch/arm/plat-s5p/dev-fimc0.c new file +1
-0+};arch/arm/plat-s5p/dev-fimc1.c new file +35
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc1.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC1 resource and device definitions +* +* 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. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + ? ? [0] = { + ? ? ? ? ? ? .start ?= S5P_PA_FIMC1, + ? ? ? ? ? ? .end ? ?= S5P_PA_FIMC1 + SZ_1M - 1, + ? ? ? ? ? ? .flags ?= IORESOURCE_MEM, + ? ? }, + ? ? [1] = { + ? ? ? ? ? ? .start ?= IRQ_FIMC1, + ? ? ? ? ? ? .end ? ?= IRQ_FIMC1, + ? ? ? ? ? ? .flags ?= IORESOURCE_IRQ, + ? ? }, +}; + +struct platform_device s5p_device_fimc1 = { + ? ? .name ? ? ? ? ? = "s5p-fimc", + ? ? .id ? ? ? ? ? ? = 1, + ? ? .num_resources ?= ARRAY_SIZE(s5p_fimc_resource), + ? ? .resource ? ? ? = s5p_fimc_resource, +};arch/arm/plat-s5p/dev-fimc2.c new file +34
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc2.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC2 resource and device definitions +* +* 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. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + ? ? [0] = { + ? ? ? ? ? ? .start ?= S5P_PA_FIMC2, + ? ? ? ? ? ? .end ? ?= S5P_PA_FIMC2 + SZ_1M - 1, + ? ? ? ? ? ? .flags ?= IORESOURCE_MEM, + ? ? }, + ? ? [1] = { + ? ? ? ? ? ? .start ?= IRQ_FIMC2, + ? ? ? ? ? ? .end ? ?= IRQ_FIMC2, + ? ? ? ? ? ? .flags ?= IORESOURCE_IRQ, + ? ? }, +}; + +struct platform_device s5p_device_fimc2 = { + ? ? .name ? ? ? ? ? = "s5p-fimc", + ? ? .id ? ? ? ? ? ? = 2, + ? ? .num_resources ?= ARRAY_SIZE(s5p_fimc_resource), + ? ? .resource ? ? ? = s5p_fimc_resource,
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc2.c line 35
Quoted 1 line
arch/arm/plat-s5p/dev-fimc2.c new file +1
-0+};This is just for your information...
I'm working on handling plat device in case of various # of each AP FIMC withCONFIG_NR_FIMC...
So in this case, all of plat data for FIMC will be merged into 'plat-s5p/dev-fimc.c' or 'devs.c' later.
...but I'm not sure some stuff...anyway...
If you have these plan, then there's no reason to separate the dev-fimcX as this patch, Just one file the dev-fimc from now. Other devices are same rules.
Quoted 104 lines
Review
Quoted 2 lines
(quoted diff) +0
-0b/arch/arm/plat-
Quoted 19 lines
samsung/include/plat/fimc-core.h
new file mode 100644
index 0000000..a884edearch/arm/plat-samsung/include/plat/fimc-core.h new file +13
-0@@ -0,0 +1,45 @@ +/* +* arch/arm/plat-samsung/include/plat/fimc-core.h +* +* Copyright 2010 Samsung Electronics Co., Ltd. +* ? Sylwester Nawrocki <[email protected]> +* +* Samsung camera interface driver core functions +* +* 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 __ASM_PLAT_FIMC_CORE_Harch/arm/plat-samsung/include/plat/fimc-core.h line 23
Quoted 10 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +10
-0+#define __ASM_PLAT_FIMC_CORE_H __FILE__ + +/* +* These functions are only for use with the core support code, such as +* the CPU-specific initialization code. +*/ + +#include <plat/fimc.h> + +/* Re-define device name to differentiate the subsystem in various SoCs. */
Quoted 39 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +22
-0+static inline void s3c_fimc_setname (int id,char *name) +{ + ? ? switch (id) { +#ifdef CONFIG_S5P_DEV_FIMC0 + ? ? case 0: + ? ? ? ? ? ? s5p_device_fimc0.name = name; + ? ? ? ? ? ? break; +#endif +#ifdef CONFIG_S5P_DEV_FIMC1 + ? ? case 1: + ? ? ? ? ? ? s5p_device_fimc1.name = name; + ? ? ? ? ? ? break; +#endif +#ifdef CONFIG_S5P_DEV_FIMC2 + ? ? case 2: + ? ? ? ? ? ? s5p_device_fimc2.name = name; + ? ? ? ? ? ? break; +#endif + ? ? } +} + +#endif /* __ASM_PLAT_FIMC_CORE_H */ arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/fimc.h +0
-0
samsung/include/plat/fimc.h
new file mode 100644
index 0000000..fda2040arch/arm/plat-samsung/include/plat/fimc.h new file +10
-0@@ -0,0 +1,22 @@ +/* linux/arch/arm/plat-samsung/include/plat/fimc.h +* +* Platform header file for S3C/S5P FIMC driver +* +* Copyright (c) 2010 Samsung Electronics +* +* Sylwester Nawrocki, <[email protected]> +* +* 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 arch/arm/plat-samsung/include/plat/fimc.h line 20
Quoted 10 lines
arch/arm/plat-samsung/include/plat/fimc.h new file +10
-0+* published by the Free Software Foundation. +*/ +#ifndef FIMC_H_ +#define FIMC_H_ + +#include <linux/platform_device.h> + +extern struct platform_device s5p_device_fimc0; +extern struct platform_device s5p_device_fimc1; +extern struct platform_device s5p_device_fimc2;Should being in '
plat-samsung/include/plat/devs.h'.arch/arm/plat-samsung/include/plat/fimc.h
Quoted 3 lines
arch/arm/plat-samsung/include/plat/fimc.h new file +2
-1+ +#endif /* FIMC_H_ */ --Marek, could you please address as soon as possible?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html
PATCH v4 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
Quoted 118 lines · Kyungmin Park
Quoted 116 lines · Kukjin Kim
Quoted 7 lines · Marek Szyprowski
From: Sylwester Nawrocki <[email protected]>
FIMC (CAMIF) device is a camera interface embedded in S3C/S5P Samsung SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and rotation.
Quoted 8 lines
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
This is patch is a v3 version rebased onto latest kgene/for-next tree. New entries in
map.hfiles has been sorted by the physicall address.Thanks for your addressing.
Quoted 98 lines
I'm resending this patch on behalf of Sylwester who is on holidays this week.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
---
arch/arm/mach-s5pc100/include/mach/map.h | 7 ++++arch/arm/mach-s5pv210/cpu.c| 5 +++arch/arm/mach-s5pv210/include/mach/map.h| 8 ++++arch/arm/plat-s5p/Kconfig| 16 ++++++++arch/arm/plat-s5p/Makefile| 3 ++arch/arm/plat-s5p/dev-fimc0.c| 35
++++++++++++++++++
arch/arm/plat-s5p/dev-fimc1.c | 35
++++++++++++++++++
arch/arm/plat-s5p/dev-fimc2.c | 35
++++++++++++++++++
arch/arm/plat-samsung/include/plat/fimc-core.h | 45
++++++++++++++++++++++++
arch/arm/plat-samsung/include/plat/fimc.h | 22 +++++++++++10 files changed, 211 insertions(+), 0 deletions(-)create mode 100644
arch/arm/plat-s5p/dev-fimc0.ccreate mode 100644arch/arm/plat-s5p/dev-fimc1.ccreate mode 100644arch/arm/plat-s5p/dev-fimc2.ccreate mode 100644arch/arm/plat-samsung/include/plat/fimc-core.hcreate mode 100644arch/arm/plat-samsung/include/plat/fimc.harch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/map.h +0
-0
s5pc100/include/mach/map.h
index c018697..3abe7f5 100644arch/arm/mach-s5pc100/include/mach/map.h +7
-0@@ -99,6 +99,10 @@ #define S5PC100_PA_FB (0xEE000000) +#define S5PC100_PA_FIMC0 (0xEE200000) +#define S5PC100_PA_FIMC1 (0xEE300000) +#define S5PC100_PA_FIMC2 (0xEE400000) + #define S5PC100_PA_I2S0 (0xF2000000) #define S5PC100_PA_I2S1 (0xF2100000) #define S5PC100_PA_I2S2 (0xF2200000)@@ -143,6 +147,9 @@ #define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF #define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF #define S3C_PA_RTC S5PC100_PA_RTC +#define S5P_PA_FIMC0 S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 S5PC100_PA_FIMC2 #define SAMSUNG_PA_ADC S5PC100_PA_TSADC #define SAMSUNG_PA_CFCON S5PC100_PA_CFCONarch/arm/mach-s5pv210/cpu.c +5
-0@@ -37,6 +37,7 @@ #include <plat/iic-core.h> #include <plat/keypad-core.h> #include <plat/sdhci.h> +#include <plat/fimc-core.h> #include <plat/reset.h> /* Initial IO mappings */@@ -104,6 +105,10 @@ void __init s5pv210_map_io(void) /* Use s5pv210-keypad instead of samsung-keypad */ samsung_keypad_setname("s5pv210-keypad"); + + s3c_fimc_setname(0, "s5pv210-fimc"); + s3c_fimc_setname(1, "s5pv210-fimc"); + s3c_fimc_setname(2, "s5pv210-fimc"); } void __init s5pv210_init_clocks(int xtal)arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/map.h +0
-0
s5pv210/include/mach/map.h
index 986b285..6a07e55 100644arch/arm/mach-s5pv210/include/mach/map.h +4
-0@@ -65,6 +65,10 @@ #define S5PV210_PA_FB (0xF8000000) +#define S5PV210_PA_FIMC0 (0xFB200000) +#define S5PV210_PA_FIMC1 (0xFB300000) +#define S5PV210_PA_FIMC2 (0xFB400000) + #define S5PV210_PA_HSMMC(x) (0xEB000000 + ((x) * 0x100000)) #define S5PV210_PA_VIC0 (0xF2000000)@@ -114,4 +118,8 @@ #define SAMSUNG_PA_CFCON S5PV210_PA_CFCON #define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD
Quoted 5 lines
Quoted 5 lines
arch/arm/mach-s5pv210/include/mach/map.h line 123
Quoted 3 lines
arch/arm/mach-s5pv210/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 S5PV210_PA_FIMC2To use one style is better for reading, merge conflict handling and so
on...
Quoted 11 lines
Quoted 2 lines
The style means to add
S5P_PA_XXXafterS3C_PA_XXXwith C100 case or to modify above C100 case like this.Use the same conversion as previous one. are you okay?
#define
S5PV210_PA_VIC0(0xF2000000)
#defineS5P_PA_VIC0S5PV210_PA_VIC0#define
S5PV210_PA_VIC1(0xF2100000)
#defineS5P_PA_VIC1S5PV210_PA_VIC1
Quoted 9 lines
#define
S5PV210_PA_VIC2(0xF2200000)
#defineS5P_PA_VIC2S5PV210_PA_VIC2#define
S5PV210_PA_VIC3(0xF2300000)
#defineS5P_PA_VIC3S5PV210_PA_VIC3#define
S5PV210_PA_SDRAM(0x30000000)
#defineS5P_PA_SDRAMS5PV210_PA_SDRAM
No.
Did you see above C100?
--- C100
#define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF
#define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF
#define S3C_PA_RTC S5PC100_PA_RTC
+#define S5P_PA_FIMC0 S5PC100_PA_FIMC0
+#define S5P_PA_FIMC1 S5PC100_PA_FIMC1
+#define S5P_PA_FIMC2 S5PC100_PA_FIMC2
#define SAMSUNG_PA_ADC S5PC100_PA_TSADC
#define SAMSUNG_PA_CFCON S5PC100_PA_CFCON
--- V210
#define SAMSUNG_PA_CFCON S5PV210_PA_CFCON
#define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD
+#define S5P_PA_FIMC0 S5PV210_PA_FIMC0
+#define S5P_PA_FIMC1 S5PV210_PA_FIMC1
+#define S5P_PA_FIMC2 S5PV210_PA_FIMC2
I mean it's just ordering.
Quoted 44 lines
Quoted 30 lines
Quoted 17 lines
arch/arm/mach-s5pv210/include/mach/map.h +1
-0+ #endif /* __ASM_ARCH_MAP_H */arch/arm/plat-s5p/Kconfig +6
-0@@ -5,6 +5,22 @@ # # Licensed under GPLv2 +config S5P_DEV_FIMC0 + bool + help + Compile in platform device definitions for FIMC controller 0 + +config S5P_DEV_FIMC1arch/arm/plat-s5p/Kconfig line 23
Quoted 10 lines
arch/arm/plat-s5p/Kconfig +10
-0+ bool + help + Compile in platform device definitions for FIMC controller 1 + +config S5P_DEV_FIMC2 + bool + help + Compile in platform device definitions for FIMC controller 2 + +2 empty lines.
Quoted 14 lines
Quoted 9 lines
config
PLAT_S5P
bool
depends on (ARCH_S5P6440||ARCH_S5P6442||ARCH_S5PC100||ARCH_S5PV210||ARCH_S5PV310)arch/arm/plat-s5p/Makefile +0
-0@@ -19,3 +19,6 @@ obj-y += clock.oQuoted 3 lines
obj-y += irq.o
obj-$(CONFIG_S5P_EXT_INT) += irq-eint.oPlease add '# devices' here...
Quoted 6 lines
It's not related with this patch.
Quoted 5 lines
Review
Quoted 5 lines
arch/arm/plat-s5p/Makefile +3
-0+obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o +obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o +obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o(quoted diff) +0
-0
b/arch/arm/plat-s5p/dev-fimc0.c
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000..8849de4arch/arm/plat-s5p/dev-fimc0.c new file +0
-0
Quoted 8 lines
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc0.c line 7
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc0.c new file +7
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc0.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC0 resource and device definitions +* +* This program is free software; you can redistribute it and/or
modify
Quoted 36 lines
Quoted 36 lines
arch/arm/plat-s5p/dev-fimc0.c line 10
Quoted 3 lines
arch/arm/plat-s5p/dev-fimc0.c new file +3
-0+* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ Being 1 empty line is better here.
arch/arm/plat-s5p/dev-fimc0.c line 17
Quoted 7 lines
arch/arm/plat-s5p/dev-fimc0.c new file +7
-0+#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = {Please change to s5p_fimc0_resource...it'd helpful to merging dev-fimcX files later...
Quoted 6 lines
arch/arm/plat-s5p/dev-fimc0.c new file +6
-0+ [0] = { + .start = S5P_PA_FIMC0, + .end = S5P_PA_FIMC0 + SZ_1M - 1, + .flags = IORESOURCE_MEM, + }, + [1] = {arch/arm/plat-s5p/dev-fimc0.c line 33
Quoted 10 lines
arch/arm/plat-s5p/dev-fimc0.c new file +10
-0+ .start = IRQ_FIMC0, + .end = IRQ_FIMC0, + .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device s5p_device_fimc0 = { + .name = "s5p-fimc", + .id = 0, + .num_resources = ARRAY_SIZE(s5p_fimc_resource),
s5p_fimc0_resource...
Quoted 6 lines
Quoted 6 lines
arch/arm/plat-s5p/dev-fimc0.c line 34
Quoted 1 line
arch/arm/plat-s5p/dev-fimc0.c new file +1
-0+ .resource = s5p_fimc_resource,
s5p_fimc0_resource...Review
Quoted 2 lines
arch/arm/plat-s5p/dev-fimc0.c new file +1
-0+};(quoted diff) +0
-0
b/arch/arm/plat-s5p/dev-fimc1.c
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000..b1f8970arch/arm/plat-s5p/dev-fimc1.c new file +0
-0
Quoted 8 lines
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc1.c line 7
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc1.c new file +7
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc1.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC1 resource and device definitions +* +* This program is free software; you can redistribute it and/or
modify
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
arch/arm/plat-s5p/dev-fimc1.c new file +21
-0+* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + [0] = { + .start = S5P_PA_FIMC1, + .end = S5P_PA_FIMC1 + SZ_1M - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_FIMC1, + .end = IRQ_FIMC1, + .flags = IORESOURCE_IRQ, + }, +};
Quoted 8 lines
Quoted 8 lines
Review
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc1.c new file +7
-0+ +struct platform_device s5p_device_fimc1 = { + .name = "s5p-fimc", + .id = 1, + .num_resources = ARRAY_SIZE(s5p_fimc_resource), + .resource = s5p_fimc_resource, +};(quoted diff) +0
-0
b/arch/arm/plat-s5p/dev-fimc2.c
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000..20df59darch/arm/plat-s5p/dev-fimc2.c new file +0
-0
Quoted 8 lines
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc2.c line 7
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc2.c new file +7
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc2.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC2 resource and device definitions +* +* This program is free software; you can redistribute it and/or
modify
Quoted 36 lines
Quoted 27 lines
Quoted 27 lines
arch/arm/plat-s5p/dev-fimc2.c new file +27
-0+* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + [0] = { + .start = S5P_PA_FIMC2, + .end = S5P_PA_FIMC2 + SZ_1M - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_FIMC2, + .end = IRQ_FIMC2, + .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device s5p_device_fimc2 = { + .name = "s5p-fimc", + .id = 2, + .num_resources = ARRAY_SIZE(s5p_fimc_resource), + .resource = s5p_fimc_resource,Quoted 8 lines
arch/arm/plat-s5p/dev-fimc2.c line 35
Quoted 1 line
arch/arm/plat-s5p/dev-fimc2.c new file +1
-0+};This is just for your information...
I'm working on handling plat device in case of various # of each AP FIMC withCONFIG_NR_FIMC...
So in this case, all of plat data for FIMC will be merged into 'plat-s5p/dev-fimc.c' or 'devs.c' later.
...but I'm not sure some stuff...anyway...
Quoted 4 lines
If you have these plan, then there's no reason to separate the dev-fimcX as this patch, Just one file the dev-fimc from now. Other devices are same rules.
If you want now, just 'dev-fimc.c' is ok...but in that case, need to add '#ifdef CONFIG_S5P_DEV_FIMCX' in there..and 'OR' in Makefile for dev-fimc.o
Quoted 18 lines
Quoted 18 lines
Review
Quoted 2 lines
(quoted diff) +0
-0b/arch/arm/plat-
Quoted 6 lines
samsung/include/plat/fimc-core.h
new file mode 100644
index 0000000..a884edearch/arm/plat-samsung/include/plat/fimc-core.h line 9
Quoted 9 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +9
-0@@ -0,0 +1,45 @@ +/* +* arch/arm/plat-samsung/include/plat/fimc-core.h +* +* Copyright 2010 Samsung Electronics Co., Ltd. +* Sylwester Nawrocki <[email protected]> +* +* Samsung camera interface driver core functions +* +* This program is free software; you can redistribute it and/or
modify
Quoted 8 lines
Quoted 8 lines
arch/arm/plat-samsung/include/plat/fimc-core.h
Quoted 8 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +8
-0+* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#ifndef __ASM_PLAT_FIMC_CORE_H +#define __ASM_PLAT_FIMC_CORE_H __FILE__ + +/* +* These functions are only for use with the core support code, such
as
Quoted 6 lines
Quoted 6 lines
arch/arm/plat-samsung/include/plat/fimc-core.h
Quoted 6 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +6
-0+* the CPU-specific initialization code. +*/ + +#include <plat/fimc.h> + +/* Re-define device name to differentiate the subsystem in various
SoCs.
Quoted 31 lines
Quoted 31 lines
*/
Quoted 30 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +22
-0+static inline void s3c_fimc_setname (int id,char *name) +{ + switch (id) { +#ifdef CONFIG_S5P_DEV_FIMC0 + case 0: + s5p_device_fimc0.name = name; + break; +#endif +#ifdef CONFIG_S5P_DEV_FIMC1 + case 1: + s5p_device_fimc1.name = name; + break; +#endif +#ifdef CONFIG_S5P_DEV_FIMC2 + case 2: + s5p_device_fimc2.name = name; + break; +#endif + } +} + +#endif /* __ASM_PLAT_FIMC_CORE_H */ arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/fimc.h +0
-0
samsung/include/plat/fimc.h
new file mode 100644
index 0000000..fda2040arch/arm/plat-samsung/include/plat/fimc.h new file +1
-0@@ -0,0 +1,22 @@ +/* linux/arch/arm/plat-samsung/include/plat/fimc.h
Quoted 8 lines
Quoted 8 lines
arch/arm/plat-samsung/include/plat/fimc.h
Quoted 8 lines
arch/arm/plat-samsung/include/plat/fimc.h new file +8
-0+* +* Platform header file for S3C/S5P FIMC driver +* +* Copyright (c) 2010 Samsung Electronics +* +* Sylwester Nawrocki, <[email protected]> +* +* This program is free software; you can redistribute it and/or
modify
Quoted 14 lines
Quoted 14 lines
arch/arm/plat-samsung/include/plat/fimc.h line 20
Quoted 11 lines
arch/arm/plat-samsung/include/plat/fimc.h new file +11
-0+* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#ifndef FIMC_H_ +#define FIMC_H_ + +#include <linux/platform_device.h> + +extern struct platform_device s5p_device_fimc0; +extern struct platform_device s5p_device_fimc1; +extern struct platform_device s5p_device_fimc2;Should being in '
plat-samsung/include/plat/devs.h'.
Quoted 6 lines
Quoted 6 lines
arch/arm/plat-samsung/include/plat/fimc.h
Quoted 3 lines
arch/arm/plat-samsung/include/plat/fimc.h new file +2
-1+ +#endif /* FIMC_H_ */ --Marek, could you please address as soon as possible?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v4 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
Quoted 170 lines · Kukjin Kim
Quoted 118 lines · Kyungmin Park
Quoted 116 lines · Kukjin Kim
Quoted 7 lines · Marek Szyprowski
From: Sylwester Nawrocki <[email protected]>
FIMC (CAMIF) device is a camera interface embedded in S3C/S5P Samsung SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and rotation.
Quoted 8 lines
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
This is patch is a v3 version rebased onto latest kgene/for-next tree. New entries in
map.hfiles has been sorted by the physicall address.Thanks for your addressing.
Quoted 98 lines
I'm resending this patch on behalf of Sylwester who is on holidays this week.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
---?arch/arm/mach-s5pc100/include/mach/map.h ? ? ? | ? ?7 ++++ ?arch/arm/mach-s5pv210/cpu.c ? ? ? ? ? ? ? ? ? ?| ? ?5 +++ ?arch/arm/mach-s5pv210/include/mach/map.h ? ? ? | ? ?8 ++++ ?arch/arm/plat-s5p/Kconfig ? ? ? ? ? ? ? ? ? ? ?| ? 16 ++++++++ ?arch/arm/plat-s5p/Makefile ? ? ? ? ? ? ? ? ? ? | ? ?3 ++ ?arch/arm/plat-s5p/dev-fimc0.c ? ? ? ? ? ? ? ? ?| ? 35++++++++++++++++++
?arch/arm/plat-s5p/dev-fimc1.c ? ? ? ? ? ? ? ? ?| ? 35
++++++++++++++++++
?arch/arm/plat-s5p/dev-fimc2.c ? ? ? ? ? ? ? ? ?| ? 35
++++++++++++++++++
?arch/arm/plat-samsung/include/plat/fimc-core.h | ? 45
++++++++++++++++++++++++
?arch/arm/plat-samsung/include/plat/fimc.h ? ? ?| ? 22 +++++++++++ ?10 files changed, 211 insertions(+), 0 deletions(-) ?create mode 100644arch/arm/plat-s5p/dev-fimc0.c?create mode 100644arch/arm/plat-s5p/dev-fimc1.c?create mode 100644arch/arm/plat-s5p/dev-fimc2.c?create mode 100644arch/arm/plat-samsung/include/plat/fimc-core.h?create mode 100644arch/arm/plat-samsung/include/plat/fimc.harch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/map.h +0
-0
s5pc100/include/mach/map.h
index c018697..3abe7f5 100644arch/arm/mach-s5pc100/include/mach/map.h +4
-0@@ -99,6 +99,10 @@ ?#define S5PC100_PA_FB ? ? ? ? ? ? ? ?(0xEE000000) +#define S5PC100_PA_FIMC0 ? ? (0xEE200000) +#define S5PC100_PA_FIMC1 ? ? (0xEE300000) +#define S5PC100_PA_FIMC2 ? ? (0xEE400000) + ?#define S5PC100_PA_I2S0 ? ? ? ? ? ? ?(0xF2000000) ?#define S5PC100_PA_I2S1 ? ? ? ? ? ? ?(0xF2100000) ?#define S5PC100_PA_I2S2 ? ? ? ? ? ? ?(0xF2200000)@@ -143,6 +147,9 @@?#define
S3C_PA_ONENAND_BUF?S5PC100_PA_ONENAND_BUF?#defineS3C_SZ_ONENAND_BUF?S5PC100_SZ_ONENAND_BUF?#defineS3C_PA_RTC? ? ? ? ?S5PC100_PA_RTCarch/arm/mach-s5pc100/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 ? ? ? ? S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? S5PC100_PA_FIMC2?#define
SAMSUNG_PA_ADC? ? ? ? ? ? ?S5PC100_PA_TSADC?#defineSAMSUNG_PA_CFCON? ?S5PC100_PA_CFCONarch/arm/mach-s5pv210/cpu.c +0
-0@@ -37,6 +37,7 @@?#include <
plat/iic-core.h>
?#include <plat/keypad-core.h>
?#include <plat/sdhci.h>
+#include <plat/fimc-core.h>
?#include <plat/reset.h>?/* Initial IO mappings */
arch/arm/mach-s5pv210/cpu.c +0
-0@@ -104,6 +105,10 @@ void __init s5pv210_map_io(void)? ? ? /* Use s5pv210-keypad instead of samsung-keypad */ ? ? ?
samsung_keypad_setname("s5pv210-keypad"); +
+ ? ?s3c_fimc_setname(0, "s5pv210-fimc");
+ ? ?s3c_fimc_setname(1, "s5pv210-fimc");
+ ? ?s3c_fimc_setname(2, "s5pv210-fimc");
?}?void
__inits5pv210_init_clocks(int xtal)arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/map.h +0
-0
s5pv210/include/mach/map.h
index 986b285..6a07e55 100644arch/arm/mach-s5pv210/include/mach/map.h +4
-0@@ -65,6 +65,10 @@ ?#define S5PV210_PA_FB ? ? ? ? ? ? ? ?(0xF8000000) +#define S5PV210_PA_FIMC0 ? ? (0xFB200000) +#define S5PV210_PA_FIMC1 ? ? (0xFB300000) +#define S5PV210_PA_FIMC2 ? ? (0xFB400000) + ?#define S5PV210_PA_HSMMC(x) ?(0xEB000000 + ((x) * 0x100000)) ?#define S5PV210_PA_VIC0 ? ? ? ? ? ? ?(0xF2000000)@@ -114,4 +118,8 @@?#define
SAMSUNG_PA_CFCON? ?S5PV210_PA_CFCON
?#defineSAMSUNG_PA_KEYPAD? ?S5PV210_PA_KEYPADQuoted 5 lines
Quoted 5 lines
arch/arm/mach-s5pv210/include/mach/map.h
Quoted 3 lines
arch/arm/mach-s5pv210/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 ? ? ? ? S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? S5PV210_PA_FIMC2To use one style is better for reading, merge conflict handling and so
on...
Quoted 11 lines
Quoted 2 lines
The style means to add
S5P_PA_XXXafterS3C_PA_XXXwith C100 case or to modify above C100 case like this.Use the same conversion as previous one. are you okay?
#define
S5PV210_PA_VIC0? ? ? ? (0xF2000000)
#defineS5P_PA_VIC0? ? ? ? ? ?S5PV210_PA_VIC0#define
S5PV210_PA_VIC1? ? ? ? (0xF2100000)
#defineS5P_PA_VIC1? ? ? ? ? ?S5PV210_PA_VIC1Quoted 9 lines
#define
S5PV210_PA_VIC2? ? ? ? (0xF2200000)
#defineS5P_PA_VIC2? ? ? ? ? ?S5PV210_PA_VIC2#define
S5PV210_PA_VIC3? ? ? ? (0xF2300000)
#defineS5P_PA_VIC3? ? ? ? ? ?S5PV210_PA_VIC3#define
S5PV210_PA_SDRAM? ? ? ?(0x30000000)
#defineS5P_PA_SDRAM? ? ? ? ? ?S5PV210_PA_SDRAMNo.
Did you see above C100?
--- C100
?#define
S3C_PA_ONENAND_BUF? ? ? ? ? ?S5PC100_PA_ONENAND_BUF?#defineS3C_SZ_ONENAND_BUF? ? ? ? ? ?S5PC100_SZ_ONENAND_BUF?#defineS3C_PA_RTC? ? ? ? ? ?S5PC100_PA_RTC(quoted diff) +3
-0+#define S5P_PA_FIMC0 ? ? ? ? ? S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? ? S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? ? S5PC100_PA_FIMC2?#define
SAMSUNG_PA_ADC? ? ? ? ? ? ?S5PC100_PA_TSADC?#defineSAMSUNG_PA_CFCON? ?S5PC100_PA_CFCON--- V210
?#define
SAMSUNG_PA_CFCON? ? ? ? ? ? ?S5PV210_PA_CFCON?#defineSAMSUNG_PA_KEYPAD? ? ? ? ? ? ?S5PV210_PA_KEYPAD(quoted diff) +3
-0+#define S5P_PA_FIMC0 ? ? ? ? ? S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? ? S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? ? S5PV210_PA_FIMC2
Quoted 1 line
I mean it's just ordering.
Yes I also mean it don't separate the related definitions. so place adjacent as the the previous.
Quoted 317 lines
Quoted 45 lines
Quoted 31 lines
Quoted 18 lines
+
?#endif /*__ASM_ARCH_MAP_H*/arch/arm/plat-s5p/Kconfig +0
-0@@ -5,6 +5,22 @@?#
?# Licensed under GPLv2arch/arm/plat-s5p/Kconfig +6
-0+config S5P_DEV_FIMC0 + ? ? bool + ? ? help + ? ? ? Compile in platform device definitions for FIMC controller 0 + +config S5P_DEV_FIMC1arch/arm/plat-s5p/Kconfig
Quoted 10 lines
arch/arm/plat-s5p/Kconfig +10
-0+ ? ? bool + ? ? help + ? ? ? Compile in platform device definitions for FIMC controller 1 + +config S5P_DEV_FIMC2 + ? ? bool + ? ? help + ? ? ? Compile in platform device definitions for FIMC controller 2 + +2 empty lines.
Quoted 14 lines
Quoted 9 lines
?config
PLAT_S5P
? ? ? bool
? ? ? depends on (ARCH_S5P6440||ARCH_S5P6442||ARCH_S5PC100||ARCH_S5PV210||ARCH_S5PV310)arch/arm/plat-s5p/Makefile +0
-0@@ -19,3 +19,6 @@ obj-y ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? += clock.oQuoted 3 lines
?obj-y ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+= irq.o
?obj-$(CONFIG_S5P_EXT_INT) ? ?+= irq-eint.oPlease add '# devices' here...
Quoted 6 lines
It's not related with this patch.
Quoted 5 lines
Review
Quoted 5 lines
arch/arm/plat-s5p/Makefile +3
-0+obj-$(CONFIG_S5P_DEV_FIMC0) ?+= dev-fimc0.o +obj-$(CONFIG_S5P_DEV_FIMC1) ?+= dev-fimc1.o +obj-$(CONFIG_S5P_DEV_FIMC2) ?+= dev-fimc2.o(quoted diff) +0
-0
b/arch/arm/plat-s5p/dev-fimc0.cQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000..8849de4arch/arm/plat-s5p/dev-fimc0.c new file +0
-0Quoted 8 lines
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc0.c line 7
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc0.c new file +7
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc0.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC0 resource and device definitions +* +* This program is free software; you can redistribute it and/or modify
Quoted 36 lines
Quoted 36 lines
arch/arm/plat-s5p/dev-fimc0.c line 10
Quoted 3 lines
arch/arm/plat-s5p/dev-fimc0.c new file +3
-0+* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ Being 1 empty line is better here.
arch/arm/plat-s5p/dev-fimc0.c line 17
Quoted 7 lines
arch/arm/plat-s5p/dev-fimc0.c new file +7
-0+#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = {Please change to s5p_fimc0_resource...it'd helpful to merging dev-fimcX files later...
Quoted 6 lines
arch/arm/plat-s5p/dev-fimc0.c new file +6
-0+ ? ? [0] = { + ? ? ? ? ? ? .start ?= S5P_PA_FIMC0, + ? ? ? ? ? ? .end ? ?= S5P_PA_FIMC0 + SZ_1M - 1, + ? ? ? ? ? ? .flags ?= IORESOURCE_MEM, + ? ? }, + ? ? [1] = {arch/arm/plat-s5p/dev-fimc0.c line 33
Quoted 10 lines
arch/arm/plat-s5p/dev-fimc0.c new file +10
-0+ ? ? ? ? ? ? .start ?= IRQ_FIMC0, + ? ? ? ? ? ? .end ? ?= IRQ_FIMC0, + ? ? ? ? ? ? .flags ?= IORESOURCE_IRQ, + ? ? }, +}; + +struct platform_device s5p_device_fimc0 = { + ? ? .name ? ? ? ? ? = "s5p-fimc", + ? ? .id ? ? ? ? ? ? = 0, + ? ? .num_resources ?= ARRAY_SIZE(s5p_fimc_resource),
s5p_fimc0_resource...Quoted 6 lines
Quoted 6 lines
arch/arm/plat-s5p/dev-fimc0.c line 34
Quoted 1 line
arch/arm/plat-s5p/dev-fimc0.c new file +1
-0+ ? ? .resource ? ? ? = s5p_fimc_resource,
s5p_fimc0_resource...Review
Quoted 2 lines
arch/arm/plat-s5p/dev-fimc0.c new file +1
-0+};(quoted diff) +0
-0
b/arch/arm/plat-s5p/dev-fimc1.cQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000..b1f8970arch/arm/plat-s5p/dev-fimc1.c new file +0
-0Quoted 8 lines
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc1.c line 7
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc1.c new file +7
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc1.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC1 resource and device definitions +* +* This program is free software; you can redistribute it and/or modify
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
arch/arm/plat-s5p/dev-fimc1.c new file +21
-0+* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + ? ? [0] = { + ? ? ? ? ? ? .start ?= S5P_PA_FIMC1, + ? ? ? ? ? ? .end ? ?= S5P_PA_FIMC1 + SZ_1M - 1, + ? ? ? ? ? ? .flags ?= IORESOURCE_MEM, + ? ? }, + ? ? [1] = { + ? ? ? ? ? ? .start ?= IRQ_FIMC1, + ? ? ? ? ? ? .end ? ?= IRQ_FIMC1, + ? ? ? ? ? ? .flags ?= IORESOURCE_IRQ, + ? ? }, +};Quoted 8 lines
Quoted 8 lines
Review
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc1.c new file +7
-0+ +struct platform_device s5p_device_fimc1 = { + ? ? .name ? ? ? ? ? = "s5p-fimc", + ? ? .id ? ? ? ? ? ? = 1, + ? ? .num_resources ?= ARRAY_SIZE(s5p_fimc_resource), + ? ? .resource ? ? ? = s5p_fimc_resource, +};(quoted diff) +0
-0
b/arch/arm/plat-s5p/dev-fimc2.cQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000..20df59darch/arm/plat-s5p/dev-fimc2.c new file +0
-0Quoted 8 lines
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc2.c line 7
Quoted 8 lines
arch/arm/plat-s5p/dev-fimc2.c new file +7
-0@@ -0,0 +1,35 @@ +/* linux/arch/arm/plat-s5p/dev-fimc2.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC2 resource and device definitions +* +* This program is free software; you can redistribute it and/or modify
Quoted 36 lines
Quoted 27 lines
Quoted 27 lines
arch/arm/plat-s5p/dev-fimc2.c new file +27
-0+* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc_resource[] = { + ? ? [0] = { + ? ? ? ? ? ? .start ?= S5P_PA_FIMC2, + ? ? ? ? ? ? .end ? ?= S5P_PA_FIMC2 + SZ_1M - 1, + ? ? ? ? ? ? .flags ?= IORESOURCE_MEM, + ? ? }, + ? ? [1] = { + ? ? ? ? ? ? .start ?= IRQ_FIMC2, + ? ? ? ? ? ? .end ? ?= IRQ_FIMC2, + ? ? ? ? ? ? .flags ?= IORESOURCE_IRQ, + ? ? }, +}; + +struct platform_device s5p_device_fimc2 = { + ? ? .name ? ? ? ? ? = "s5p-fimc", + ? ? .id ? ? ? ? ? ? = 2, + ? ? .num_resources ?= ARRAY_SIZE(s5p_fimc_resource), + ? ? .resource ? ? ? = s5p_fimc_resource,Quoted 8 lines
arch/arm/plat-s5p/dev-fimc2.c line 35
Quoted 1 line
arch/arm/plat-s5p/dev-fimc2.c new file +1
-0+};This is just for your information...
I'm working on handling plat device in case of various # of each AP FIMC withCONFIG_NR_FIMC...
So in this case, all of plat data for FIMC will be merged into 'plat-s5p/dev-fimc.c' or 'devs.c' later.
...but I'm not sure some stuff...anyway...Quoted 4 lines
If you have these plan, then there's no reason to separate the dev-fimcX as this patch, Just one file the dev-fimc from now. Other devices are same rules.
If you want now, just '
dev-fimc.c' is ok...but in that case, need to add '#ifdefCONFIG_S5P_DEV_FIMCX' in there..and 'OR' inMakefilefor dev-fimc.oQuoted 18 lines
Quoted 18 lines
Review
Quoted 2 lines
(quoted diff) +0
-0b/arch/arm/plat-
Quoted 6 lines
samsung/include/plat/fimc-core.h
new file mode 100644
index 0000000..a884edearch/arm/plat-samsung/include/plat/fimc-core.h line 9
Quoted 9 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +9
-0@@ -0,0 +1,45 @@ +/* +* arch/arm/plat-samsung/include/plat/fimc-core.h +* +* Copyright 2010 Samsung Electronics Co., Ltd. +* ? Sylwester Nawrocki <[email protected]> +* +* Samsung camera interface driver core functions +* +* This program is free software; you can redistribute it and/or modify
Quoted 8 lines
Quoted 8 lines
arch/arm/plat-samsung/include/plat/fimc-core.h
Quoted 8 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +8
-0+* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#ifndef __ASM_PLAT_FIMC_CORE_H +#define __ASM_PLAT_FIMC_CORE_H __FILE__ + +/* +* These functions are only for use with the core support code, such as
Quoted 6 lines
Quoted 6 lines
arch/arm/plat-samsung/include/plat/fimc-core.h
Quoted 6 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +6
-0+* the CPU-specific initialization code. +*/ + +#include <plat/fimc.h> + +/* Re-define device name to differentiate the subsystem in various SoCs.
Quoted 31 lines
Quoted 31 lines
*/
Quoted 30 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +22
-0+static inline void s3c_fimc_setname (int id,char *name) +{ + ? ? switch (id) { +#ifdef CONFIG_S5P_DEV_FIMC0 + ? ? case 0: + ? ? ? ? ? ? s5p_device_fimc0.name = name; + ? ? ? ? ? ? break; +#endif +#ifdef CONFIG_S5P_DEV_FIMC1 + ? ? case 1: + ? ? ? ? ? ? s5p_device_fimc1.name = name; + ? ? ? ? ? ? break; +#endif +#ifdef CONFIG_S5P_DEV_FIMC2 + ? ? case 2: + ? ? ? ? ? ? s5p_device_fimc2.name = name; + ? ? ? ? ? ? break; +#endif + ? ? } +} + +#endif /* __ASM_PLAT_FIMC_CORE_H */ arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/fimc.h +0
-0
samsung/include/plat/fimc.h
new file mode 100644
index 0000000..fda2040arch/arm/plat-samsung/include/plat/fimc.h new file +1
-0@@ -0,0 +1,22 @@ +/* linux/arch/arm/plat-samsung/include/plat/fimc.h Quoted 8 lines
Quoted 8 lines
arch/arm/plat-samsung/include/plat/fimc.h
Quoted 8 lines
arch/arm/plat-samsung/include/plat/fimc.h new file +8
-0+* +* Platform header file for S3C/S5P FIMC driver +* +* Copyright (c) 2010 Samsung Electronics +* +* Sylwester Nawrocki, <[email protected]> +* +* This program is free software; you can redistribute it and/or modify
Quoted 14 lines
Quoted 14 lines
arch/arm/plat-samsung/include/plat/fimc.h line 20
Quoted 11 lines
arch/arm/plat-samsung/include/plat/fimc.h new file +11
-0+* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#ifndef FIMC_H_ +#define FIMC_H_ + +#include <linux/platform_device.h> + +extern struct platform_device s5p_device_fimc0; +extern struct platform_device s5p_device_fimc1; +extern struct platform_device s5p_device_fimc2;Should being in '
plat-samsung/include/plat/devs.h'.Quoted 6 lines
Quoted 6 lines
arch/arm/plat-samsung/include/plat/fimc.h
Quoted 3 lines
arch/arm/plat-samsung/include/plat/fimc.h new file +2
-1+ +#endif /* FIMC_H_ */ --Marek, could you please address as soon as possible?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html
PATCH v4 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
Quoted 5 lines · Kyungmin Park
Quoted 3 lines · Kukjin Kim
Quoted 2 lines · Kyungmin Park
On Tue, Aug 3, 2010 at 8:58 AM, Kukjin Kim <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines · Marek Szyprowski
From: Sylwester Nawrocki <[email protected]>
FIMC (CAMIF) device is a camera interface embedded in S3C/S5P
Samsung
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and
rotation.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
This is patch is a v3 version rebased onto latest kgene/for-next
tree.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
New entries in
map.hfiles has been sorted by the physicall address.Thanks for your addressing.
Quoted 1 line
I'm resending this patch on behalf of Sylwester who is on holidays
this
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
week.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
---
(snip)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +0
-0
b/arch/arm/mach-
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
s5pc100/include/mach/map.h
index c018697..3abe7f5 100644arch/arm/mach-s5pc100/include/mach/map.h +7
-0@@ -99,6 +99,10 @@ #define S5PC100_PA_FB (0xEE000000) +#define S5PC100_PA_FIMC0 (0xEE200000) +#define S5PC100_PA_FIMC1 (0xEE300000) +#define S5PC100_PA_FIMC2 (0xEE400000) + #define S5PC100_PA_I2S0 (0xF2000000) #define S5PC100_PA_I2S1 (0xF2100000) #define S5PC100_PA_I2S2 (0xF2200000)@@ -143,6 +147,9 @@ #define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF #define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF #define S3C_PA_RTC S5PC100_PA_RTC +#define S5P_PA_FIMC0 S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 S5PC100_PA_FIMC2
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Review
Quoted 3 lines
arch/arm/mach-s5pc100/include/mach/map.h +0
-0#define SAMSUNG_PA_ADC S5PC100_PA_TSADC #define SAMSUNG_PA_CFCON S5PC100_PA_CFCON(quoted diff) +0
-0
b/arch/arm/mach-s5pv210/cpu.c
(snip)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/mach-
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
s5pv210/include/mach/map.h
index 986b285..6a07e55 100644arch/arm/mach-s5pv210/include/mach/map.h +4
-0@@ -65,6 +65,10 @@ #define S5PV210_PA_FB (0xF8000000) +#define S5PV210_PA_FIMC0 (0xFB200000) +#define S5PV210_PA_FIMC1 (0xFB300000) +#define S5PV210_PA_FIMC2 (0xFB400000) + #define S5PV210_PA_HSMMC(x) (0xEB000000 + ((x) * 0x100000)) #define S5PV210_PA_VIC0 (0xF2000000)@@ -114,4 +118,8 @@ #define SAMSUNG_PA_CFCON S5PV210_PA_CFCON #define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
arch/arm/mach-s5pv210/include/mach/map.h line 123
Quoted 3 lines
arch/arm/mach-s5pv210/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 S5PV210_PA_FIMC2To use one style is better for reading, merge conflict handling and
so
Quoted 43 lines
Quoted 2 lines
on...
Quoted 1 line
Quoted 1 line
The style means to add
S5P_PA_XXXafterS3C_PA_XXXwith C100 case orto
Quoted 40 lines
Quoted 10 lines
Quoted 1 line
modify above C100 case like this.
Use the same conversion as previous one. are you okay?
#define
S5PV210_PA_VIC0(0xF2000000)
#defineS5P_PA_VIC0S5PV210_PA_VIC0#define
S5PV210_PA_VIC1(0xF2100000)
#defineS5P_PA_VIC1S5PV210_PA_VIC1Quoted 9 lines
#define
S5PV210_PA_VIC2(0xF2200000)
#defineS5P_PA_VIC2S5PV210_PA_VIC2#define
S5PV210_PA_VIC3(0xF2300000)
#defineS5P_PA_VIC3S5PV210_PA_VIC3#define
S5PV210_PA_SDRAM(0x30000000)
#defineS5P_PA_SDRAMS5PV210_PA_SDRAMNo.
Did you see above C100?
--- C100
#define
S3C_PA_ONENAND_BUFS5PC100_PA_ONENAND_BUF#defineS3C_SZ_ONENAND_BUFS5PC100_SZ_ONENAND_BUF#defineS3C_PA_RTCS5PC100_PA_RTCarch/arm/mach-s5pc100/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 S5PC100_PA_FIMC2#define
SAMSUNG_PA_ADCS5PC100_PA_TSADC#defineSAMSUNG_PA_CFCONS5PC100_PA_CFCON--- V210
#define
SAMSUNG_PA_CFCONS5PV210_PA_CFCON#defineSAMSUNG_PA_KEYPADS5PV210_PA_KEYPAD
Quoted 9 lines
Quoted 5 lines
arch/arm/mach-s5pv210/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 S5PV210_PA_FIMC2I mean it's just ordering.
Yes I also mean it don't separate the related definitions. so place adjacent as the the previous.
No...maybe you misunderstood...hmm :-(
Please add in map.h of V210 like following.
@@ -110,6 +110,10 @@
#define S3C_PA_RTC S5PV210_PA_RTC
#define S3C_PA_WDT S5PV210_PA_WATCHDOG
+#define S5P_PA_FIMC0 S5PV210_PA_FIMC0
+#define S5P_PA_FIMC1 S5PV210_PA_FIMC1
+#define S5P_PA_FIMC2 S5PV210_PA_FIMC2
+
#define SAMSUNG_PA_ADC S5PV210_PA_ADC
#define SAMSUNG_PA_CFCON S5PV210_PA_CFCON
#define SAMSUNG_PA_KEYPAD S5PV210_PA_KEYPAD
(snip)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v4 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
Quoted 147 lines · Kukjin Kim
Quoted 5 lines · Kyungmin Park
Quoted 3 lines · Kukjin Kim
Quoted 2 lines · Kyungmin Park
On Tue, Aug 3, 2010 at 8:58 AM, Kukjin Kim <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines · Marek Szyprowski
From: Sylwester Nawrocki <[email protected]>
FIMC (CAMIF) device is a camera interface embedded in S3C/S5P
Samsung
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and
rotation.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
This is patch is a v3 version rebased onto latest kgene/for-next
tree.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
New entries in
map.hfiles has been sorted by the physicall address.Thanks for your addressing.
Quoted 1 line
I'm resending this patch on behalf of Sylwester who is on holidays
this
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
week.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
---(snip)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +0
-0b/arch/arm/mach-
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
s5pc100/include/mach/map.h
index c018697..3abe7f5 100644arch/arm/mach-s5pc100/include/mach/map.h +4
-0@@ -99,6 +99,10 @@ ?#define S5PC100_PA_FB ? ? ? ? ? ? ? ?(0xEE000000) +#define S5PC100_PA_FIMC0 ? ? (0xEE200000) +#define S5PC100_PA_FIMC1 ? ? (0xEE300000) +#define S5PC100_PA_FIMC2 ? ? (0xEE400000) + ?#define S5PC100_PA_I2S0 ? ? ? ? ? ? ?(0xF2000000) ?#define S5PC100_PA_I2S1 ? ? ? ? ? ? ?(0xF2100000) ?#define S5PC100_PA_I2S2 ? ? ? ? ? ? ?(0xF2200000)@@ -143,6 +147,9 @@?#define
S3C_PA_ONENAND_BUF?S5PC100_PA_ONENAND_BUF?#defineS3C_SZ_ONENAND_BUF?S5PC100_SZ_ONENAND_BUF?#defineS3C_PA_RTC? ? ? ? ?S5PC100_PA_RTCarch/arm/mach-s5pc100/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 ? ? ? ? S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? S5PC100_PA_FIMC2Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Review
Quoted 3 lines
?#define
SAMSUNG_PA_ADC? ? ? ? ? ? ?S5PC100_PA_TSADC?#defineSAMSUNG_PA_CFCON? ?S5PC100_PA_CFCON(quoted diff) +0
-0
b/arch/arm/mach-s5pv210/cpu.c(snip)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Review
Quoted 1 line
(quoted diff) +0
-0b/arch/arm/mach-
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
s5pv210/include/mach/map.h
index 986b285..6a07e55 100644arch/arm/mach-s5pv210/include/mach/map.h +4
-0@@ -65,6 +65,10 @@ ?#define S5PV210_PA_FB ? ? ? ? ? ? ? ?(0xF8000000) +#define S5PV210_PA_FIMC0 ? ? (0xFB200000) +#define S5PV210_PA_FIMC1 ? ? (0xFB300000) +#define S5PV210_PA_FIMC2 ? ? (0xFB400000) + ?#define S5PV210_PA_HSMMC(x) ?(0xEB000000 + ((x) * 0x100000)) ?#define S5PV210_PA_VIC0 ? ? ? ? ? ? ?(0xF2000000)@@ -114,4 +118,8 @@?#define
SAMSUNG_PA_CFCON? ?S5PV210_PA_CFCON
?#defineSAMSUNG_PA_KEYPAD? ?S5PV210_PA_KEYPADQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
arch/arm/mach-s5pv210/include/mach/map.h
Quoted 3 lines
arch/arm/mach-s5pv210/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 ? ? ? ? S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? S5PV210_PA_FIMC2To use one style is better for reading, merge conflict handling and
so
Quoted 47 lines
Quoted 2 lines
on...
Quoted 1 line
Quoted 1 line
The style means to add
S5P_PA_XXXafterS3C_PA_XXXwith C100 case orto
Quoted 44 lines
Quoted 10 lines
Quoted 1 line
modify above C100 case like this.
Use the same conversion as previous one. are you okay?
#define
S5PV210_PA_VIC0? ? ? ? (0xF2000000)
#defineS5P_PA_VIC0? ? ? ? ? ?S5PV210_PA_VIC0#define
S5PV210_PA_VIC1? ? ? ? (0xF2100000)
#defineS5P_PA_VIC1? ? ? ? ? ?S5PV210_PA_VIC1Quoted 9 lines
#define
S5PV210_PA_VIC2? ? ? ? (0xF2200000)
#defineS5P_PA_VIC2? ? ? ? ? ?S5PV210_PA_VIC2#define
S5PV210_PA_VIC3? ? ? ? (0xF2300000)
#defineS5P_PA_VIC3? ? ? ? ? ?S5PV210_PA_VIC3#define
S5PV210_PA_SDRAM? ? ? ?(0x30000000)
#defineS5P_PA_SDRAM? ? ? ? ? ?S5PV210_PA_SDRAMNo.
Did you see above C100?
--- C100
?#define
S3C_PA_ONENAND_BUF? ? ? ? ? ?S5PC100_PA_ONENAND_BUF?#defineS3C_SZ_ONENAND_BUF? ? ? ? ? ?S5PC100_SZ_ONENAND_BUF?#defineS3C_PA_RTC? ? ? ? ? ?S5PC100_PA_RTC(quoted diff) +3
-0+#define S5P_PA_FIMC0 ? ? ? ? ? S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? ? S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? ? S5PC100_PA_FIMC2?#define
SAMSUNG_PA_ADC? ? ? ? ? ? ?S5PC100_PA_TSADC?#defineSAMSUNG_PA_CFCON? ?S5PC100_PA_CFCON--- V210
?#define
SAMSUNG_PA_CFCON? ? ? ? ? ? ?S5PV210_PA_CFCON?#defineSAMSUNG_PA_KEYPAD? ? ? ? ? ? ?S5PV210_PA_KEYPAD(quoted diff) +3
-0+#define S5P_PA_FIMC0 ? ? ? ? ? S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? ? S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? ? S5PV210_PA_FIMC2
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
I mean it's just ordering.
Yes I also mean it don't separate the related definitions. so place adjacent as the the previous.
No...maybe you misunderstood...hmm :-(
Please add inmap.hof V210 like following.
Then please also apply the same rules at existing definitions.
Quoted 28 lines
(quoted diff) +0
-0@@ -110,6 +110,10 @@?#define
S3C_PA_RTC? ? ? ? ? ?S5PV210_PA_RTC?#defineS3C_PA_WDT? ? ? ? ? ?S5PV210_PA_WATCHDOG(quoted diff) +4
-0+#define S5P_PA_FIMC0 ? ? ? ? ? S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? ? S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? ? S5PV210_PA_FIMC2 +?#define
SAMSUNG_PA_ADC? ? ? ?S5PV210_PA_ADC?#defineSAMSUNG_PA_CFCON? ? ? ? ? ? ?S5PV210_PA_CFCON?#defineSAMSUNG_PA_KEYPAD? ? ? ? ? ? ?S5PV210_PA_KEYPAD(snip)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html
PATCH v4 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
Quoted 5 lines · Kyungmin Park
Quoted 3 lines · Kukjin Kim
Quoted 2 lines · Kyungmin Park
On Tue, Aug 3, 2010 at 9:46 AM, Kukjin Kim <[email protected]>
Quoted 14 lines · wrote:
Quoted 14 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines · Kyungmin Park
On Tue, Aug 3, 2010 at 8:58 AM, Kukjin Kim <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines · Marek Szyprowski
From: Sylwester Nawrocki <[email protected]>
FIMC (CAMIF) device is a camera interface embedded in S3C/S5P
Samsung
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and
rotation.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
This is patch is a v3 version rebased onto latest kgene/for-next
tree.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
New entries in
map.hfiles has been sorted by the physicall
address.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Thanks for your addressing.
Quoted 1 line
I'm resending this patch on behalf of Sylwester who is on
holidays
Quoted 65 lines
Quoted 65 lines
this
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
week.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
---(snip)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +0
-0b/arch/arm/mach-
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
Quoted 23 lines
s5pc100/include/mach/map.h
index c018697..3abe7f5 100644arch/arm/mach-s5pc100/include/mach/map.h +4
-0@@ -99,6 +99,10 @@ ?#define S5PC100_PA_FB ? ? ? ? ? ? ? ?(0xEE000000) +#define S5PC100_PA_FIMC0 ? ? (0xEE200000) +#define S5PC100_PA_FIMC1 ? ? (0xEE300000) +#define S5PC100_PA_FIMC2 ? ? (0xEE400000) + ?#define S5PC100_PA_I2S0 ? ? ? ? ? ? ?(0xF2000000) ?#define S5PC100_PA_I2S1 ? ? ? ? ? ? ?(0xF2100000) ?#define S5PC100_PA_I2S2 ? ? ? ? ? ? ?(0xF2200000)@@ -143,6 +147,9 @@?#define
S3C_PA_ONENAND_BUF?S5PC100_PA_ONENAND_BUF?#defineS3C_SZ_ONENAND_BUF?S5PC100_SZ_ONENAND_BUF?#defineS3C_PA_RTC? ? ? ? ?S5PC100_PA_RTCarch/arm/mach-s5pc100/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 ? ? ? ? S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? S5PC100_PA_FIMC2Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Review
Quoted 3 lines
?#define
SAMSUNG_PA_ADC? ? ? ? ? ? ?S5PC100_PA_TSADC?#defineSAMSUNG_PA_CFCON? ?S5PC100_PA_CFCON(quoted diff) +0
-0
b/arch/arm/mach-s5pv210/cpu.c(snip)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Review
Quoted 1 line
(quoted diff) +0
-0b/arch/arm/mach-
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
s5pv210/include/mach/map.h
index 986b285..6a07e55 100644arch/arm/mach-s5pv210/include/mach/map.h +4
-0@@ -65,6 +65,10 @@ ?#define S5PV210_PA_FB ? ? ? ? ? ? ? ?(0xF8000000) +#define S5PV210_PA_FIMC0 ? ? (0xFB200000) +#define S5PV210_PA_FIMC1 ? ? (0xFB300000) +#define S5PV210_PA_FIMC2 ? ? (0xFB400000) + ?#define S5PV210_PA_HSMMC(x) ?(0xEB000000 + ((x) * 0x100000)) ?#define S5PV210_PA_VIC0 ? ? ? ? ? ? ?(0xF2000000)@@ -114,4 +118,8 @@?#define
SAMSUNG_PA_CFCON? ?S5PV210_PA_CFCON
?#defineSAMSUNG_PA_KEYPAD? ?S5PV210_PA_KEYPAD
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
arch/arm/mach-s5pv210/include/mach/map.h
Quoted 3 lines
arch/arm/mach-s5pv210/include/mach/map.h +3
-0+#define S5P_PA_FIMC0 ? ? ? ? S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? S5PV210_PA_FIMC2To use one style is better for reading, merge conflict handling
and
Quoted 56 lines
Quoted 3 lines
so
Quoted 2 lines
Quoted 2 lines
on...
Quoted 1 line
Quoted 1 line
The style means to add
S5P_PA_XXXafterS3C_PA_XXXwith C100 caseor
Quoted 20 lines
Quoted 20 lines
to
Quoted 19 lines
Quoted 19 lines
Quoted 1 line
modify above C100 case like this.
Use the same conversion as previous one. are you okay?
#define
S5PV210_PA_VIC0? ? ? ? (0xF2000000)
#defineS5P_PA_VIC0? ? ? ? ? ?S5PV210_PA_VIC0#define
S5PV210_PA_VIC1? ? ? ? (0xF2100000)
#defineS5P_PA_VIC1? ? ? ? ? ?S5PV210_PA_VIC1#define
S5PV210_PA_VIC2? ? ? ? (0xF2200000)
#defineS5P_PA_VIC2? ? ? ? ? ?S5PV210_PA_VIC2#define
S5PV210_PA_VIC3? ? ? ? (0xF2300000)
#defineS5P_PA_VIC3? ? ? ? ? ?S5PV210_PA_VIC3#define
S5PV210_PA_SDRAM? ? ? ?(0x30000000)
#defineS5P_PA_SDRAM? ? ? ? ? ?S5PV210_PA_SDRAMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
No.
Did you see above C100?
--- C100
?#define
S3C_PA_ONENAND_BUF? ? ? ? ? ?S5PC100_PA_ONENAND_BUFQuoted 1 line
Quoted 1 line
Quoted 1 line
?#define
S3C_SZ_ONENAND_BUF? ? ? ? ? ?S5PC100_SZ_ONENAND_BUFQuoted 22 lines
Quoted 22 lines
Quoted 17 lines
?#define
S3C_PA_RTC? ? ? ? ? ?S5PC100_PA_RTC(quoted diff) +3
-0+#define S5P_PA_FIMC0 ? ? ? ? ? S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? ? S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? ? S5PC100_PA_FIMC2?#define
SAMSUNG_PA_ADC? ? ? ? ? ? ?S5PC100_PA_TSADC?#defineSAMSUNG_PA_CFCON? ?S5PC100_PA_CFCON--- V210
?#define
SAMSUNG_PA_CFCON? ? ? ? ? ? ?S5PV210_PA_CFCON?#defineSAMSUNG_PA_KEYPAD? ? ? ? ? ? ?S5PV210_PA_KEYPAD(quoted diff) +3
-0+#define S5P_PA_FIMC0 ? ? ? ? ? S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? ? S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? ? S5PV210_PA_FIMC2Quoted 1 line
I mean it's just ordering.
Yes I also mean it don't separate the related definitions. so place adjacent as the the previous.
Quoted 5 lines
Quoted 2 lines
No...maybe you misunderstood...hmm :-(
Please add inmap.hof V210 like following.Then please also apply the same rules at existing definitions.
I meant...there are other orderings in a patch file..so unify style... But..yeah, in this case the criteria about that seems not clear. If need, I will sort it out...firstly please address as I said.
Marek, could you please re-submit for this...?
Quoted 13 lines
Quoted 13 lines
(quoted diff) +0
-0@@ -110,6 +110,10 @@?#define
S3C_PA_RTC? ? ? ? ? ?S5PV210_PA_RTC?#defineS3C_PA_WDT? ? ? ? ? ?S5PV210_PA_WATCHDOG(quoted diff) +4
-0+#define S5P_PA_FIMC0 ? ? ? ? ? S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 ? ? ? ? ? S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 ? ? ? ? ? S5PV210_PA_FIMC2 +?#define
SAMSUNG_PA_ADC? ? ? ?S5PV210_PA_ADC?#defineSAMSUNG_PA_CFCON? ? ? ? ? ? ?S5PV210_PA_CFCON?#defineSAMSUNG_PA_KEYPAD? ? ? ? ? ? ?S5PV210_PA_KEYPAD
Quoted 2 lines
Quoted 2 lines
(snip)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v5 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
In reply to Kukjin KimFrom: Sylwester Nawrocki <[email protected]>
FIMC (CAMIF) device is a camera interface embedded in S3C/S5P Samsung SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and rotation.
---
Changes since v4:
- addressed all minor style issues reported by Kukjin Kim
Changes since v3:
- rebased onto latest kgene/for-next tree
- new entries in map.h files has been sorted by the physicall address
I'm sending this patch on behalf of Sylwerster who is on holidays this week.
Best regards
Signature · 18 lines
Marek Szyprowski Samsung Poland R&D Center --- arch/arm/mach-s5pc100/include/mach/map.h | 7 ++++ arch/arm/mach-s5pv210/cpu.c | 5 +++ arch/arm/mach-s5pv210/include/mach/map.h | 7 ++++ arch/arm/plat-s5p/Kconfig | 15 ++++++++ arch/arm/plat-s5p/Makefile | 5 +++ arch/arm/plat-s5p/dev-fimc0.c | 36 ++++++++++++++++++++ arch/arm/plat-s5p/dev-fimc1.c | 36 ++++++++++++++++++++ arch/arm/plat-s5p/dev-fimc2.c | 36 ++++++++++++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 4 ++ arch/arm/plat-samsung/include/plat/fimc-core.h | 43 ++++++++++++++++++++++++ 10 files changed, 194 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-fimc0.c create mode 100644 arch/arm/plat-s5p/dev-fimc1.c create mode 100644 arch/arm/plat-s5p/dev-fimc2.c create mode 100644 arch/arm/plat-samsung/include/plat/fimc-core.h
arch/arm/mach-s5pc100/include/mach/map.h +7 -0
@@ -99,6 +99,10 @@#define S5PC100_PA_FB (0xEE000000) +#define S5PC100_PA_FIMC0 (0xEE200000) +#define S5PC100_PA_FIMC1 (0xEE300000) +#define S5PC100_PA_FIMC2 (0xEE400000) +#define S5PC100_PA_I2S0 (0xF2000000)#define S5PC100_PA_I2S1 (0xF2100000)#define S5PC100_PA_I2S2 (0xF2200000)
@@ -143,6 +147,9 @@#define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF#define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF#define S3C_PA_RTC S5PC100_PA_RTC +#define S5P_PA_FIMC0 S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 S5PC100_PA_FIMC2#define SAMSUNG_PA_ADC S5PC100_PA_TSADC#define SAMSUNG_PA_CFCON S5PC100_PA_CFCON
arch/arm/mach-s5pv210/cpu.c +5 -0
@@ -37,6 +37,7 @@#include <plat/iic-core.h> #include <plat/keypad-core.h> #include <plat/sdhci.h> +#include <plat/fimc-core.h> #include <plat/reset.h> /* Initial IO mappings */
@@ -104,6 +105,10 @@ void __init s5pv210_map_io(void)/* Use s5pv210-keypad instead of samsung-keypad */ samsung_keypad_setname ("s5pv210-keypad" ); + +s3c_fimc_setname (0 ,"s5pv210-fimc" ); +s3c_fimc_setname (1 ,"s5pv210-fimc" ); +s3c_fimc_setname (2 ,"s5pv210-fimc" ); }void __init s5pv210_init_clocks (int xtal)
arch/arm/mach-s5pv210/include/mach/map.h +7 -0
@@ -65,6 +65,10 @@#define S5PV210_PA_FB (0xF8000000) +#define S5PV210_PA_FIMC0 (0xFB200000) +#define S5PV210_PA_FIMC1 (0xFB300000) +#define S5PV210_PA_FIMC2 (0xFB400000) +#define S5PV210_PA_HSMMC (x) (0xEB000000 + ((x) * 0x100000))#define S5PV210_PA_VIC0 (0xF2000000)
@@ -109,6 +113,9 @@#define S3C_PA_FB S5PV210_PA_FB#define S3C_PA_RTC S5PV210_PA_RTC#define S3C_PA_WDT S5PV210_PA_WATCHDOG +#define S5P_PA_FIMC0 S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 S5PV210_PA_FIMC2#define SAMSUNG_PA_ADC S5PV210_PA_ADC#define SAMSUNG_PA_CFCON S5PV210_PA_CFCON
arch/arm/plat-s5p/Kconfig +15 -0
@@ -5,6 +5,21 @@ # # Licensed under GPLv2 +config S5P_DEV_FIMC0 + bool + help + Compile in platform device definitions for FIMC controller 0 + +config S5P_DEV_FIMC1 + bool + help + Compile in platform device definitions for FIMC controller 1 + +config S5P_DEV_FIMC2 + bool + help + Compile in platform device definitions for FIMC controller 2 + config PLAT_S5P bool depends on (ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_S5PV310)
arch/arm/plat-s5p/Makefile +5 -0
@@ -19,3 +19,8 @@ obj-y += clock.o obj-y += irq.o obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o +# devices + +obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o +obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o +obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o
arch/arm/plat-s5p/dev-fimc0.c new file +36 -0
@@ -0,0 +1,36 @@ +/* linux/arch/arm/plat-s5p/dev-fimc0.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC0 resource and device definitions +* +* 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. +*/ + +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc0_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC0 , + .end =S5P_PA_FIMC0 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC0 , + .end =IRQ_FIMC0 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc0 = { + .name ="s5p-fimc" , + .id =0 , + .num_resources =ARRAY_SIZE (s5p_fimc0_resource), + .resource = s5p_fimc0_resource, +};
arch/arm/plat-s5p/dev-fimc1.c new file +36 -0
@@ -0,0 +1,36 @@ +/* linux/arch/arm/plat-s5p/dev-fimc1.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC1 resource and device definitions +* +* 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. +*/ + +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc1_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC1 , + .end =S5P_PA_FIMC1 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC1 , + .end =IRQ_FIMC1 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc1 = { + .name ="s5p-fimc" , + .id =1 , + .num_resources =ARRAY_SIZE (s5p_fimc1_resource), + .resource = s5p_fimc1_resource, +};
arch/arm/plat-s5p/dev-fimc2.c new file +36 -0
@@ -0,0 +1,36 @@ +/* linux/arch/arm/plat-s5p/dev-fimc2.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC2 resource and device definitions +* +* 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. +*/ + +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc2_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC2 , + .end =S5P_PA_FIMC2 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC2 , + .end =IRQ_FIMC2 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc2 = { + .name ="s5p-fimc" , + .id =2 , + .num_resources =ARRAY_SIZE (s5p_fimc2_resource), + .resource = s5p_fimc2_resource, +};
arch/arm/plat-samsung/include/plat/devs.h +4 -0
@@ -104,6 +104,10 @@ extern struct platform_device s5pc100_device_iis2;extern struct platform_device samsung_device_keypad; +extern struct platform_device s5p_device_fimc0; +extern struct platform_device s5p_device_fimc1; +extern struct platform_device s5p_device_fimc2; +/* s3c2440 specific devices */ #ifdef CONFIG_CPU_S3C2440
arch/arm/plat-samsung/include/plat/fimc-core.h new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
1.7.1.569.g6f426
PATCH v5 3/8 ARM: Samsung: Add platform definitions and helpers for FIMC driver
Review
Quoted 305 lines · Marek Szyprowski
From: Sylwester Nawrocki <[email protected]>
FIMC (CAMIF) device is a camera interface embedded in S3C/S5P Samsung SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards, memory to memory operations, color conversion, resizing and rotation.
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>---
Changes since v4:
- addressed all minor style issues reported by Kukjin KimChanges since v3:
- rebased onto latest kgene/for-next tree
- new entries inmap.hfiles has been sorted by the physicall addressI'm sending this patch on behalf of Sylwerster who is on holidays this week.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center--- arch/arm/mach-s5pc100/include/mach/map.h | 7 ++++ arch/arm/mach-s5pv210/cpu.c | 5 +++ arch/arm/mach-s5pv210/include/mach/map.h | 7 ++++ arch/arm/plat-s5p/Kconfig | 15 ++++++++ arch/arm/plat-s5p/Makefile | 5 +++ arch/arm/plat-s5p/dev-fimc0.c | 36 ++++++++++++++++++++ arch/arm/plat-s5p/dev-fimc1.c | 36 ++++++++++++++++++++ arch/arm/plat-s5p/dev-fimc2.c | 36 ++++++++++++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 4 ++ arch/arm/plat-samsung/include/plat/fimc-core.h | 43 ++++++++++++++++++++++++ 10 files changed, 194 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-fimc0.c create mode 100644 arch/arm/plat-s5p/dev-fimc1.c create mode 100644 arch/arm/plat-s5p/dev-fimc2.c create mode 100644 arch/arm/plat-samsung/include/plat/fimc-core.harch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/map.h +0
-0
s5pc100/include/mach/map.h
index c018697..3abe7f5 100644arch/arm/mach-s5pc100/include/mach/map.h +7
-0@@ -99,6 +99,10 @@#define S5PC100_PA_FB (0xEE000000) +#define S5PC100_PA_FIMC0 (0xEE200000) +#define S5PC100_PA_FIMC1 (0xEE300000) +#define S5PC100_PA_FIMC2 (0xEE400000) +#define S5PC100_PA_I2S0 (0xF2000000)#define S5PC100_PA_I2S1 (0xF2100000)#define S5PC100_PA_I2S2 (0xF2200000)@@ -143,6 +147,9 @@#define S3C_PA_ONENAND_BUF S5PC100_PA_ONENAND_BUF#define S3C_SZ_ONENAND_BUF S5PC100_SZ_ONENAND_BUF#define S3C_PA_RTC S5PC100_PA_RTC +#define S5P_PA_FIMC0 S5PC100_PA_FIMC0 +#define S5P_PA_FIMC1 S5PC100_PA_FIMC1 +#define S5P_PA_FIMC2 S5PC100_PA_FIMC2#define SAMSUNG_PA_ADC S5PC100_PA_TSADC#define SAMSUNG_PA_CFCON S5PC100_PA_CFCONarch/arm/mach-s5pv210/cpu.c +5
-0@@ -37,6 +37,7 @@#include <plat/iic-core.h> #include <plat/keypad-core.h> #include <plat/sdhci.h> +#include <plat/fimc-core.h> #include <plat/reset.h> /* Initial IO mappings */ @@ -104,6 +105,10 @@ void __init s5pv210_map_io(void)/* Use s5pv210-keypad instead of samsung-keypad */ samsung_keypad_setname ("s5pv210-keypad" ); + +s3c_fimc_setname (0 ,"s5pv210-fimc" ); +s3c_fimc_setname (1 ,"s5pv210-fimc" ); +s3c_fimc_setname (2 ,"s5pv210-fimc" ); }void __init s5pv210_init_clocks (int xtal)arch/arm/mach- renamed from arch/arm/mach-s5pv210/include/mach/map.h +0
-0
s5pv210/include/mach/map.h
index 986b285..dd4fb6b 100644arch/arm/mach-s5pv210/include/mach/map.h +7
-0@@ -65,6 +65,10 @@#define S5PV210_PA_FB (0xF8000000) +#define S5PV210_PA_FIMC0 (0xFB200000) +#define S5PV210_PA_FIMC1 (0xFB300000) +#define S5PV210_PA_FIMC2 (0xFB400000) +#define S5PV210_PA_HSMMC (x) (0xEB000000 + ((x) * 0x100000))#define S5PV210_PA_VIC0 (0xF2000000)@@ -109,6 +113,9 @@#define S3C_PA_FB S5PV210_PA_FB#define S3C_PA_RTC S5PV210_PA_RTC#define S3C_PA_WDT S5PV210_PA_WATCHDOG +#define S5P_PA_FIMC0 S5PV210_PA_FIMC0 +#define S5P_PA_FIMC1 S5PV210_PA_FIMC1 +#define S5P_PA_FIMC2 S5PV210_PA_FIMC2#define SAMSUNG_PA_ADC S5PV210_PA_ADC#define SAMSUNG_PA_CFCON S5PV210_PA_CFCONarch/arm/plat-s5p/Kconfig +15
-0@@ -5,6 +5,21 @@ # # Licensed under GPLv2 +config S5P_DEV_FIMC0 + bool + help + Compile in platform device definitions for FIMC controller 0 + +config S5P_DEV_FIMC1 + bool + help + Compile in platform device definitions for FIMC controller 1 + +config S5P_DEV_FIMC2 + bool + help + Compile in platform device definitions for FIMC controller 2 + config PLAT_S5P bool depends on (ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PC100 ||
ARCH_S5PV210||ARCH_S5PV310)arch/arm/plat-s5p/Makefile +5
-0@@ -19,3 +19,8 @@ obj-y += clock.o obj-y += irq.o obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o +# devices + +obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o +obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o +obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.oarch/arm/plat-s5p/dev-fimc0.c new file +36
-0@@ -0,0 +1,36 @@ +/* linux/arch/arm/plat-s5p/dev-fimc0.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC0 resource and device definitions +* +* 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. +*/ + +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc0_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC0 , + .end =S5P_PA_FIMC0 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC0 , + .end =IRQ_FIMC0 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc0 = { + .name ="s5p-fimc" , + .id =0 , + .num_resources =ARRAY_SIZE (s5p_fimc0_resource), + .resource = s5p_fimc0_resource, +};arch/arm/plat-s5p/dev-fimc1.c new file +36
-0@@ -0,0 +1,36 @@ +/* linux/arch/arm/plat-s5p/dev-fimc1.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC1 resource and device definitions +* +* 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. +*/ + +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc1_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC1 , + .end =S5P_PA_FIMC1 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC1 , + .end =IRQ_FIMC1 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc1 = { + .name ="s5p-fimc" , + .id =1 , + .num_resources =ARRAY_SIZE (s5p_fimc1_resource), + .resource = s5p_fimc1_resource, +};arch/arm/plat-s5p/dev-fimc2.c new file +36
-0@@ -0,0 +1,36 @@ +/* linux/arch/arm/plat-s5p/dev-fimc2.c +* +* Copyright (c) 2010 Samsung Electronics +* +* Base S5P FIMC2 resource and device definitions +* +* 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. +*/ + +#include <linux/kernel.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/ioport.h> +#include <mach/map.h> + +static struct resource s5p_fimc2_resource[] = { + [0 ] = { + .start =S5P_PA_FIMC2 , + .end =S5P_PA_FIMC2 +SZ_1M -1 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .start =IRQ_FIMC2 , + .end =IRQ_FIMC2 , + .flags =IORESOURCE_IRQ , + }, +}; + +struct platform_device s5p_device_fimc2 = { + .name ="s5p-fimc" , + .id =2 , + .num_resources =ARRAY_SIZE (s5p_fimc2_resource), + .resource = s5p_fimc2_resource, +};arch/arm/plat- renamed from arch/arm/plat-samsung/include/plat/devs.h +0
-0
samsung/include/plat/devs.h
index 4c31d32..85f6f23 100644arch/arm/plat-samsung/include/plat/devs.h +4
-0@@ -104,6 +104,10 @@ extern struct platform_device s5pc100_device_iis2;extern struct platform_device samsung_device_keypad; +extern struct platform_device s5p_device_fimc0; +extern struct platform_device s5p_device_fimc1; +extern struct platform_device s5p_device_fimc2; +/* s3c2440 specific devices */ #ifdef CONFIG_CPU_S3C2440 (quoted diff) +0
-0
b/arch/arm/plat-
Quoted 17 lines
samsung/include/plat/fimc-core.h
new file mode 100644
index 0000000..c2ddd83arch/arm/plat-samsung/include/plat/fimc-core.h new file +11
-0@@ -0,0 +1,43 @@ +/* +* arch/arm/plat-samsung/include/plat/fimc-core.h +* +* Copyright 2010 Samsung Electronics Co., Ltd. +* Sylwester Nawrocki <[email protected]> +* +* Samsung camera interface driver core functions +* +* 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.
arch/arm/plat-samsung/include/plat/fimc-core.h line 21
Quoted 10 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +10
-0+*/ +#ifndef __ASM_PLAT_FIMC_CORE_H +#define __ASM_PLAT_FIMC_CORE_H __FILE__ + +/* +* These functions are only for use with the core support code, such as +* the CPU-specific initialization code. +*/ + +/* Re-define device name to differentiate the subsystem in various SoCs.
*/
Quoted 13 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +13
-0+static inline void s3c_fimc_setname (int id,char *name) +{ +switch (id) { +#ifdef CONFIG_S5P_DEV_FIMC0 +case 0 : + s5p_device_fimc0.name = name; +break ; +#endif +#ifdef CONFIG_S5P_DEV_FIMC1 +case 1 : + s5p_device_fimc1.name = name; +break ; +#endif
arch/arm/plat-samsung/include/plat/fimc-core.h
Quoted 10 lines
arch/arm/plat-samsung/include/plat/fimc-core.h new file +9
-1+#ifdef CONFIG_S5P_DEV_FIMC2 +case 2 : + s5p_device_fimc2.name = name; +break ; +#endif + } +} + +#endif /* __ASM_PLAT_FIMC_CORE_H */ --
Looks ok..will apply.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v3 4/8 ARM: Samsung: Add common Aquila and GONI code
In reply to Sylwester Nawrocki--- arch/arm/mach-s5pv210/Kconfig | 5 ++++ arch/arm/mach-s5pv210/Makefile | 2 + arch/arm/mach-s5pv210/common-aquila-goni.c | 35 ++++++++++++++++++++++++++++ arch/arm/mach-s5pv210/common-aquila-goni.h | 2 + 4 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pv210/common-aquila-goni.c create mode 100644 arch/arm/mach-s5pv210/common-aquila-goni.h
arch/arm/mach-s5pv210/Kconfig +5 -0
@@ -90,6 +90,11 @@ config MACH_SMDKC110 endmenu +config COMMON_AQUILA_GONI + bool + help + Compile common code for Samsung Aquila and Samsung GONI machines + config S5PC110_DEV_ONENAND bool help
arch/arm/mach-s5pv210/Makefile +2 -0
@@ -22,6 +22,8 @@ obj-$(CONFIG_MACH_SMDKV210) += mach-smdkv210.o obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o obj-$(CONFIG_MACH_GONI) += mach-goni.o +obj-$(CONFIG_COMMON_AQUILA_GONI) += common-aquila-goni.o + # device support obj-y += dev-audio.o
arch/arm/mach-s5pv210/common-aquila-goni.c new file +35 -0
@@ -0,0 +1,35 @@ +#include <linux/clk.h> +#include <linux/err.h> +#include <plat/fimc.h> + +#include "common-aquila-goni.h" + +void __init s5pv210_common_fimc_clk_init (void ) +{ +int i; +struct clk *clk_fimc, *parent; + +struct device *fimc_devs[] = { + &s5p_device_fimc0.dev, + &s5p_device_fimc1.dev, + &s5p_device_fimc2.dev + }; + + parent =clk_get (NULL ,"mout_epll" ); +if (IS_ERR (parent)) +return ; + +for (i =0 ; i <ARRAY_SIZE (fimc_devs); i++) { +if (fimc_devs[i]) { + clk_fimc =clk_get (fimc_devs[i],"sclk_fimc" ); + +if (IS_ERR (clk_fimc)) +continue ; + +clk_set_parent (clk_fimc, parent); +clk_set_rate (clk_fimc,133000000 ); +clk_enable (clk_fimc); + } + } +clk_put (parent); +}
arch/arm/mach-s5pv210/common-aquila-goni.h new file +2 -0
@@ -0,0 +1,2 @@ + +extern void s5pv210_common_fimc_clk_init (void );
Signature · 1 line
1.7.2
PATCH v3 4/8 ARM: Samsung: Add common Aquila and GONI code
Quoted 1 line · Sylwester Nawrocki
Hi Sylwester,
Hmm...no comments here?
Quoted 3 lines
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Pawel Osciak <[email protected]>
I wonder we need really above multiple sign for this, just only one c file?
Quoted 15 lines
--- arch/arm/mach-s5pv210/Kconfig | 5 ++++ arch/arm/mach-s5pv210/Makefile | 2 + arch/arm/mach-s5pv210/common-aquila-goni.c | 35 ++++++++++++++++++++++++++++ arch/arm/mach-s5pv210/common-aquila-goni.h | 2 + 4 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pv210/common-aquila-goni.c create mode 100644 arch/arm/mach-s5pv210/common-aquila-goni.harch/arm/mach-s5pv210/Kconfig +0
-0
arch/arm/mach-s5pv210/Kconfig config MACH_SMDKC110 · line 93
Quoted 4 lines
arch/arm/mach-s5pv210/Kconfig +1
-0@@ -90,6 +90,11 @@ config MACH_SMDKC110 endmenu +config COMMON_AQUILA_GONI
do we _really_ need this?
Review
Quoted 9 lines
arch/arm/mach-s5pv210/Kconfig +3
-0+ bool + help + Compile common code for Samsung Aquila and Samsung GONImachines
arch/arm/mach-s5pv210/Kconfig +1
-0+ config S5PC110_DEV_ONENAND bool help(quoted diff) +0
-0
b/arch/arm/mach-s5pv210/Makefile
arch/arm/mach-s5pv210/common-aquila-goni.c
Quoted 19 lines
index 05048c5..a4c0bc9 100644
arch/arm/mach-s5pv210/Makefile +0
-0@@ -22,6 +22,8 @@ obj-$(CONFIG_MACH_SMDKV210) += mach-smdkv210.o
obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o
obj-$(CONFIG_MACH_GONI) += mach-goni.oarch/arm/mach-s5pv210/Makefile +2
-0+obj-$(CONFIG_COMMON_AQUILA_GONI) += common-aquila-goni.o + # device support obj-y += dev-audio.oarch/arm/mach- renamed from arch/arm/mach-s5pv210/common-aquila-goni.c +0
-0
s5pv210/common-aquila-goni.c
new file mode 100644
index 0000000..4d72531arch/arm/mach-s5pv210/common-aquila-goni.c new file +0
-0
Just setup-fimc.c is enough...
I don't know why we need common-aquila-goni now.
And your following patches in this patch-set perfectly same except just name.
[PATCH v3 5/8] ARM: s5pv210: enable FIMC on Aquila
[PATCH v3 6/8] ARM: s5pv210: enable FIMC on Goni
Hmm...
Quoted 21 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +20
-0@@ -0,0 +1,35 @@ +#include <linux/clk.h> +#include <linux/err.h> +#include <plat/fimc.h> + +#include "common-aquila-goni.h" + +void __init s5pv210_common_fimc_clk_init (void ) +{ +int i; +struct clk *clk_fimc, *parent; + +struct device *fimc_devs[] = { + &s5p_device_fimc0.dev, + &s5p_device_fimc1.dev, + &s5p_device_fimc2.dev + }; + + parent =clk_get (NULL ,"mout_epll" ); +if (IS_ERR (parent)) +return ;
arch/arm/mach-s5pv210/common-aquila-goni.c line 30
Quoted 10 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +10
-0+ +for (i =0 ; i <ARRAY_SIZE (fimc_devs); i++) { +if (fimc_devs[i]) { + clk_fimc =clk_get (fimc_devs[i],"sclk_fimc" ); + +if (IS_ERR (clk_fimc)) +continue ; + +clk_set_parent (clk_fimc, parent); +clk_set_rate (clk_fimc,133000000 );
Is this for direct fifo mode?
Quoted 12 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +5
-0+clk_enable (clk_fimc); + } + } +clk_put (parent); +}arch/arm/mach- renamed from arch/arm/mach-s5pv210/common-aquila-goni.h +0
-0
s5pv210/common-aquila-goni.h
new file mode 100644
index 0000000..f666462
arch/arm/mach-s5pv210/common-aquila-goni.h
Quoted 3 lines
arch/arm/mach-s5pv210/common-aquila-goni.h new file +2
-1@@ -0,0 +1,2 @@ + +extern void s5pv210_common_fimc_clk_init (void ); --
I do not think that we need common-aquila-goni.[ch] now to us.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v3 4/8 ARM: Samsung: Add common Aquila and GONI code
Hello,
Quoted 5 lines
Kukjin Kim <[email protected]> wrote:
Quoted 1 line · Sylwester Nawrocki
Hi Sylwester,
Quoted 8 lines
Hmm...no comments here?
Quoted 3 lines
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Pawel Osciak <[email protected]>I wonder we need really above multiple sign for this, just only one c file?
Sylwester is the main author, I am also the author of this, although I agree it is a small patch. Mr. Park is here as the person that gives the permission for the patches to be published under GPL.
Quoted 16 lines
Quoted 16 lines
--- arch/arm/mach-s5pv210/Kconfig | 5 ++++ arch/arm/mach-s5pv210/Makefile | 2 + arch/arm/mach-s5pv210/common-aquila-goni.c | 35 ++++++++++++++++++++++++++++ arch/arm/mach-s5pv210/common-aquila-goni.h | 2 + 4 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pv210/common-aquila-goni.c create mode 100644 arch/arm/mach-s5pv210/common-aquila-goni.harch/arm/mach-s5pv210/Kconfig +0
-0@@ -90,6 +90,11 @@ config MACH_SMDKC110
Quoted 6 lines
arch/arm/mach-s5pv210/Kconfig config MACH_SMDKC110 · line 93
Quoted 3 lines
arch/arm/mach-s5pv210/Kconfig +1
-0endmenu +config COMMON_AQUILA_GONIdo we _really_ need this?
The alternative is to have identical code in both Aquila and Goni files.
Quoted 22 lines
Review
Quoted 9 lines
arch/arm/mach-s5pv210/Kconfig +3
-0+ bool + help + Compile common code for Samsung Aquila and Samsung GONImachines
arch/arm/mach-s5pv210/Kconfig +1
-0+ config S5PC110_DEV_ONENAND bool help(quoted diff) +0
-0b/arch/arm/mach-s5pv210/Makefile
Quoted 12 lines
index 05048c5..a4c0bc9 100644
arch/arm/mach-s5pv210/Makefile +0
-0@@ -22,6 +22,8 @@ obj-$(CONFIG_MACH_SMDKV210) += mach-smdkv210.o
obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o
obj-$(CONFIG_MACH_GONI) += mach-goni.oarch/arm/mach-s5pv210/Makefile +2
-0+obj-$(CONFIG_COMMON_AQUILA_GONI) += common-aquila-goni.o + # device support
Quoted 11 lines
arch/arm/mach-s5pv210/common-aquila-goni.c
Quoted 7 lines
obj-y += dev-audio.o
arch/arm/mach- renamed from arch/arm/mach-s5pv210/common-aquila-goni.c +0
-0
s5pv210/common-aquila-goni.c
new file mode 100644
index 0000000..4d72531arch/arm/mach-s5pv210/common-aquila-goni.c new file +0
-0Just
setup-fimc.cis enough...
I don't know why we need common-aquila-goni now.
The alternative was to have identical clock setup code in both mach-aquila and mach-goni files.
Quoted 7 lines
And your following patches in this patch-set perfectly same except just name.
[PATCH v3 5/8] ARM: s5pv210: enable FIMC on Aquila
[PATCH v3 6/8] ARM: s5pv210: enable FIMC on GoniHmm...
One is for Aquila and one is for Goni, sorry, I don't understand what do you mean here... Would you prefer them to be combined into one patch?
Quoted 25 lines
Quoted 25 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +24
-0@@ -0,0 +1,35 @@ +#include <linux/clk.h> +#include <linux/err.h> +#include <plat/fimc.h> + +#include "common-aquila-goni.h" + +void __init s5pv210_common_fimc_clk_init (void ) +{ +int i; +struct clk *clk_fimc, *parent; + +struct device *fimc_devs[] = { + &s5p_device_fimc0.dev, + &s5p_device_fimc1.dev, + &s5p_device_fimc2.dev + }; + + parent =clk_get (NULL ,"mout_epll" ); +if (IS_ERR (parent)) +return ; + +for (i =0 ; i <ARRAY_SIZE (fimc_devs); i++) { +if (fimc_devs[i]) { + clk_fimc =clk_get (fimc_devs[i],"sclk_fimc" );
Quoted 9 lines
arch/arm/mach-s5pv210/common-aquila-goni.c line 30
Quoted 6 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +6
-0+ +if (IS_ERR (clk_fimc)) +continue ; + +clk_set_parent (clk_fimc, parent); +clk_set_rate (clk_fimc,133000000 );Is this for direct fifo mode?
Bootloader is not setting up clocks correctly and defaults do not work. It's not only for fifo, fimc doesn't work at all without this.
Quoted 9 lines
Quoted 9 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +5
-0+clk_enable (clk_fimc); + } + } +clk_put (parent); +}arch/arm/mach- renamed from arch/arm/mach-s5pv210/common-aquila-goni.h +0
-0
s5pv210/common-aquila-goni.h
new file mode 100644
index 0000000..f666462
Quoted 9 lines
arch/arm/mach-s5pv210/common-aquila-goni.h
Quoted 6 lines
arch/arm/mach-s5pv210/common-aquila-goni.h new file +2
-1@@ -0,0 +1,2 @@ + +extern void s5pv210_common_fimc_clk_init (void ); --I do not think that we need common-aquila-goni.[ch] now to us.
What would you propose as the alternative? Have duplicate code in both machine files?
Best regards
--
Pawel Osciak
Linux Platform Group
Samsung Poland R&D Center
PATCH v3 4/8 ARM: Samsung: Add common Aquila and GONI code
Quoted 21 lines · Pawel Osciak
Hello,
Quoted 5 lines
Kukjin Kim <[email protected]> wrote:
Quoted 1 line · Sylwester Nawrocki
Hi Sylwester,
Quoted 8 lines
Hmm...no comments here?
Quoted 3 lines
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Pawel Osciak <[email protected]>I wonder we need really above multiple sign for this, just only one c file?
Sylwester is the main author, I am also the author of this, although I agree it is a small patch. Mr. Park is here as the person that gives the permission for the patches to be published under GPL.
...
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
--- arch/arm/mach-s5pv210/Kconfig | 5 ++++ arch/arm/mach-s5pv210/Makefile | 2 + arch/arm/mach-s5pv210/common-aquila-goni.c | 35 ++++++++++++++++++++++++++++ arch/arm/mach-s5pv210/common-aquila-goni.h | 2 + 4 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pv210/common-aquila-goni.c create mode 100644 arch/arm/mach-s5pv210/common-aquila-goni.harch/arm/mach-s5pv210/Kconfig +0
-0@@ -90,6 +90,11 @@ config MACH_SMDKC110
Quoted 9 lines
Quoted 6 lines
arch/arm/mach-s5pv210/Kconfig config MACH_SMDKC110 · line 93
Quoted 3 lines
arch/arm/mach-s5pv210/Kconfig +1
-0endmenu +config COMMON_AQUILA_GONIdo we _really_ need this?
The alternative is to have identical code in both Aquila and Goni files.
I mean this is just for fimc clock setting...this is not only for Auqila and GONI machines even though need to update to be used in other machines.
Quoted 34 lines
Quoted 22 lines
Review
Quoted 9 lines
arch/arm/mach-s5pv210/Kconfig +3
-0+ bool + help + Compile common code for Samsung Aquila and Samsung GONImachines
arch/arm/mach-s5pv210/Kconfig +1
-0+ config S5PC110_DEV_ONENAND bool help(quoted diff) +0
-0b/arch/arm/mach-s5pv210/Makefile
Quoted 12 lines
index 05048c5..a4c0bc9 100644
arch/arm/mach-s5pv210/Makefile +0
-0@@ -22,6 +22,8 @@ obj-$(CONFIG_MACH_SMDKV210) += mach-smdkv210.o
obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o
obj-$(CONFIG_MACH_GONI) += mach-goni.oarch/arm/mach-s5pv210/Makefile +2
-0+obj-$(CONFIG_COMMON_AQUILA_GONI) += common-aquila-goni.o + # device supportQuoted 11 lines
arch/arm/mach-s5pv210/common-aquila-goni.c
Quoted 7 lines
obj-y += dev-audio.o
arch/arm/mach- renamed from arch/arm/mach-s5pv210/common-aquila-goni.c +0
-0
s5pv210/common-aquila-goni.c
new file mode 100644
index 0000000..4d72531arch/arm/mach-s5pv210/common-aquila-goni.c new file +0
-0Just
setup-fimc.cis enough...
I don't know why we need common-aquila-goni now.
Quoted 3 lines
The alternative was to have identical clock setup code in both mach-aquila and mach-goni files.
It's possible in setup-fimc.c
Quoted 22 lines
Quoted 7 lines
And your following patches in this patch-set perfectly same except just name.
[PATCH v3 5/8] ARM: s5pv210: enable FIMC on Aquila
[PATCH v3 6/8] ARM: s5pv210: enable FIMC on GoniHmm...
One is for Aquila and one is for Goni, sorry, I don't understand what do you mean here... Would you prefer them to be combined into one patch?
Quoted 11 lines
Quoted 11 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +10
-0@@ -0,0 +1,35 @@ +#include <linux/clk.h> +#include <linux/err.h> +#include <plat/fimc.h> + +#include "common-aquila-goni.h" + +void __init s5pv210_common_fimc_clk_init (void ) +{ +int i; +struct clk *clk_fimc, *parent;
Quoted 8 lines
Quoted 8 lines
arch/arm/mach-s5pv210/common-aquila-goni.c line 18
Quoted 8 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +8
-0+ +struct device *fimc_devs[] = { + &s5p_device_fimc0.dev, + &s5p_device_fimc1.dev, + &s5p_device_fimc2.dev + }; + + parent =clk_get (NULL ,"mout_epll" );
Is not there in case of using 'mout_mpll' as parent clock?
Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +6
-0+if (IS_ERR (parent)) +return ; + +for (i =0 ; i <ARRAY_SIZE (fimc_devs); i++) { +if (fimc_devs[i]) { + clk_fimc =clk_get (fimc_devs[i],"sclk_fimc" );Quoted 9 lines
arch/arm/mach-s5pv210/common-aquila-goni.c line 30
Quoted 6 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +6
-0+ +if (IS_ERR (clk_fimc)) +continue ; + +clk_set_parent (clk_fimc, parent); +clk_set_rate (clk_fimc,133000000 );Is this for direct fifo mode?
Quoted 4 lines
Bootloader is not setting up clocks correctly and defaults do not work. It's not only for fifo, fimc doesn't work at all without this.
Quoted 1 line
arch/arm/mach-s5pv210/common-aquila-goni.c line 31
Quoted 1 line
arch/arm/mach-s5pv210/common-aquila-goni.c new file +1
-0+clk_enable (clk_fimc);
Should being in driver...I don't know why we should enable fimc clock in here. Basically, each driver clock should be enabled in each drivers...
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
arch/arm/mach-s5pv210/common-aquila-goni.c new file +4
-0+ } + } +clk_put (parent); +}arch/arm/mach- renamed from arch/arm/mach-s5pv210/common-aquila-goni.h +0
-0
Quoted 8 lines
Quoted 8 lines
arch/arm/mach-s5pv210/common-aquila-goni.h line 2
Quoted 8 lines
s5pv210/common-aquila-goni.h
new file mode 100644
index 0000000..f666462arch/arm/mach-s5pv210/common-aquila-goni.h new file +2
-0@@ -0,0 +1,2 @@ + +extern void s5pv210_common_fimc_clk_init (void );
If this is only for Aquila and GONI, should be common_aquila_goni_fimc_clk_init(). But it's quite long :-( ... anyway, as I said, I don't think this is only for Aquila and GONI.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
--
I do not think that we need common-aquila-goni.[ch] now to us.
What would you propose as the alternative? Have duplicate code in both machine files?
setup-fimc.c, but need to sort it out so that all machines can use that.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v3 5/8 ARM: s5pv210: enable FIMC on Aquila
In reply to Sylwester NawrockiAdd support for FIMC on Samsung Aquila board.
--- arch/arm/mach-s5pv210/Kconfig | 4 ++++ arch/arm/mach-s5pv210/mach-aquila.c | 7 +++++++ 2 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/Kconfig +4 -0
@@ -58,9 +58,13 @@ menu "S5PC110 Machines" config MACH_AQUILA bool "Aquila" select CPU_S5PV210 + select COMMON_AQUILA_GONI select ARCH_SPARSEMEM_ENABLE select S5PV210_SETUP_FB_24BPP select S3C_DEV_FB + select S5P_DEV_FIMC0 + select S5P_DEV_FIMC1 + select S5P_DEV_FIMC2 select S5PC110_DEV_ONENAND help Machine support for the Samsung Aquila target based on S5PC110 SoC
arch/arm/mach-s5pv210/mach-aquila.c +7 -0
@@ -35,6 +35,9 @@#include <plat/devs.h> #include <plat/cpu.h> #include <plat/fb.h> +#include <plat/fimc.h> + +#include "common-aquila-goni.h" /* Following are default values for UCON, ULCON and UFCON UART registers */ #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -445,6 +448,9 @@ static struct platform_device *aquila_devices[] __initdata = { &aquila_device_gpiokeys, &s3c_device_fb, &s5pc110_device_onenand, + &s5p_device_fimc0, + &s5p_device_fimc1, + &s5p_device_fimc2, };static void __init aquila_map_io (void )
@@ -465,6 +471,7 @@ static void __init aquila_machine_init(void)s3c_fb_set_platdata (&aquila_lcd_pdata);platform_add_devices (aquila_devices,ARRAY_SIZE (aquila_devices)); +s5pv210_common_fimc_clk_init (); }MACHINE_START (AQUILA ,"Aquila" )
Signature · 1 line
1.7.2
PATCH v3 5/8 ARM: s5pv210: enable FIMC on Aquila
Quoted 20 lines · Sylwester Nawrocki
Add support for FIMC on Samsung Aquila board.
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>--- arch/arm/mach-s5pv210/Kconfig | 4 ++++ arch/arm/mach-s5pv210/mach-aquila.c | 7 +++++++ 2 files changed, 11 insertions(+), 0 deletions(-)arch/arm/mach-s5pv210/Kconfig +1
-0@@ -58,9 +58,13 @@ menu "S5PC110 Machines" config MACH_AQUILA bool "Aquila" select CPU_S5PV210 + select COMMON_AQUILA_GONI
...
Review
Quoted 11 lines
arch/arm/mach-s5pv210/Kconfig +3
-0select ARCH_SPARSEMEM_ENABLE select S5PV210_SETUP_FB_24BPP select S3C_DEV_FB + select S5P_DEV_FIMC0 + select S5P_DEV_FIMC1 + select S5P_DEV_FIMC2 select S5PC110_DEV_ONENAND help Machine support for the Samsung Aquila target based on S5PC110SoC
(quoted diff) +0
-0
b/arch/arm/mach-s5pv210/mach-
arch/arm/mach-s5pv210/mach-aquila.c line 40
Quoted 11 lines
aquila.c
index 0992618..7528514 100644arch/arm/mach-s5pv210/mach-aquila.c +3
-0@@ -35,6 +35,9 @@#include <plat/devs.h> #include <plat/cpu.h> #include <plat/fb.h> +#include <plat/fimc.h> + +#include "common-aquila-goni.h"
Hmm...please refer to my another comment.
arch/arm/mach-s5pv210/mach-aquila.c line 41
Quoted 2 lines
arch/arm/mach-s5pv210/mach-aquila.c +0
-0/* Following are default values for UCON, ULCON and UFCON UART registers
*/
arch/arm/mach-s5pv210/mach-aquila.c static struct platform_device *aquila_devices[]
Quoted 2 lines
arch/arm/mach-s5pv210/mach-aquila.c +0
-0#define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \@@ -445,6 +448,9 @@ static struct platform_device *aquila_devices[]
__initdata =
Quoted 11 lines
arch/arm/mach-s5pv210/mach-aquila.c +3
-0{ &aquila_device_gpiokeys, &s3c_device_fb, &s5pc110_device_onenand, + &s5p_device_fimc0, + &s5p_device_fimc1, + &s5p_device_fimc2, };static void
__initaquila_map_io(void)
arch/arm/mach-s5pv210/mach-aquila.c static void __init aquila_machine_init(void) · line 474
Quoted 4 lines
arch/arm/mach-s5pv210/mach-aquila.c +1
-0@@ -465,6 +471,7 @@ static void __init aquila_machine_init(void)s3c_fb_set_platdata (&aquila_lcd_pdata);platform_add_devices (aquila_devices,ARRAY_SIZE (aquila_devices)); +s5pv210_common_fimc_clk_init ();
Hmm...really need this fimc_clk_init here not driver?
arch/arm/mach-s5pv210/mach-aquila.c static void __init aquila_machine_init(void)
Quoted 4 lines
arch/arm/mach-s5pv210/mach-aquila.c +0
-1}MACHINE_START (AQUILA ,"Aquila" ) --
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v3 5/8 ARM: s5pv210: enable FIMC on Aquila
Hello,
Quoted 13 lines
Kukjin Kim <[email protected]> wrote:
Quoted 11 lines · Sylwester Nawrocki
Add support for FIMC on Samsung Aquila board.
Signed-off-by Sylwester Nawrocki <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>--- arch/arm/mach-s5pv210/Kconfig | 4 ++++ arch/arm/mach-s5pv210/mach-aquila.c | 7 +++++++ 2 files changed, 11 insertions(+), 0 deletions(-)
Quoted 12 lines
Quoted 9 lines
arch/arm/mach-s5pv210/Kconfig +1
-0@@ -58,9 +58,13 @@ menu "S5PC110 Machines" config MACH_AQUILA bool "Aquila" select CPU_S5PV210 + select COMMON_AQUILA_GONI...
Please see my previous comments.
Quoted 12 lines
Review
Quoted 11 lines
arch/arm/mach-s5pv210/Kconfig +3
-0select ARCH_SPARSEMEM_ENABLE select S5PV210_SETUP_FB_24BPP select S3C_DEV_FB + select S5P_DEV_FIMC0 + select S5P_DEV_FIMC1 + select S5P_DEV_FIMC2 select S5PC110_DEV_ONENAND help Machine support for the Samsung Aquila target based on S5PC110SoC
(quoted diff) +0
-0b/arch/arm/mach-s5pv210/mach-
Quoted 14 lines
arch/arm/mach-s5pv210/mach-aquila.c line 40
Quoted 11 lines
aquila.c
index 0992618..7528514 100644arch/arm/mach-s5pv210/mach-aquila.c +3
-0@@ -35,6 +35,9 @@#include <plat/devs.h> #include <plat/cpu.h> #include <plat/fb.h> +#include <plat/fimc.h> + +#include "common-aquila-goni.h" Hmm...please refer to my another comment.
Ditto.
Quoted 15 lines
arch/arm/mach-s5pv210/mach-aquila.c line 41
Quoted 2 lines
arch/arm/mach-s5pv210/mach-aquila.c +0
-0/* Following are default values for UCON, ULCON and UFCON UART registers */
arch/arm/mach-s5pv210/mach-aquila.c static struct platform_device *aquila_devices[]
Quoted 2 lines
arch/arm/mach-s5pv210/mach-aquila.c +0
-0#define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \@@ -445,6 +448,9 @@ static struct platform_device *aquila_devices[]
__initdata=Quoted 9 lines
arch/arm/mach-s5pv210/mach-aquila.c +3
-0{ &aquila_device_gpiokeys, &s3c_device_fb, &s5pc110_device_onenand, + &s5p_device_fimc0, + &s5p_device_fimc1, + &s5p_device_fimc2, };
Quoted 9 lines
arch/arm/mach-s5pv210/mach-aquila.c static void __init aquila_machine_init(void) · line 474
Quoted 6 lines
static void
__initaquila_map_io(void)arch/arm/mach-s5pv210/mach-aquila.c +1
-0@@ -465,6 +471,7 @@ static void __init aquila_machine_init(void)s3c_fb_set_platdata (&aquila_lcd_pdata);platform_add_devices (aquila_devices,ARRAY_SIZE (aquila_devices)); +s5pv210_common_fimc_clk_init ();Hmm...really need this
fimc_clk_inithere not driver?
I believe that the whole idea is that drivers should not be involved in clocks setup, especially in setting up source parameters...
Best regards
--
Pawel Osciak
Linux Platform Group
Samsung Poland R&D Center
PATCH v3 6/8 ARM: s5pv210: enable FIMC on Goni
In reply to Sylwester Nawrocki--- arch/arm/mach-s5pv210/Kconfig | 4 ++++ arch/arm/mach-s5pv210/mach-goni.c | 7 +++++++ 2 files changed, 11 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/Kconfig +4 -0
@@ -72,9 +72,13 @@ config MACH_AQUILA config MACH_GONI bool "GONI" select CPU_S5PV210 + select COMMON_AQUILA_GONI select ARCH_SPARSEMEM_ENABLE select S5PV210_SETUP_FB_24BPP select S3C_DEV_FB + select S5P_DEV_FIMC0 + select S5P_DEV_FIMC1 + select S5P_DEV_FIMC2 select S5PC110_DEV_ONENAND help Machine support for Samsung GONI board
arch/arm/mach-s5pv210/mach-goni.c +7 -0
@@ -35,6 +35,9 @@#include <plat/devs.h> #include <plat/cpu.h> #include <plat/fb.h> +#include <plat/fimc.h> + +#include "common-aquila-goni.h" /* Following are default values for UCON, ULCON and UFCON UART registers */ #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -426,6 +429,9 @@ static struct platform_device *goni_devices[] __initdata = { &s5pc110_device_onenand, &goni_i2c_gpio_pmic, &goni_device_gpiokeys, + &s5p_device_fimc0, + &s5p_device_fimc1, + &s5p_device_fimc2, };static void __init goni_map_io (void )
@@ -445,6 +451,7 @@ static void __init goni_machine_init(void)s3c_fb_set_platdata (&goni_lcd_pdata);platform_add_devices (goni_devices,ARRAY_SIZE (goni_devices)); +s5pv210_common_fimc_clk_init (); }MACHINE_START (GONI ,"GONI" )
Signature · 1 line
1.7.2
PATCH v3 7/8 ARM: S5PC100: enable FIMC on SMDKC100
In reply to Sylwester NawrockiAdd support for FIMC on Samsung SMDKC100 board.
--- arch/arm/mach-s5pc100/Kconfig | 3 +++ arch/arm/mach-s5pc100/mach-smdkc100.c | 4 ++++ 2 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/mach-s5pc100/Kconfig +3 -0
@@ -65,6 +65,9 @@ config MACH_SMDKC100 select S5PC100_SETUP_IDE select S5PC100_SETUP_KEYPAD select S5PC100_SETUP_SDHCI + select S5P_DEV_FIMC0 + select S5P_DEV_FIMC1 + select S5P_DEV_FIMC2 help Machine support for the Samsung SMDKC100
arch/arm/mach-s5pc100/mach-smdkc100.c +4 -0
@@ -47,6 +47,7 @@#include <plat/adc.h> #include <plat/keypad.h> #include <plat/ts.h> +#include <plat/fimc.h> /* Following are default values for UCON, ULCON and UFCON UART registers */ #define S5PC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -192,6 +193,9 @@ static struct platform_device *smdkc100_devices[] __initdata = { &s5pc100_device_iis0, &samsung_device_keypad, &s5pc100_device_ac97, + &s5p_device_fimc0, + &s5p_device_fimc1, + &s5p_device_fimc2, }; static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
Signature · 1 line
1.7.2
PATCH v3 8/8 ARM: s5pv210: Override FIMC driver name on Aquila board
In reply to Sylwester NawrockiChange variant of the FIMC driver for compatibility with older SoC version (EVT0) used on Aquila board.
--- arch/arm/mach-s5pv210/mach-aquila.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/mach-aquila.c +5 -0
@@ -36,6 +36,7 @@#include <plat/cpu.h> #include <plat/fb.h> #include <plat/fimc.h> +#include <plat/fimc-core.h> #include "common-aquila-goni.h"
@@ -467,6 +468,10 @@ static void __init aquila_machine_init(void)i2c_register_board_info (AP_I2C_GPIO_PMIC_BUS_4 , i2c_gpio_pmic_devs,ARRAY_SIZE (i2c_gpio_pmic_devs)); +s3c_fimc_setname (0 ,"s5p-fimc" ); +s3c_fimc_setname (1 ,"s5p-fimc" ); +s3c_fimc_setname (2 ,"s5p-fimc" ); +/* FB */ s3c_fb_set_platdata (&aquila_lcd_pdata);
Signature · 1 line
1.7.2