ARM: Exynos: JPEG board definition and device register
Subsystems (3)
v3 cover ARM: Exynos: JPEG board definition and device register
Dear All,
This patch series adds board definition code and device registration code for JPEG IP found in Exynos4 SoC on universal_c210 and nuri boards.
It includes changes after Tushar's review - thanks, Tushar.
Andrzej Pietrasiewicz (3):
ARM: Exynos: JPEG board definition
ARM: Exynos: Register JPEG on universal_c210
ARM: Exynos: Register JPEG on nuri
arch/arm/mach-exynos/Kconfig | 2 ++ arch/arm/mach-exynos/clock.c | 5 +++++ arch/arm/mach-exynos/include/mach/map.h | 3 +++ arch/arm/mach-exynos/mach-nuri.c | 2 ++ arch/arm/mach-exynos/mach-universal_c210.c | 2 ++ arch/arm/plat-s5p/Kconfig | 5 +++++ arch/arm/plat-samsung/devs.c | 18 ++++++++++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 1 + 8 files changed, 38 insertions(+), 0 deletions(-)
PATCH v3 1/3 ARM: Exynos: JPEG board definition
ARM: Exynos: JPEG board definition
--- arch/arm/mach-exynos/clock.c | 5 +++++ arch/arm/mach-exynos/include/mach/map.h | 3 +++ arch/arm/plat-s5p/Kconfig | 5 +++++ arch/arm/plat-samsung/devs.c | 18 ++++++++++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 1 + 5 files changed, 32 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/clock.c +5 -0
@@ -470,6 +470,11 @@ static struct clk init_clocks_off[] = { .enable = exynos4_clk_ip_cam_ctrl, .ctrlbit = (1 << 5), }, { + .name = "jpeg", + .id = 0, + .enable = exynos4_clk_ip_cam_ctrl, + .ctrlbit = (1 << 6), + }, { .name = "fimc", .devname = "exynos4-fimc.0", .enable = exynos4_clk_ip_cam_ctrl,
arch/arm/mach-exynos/include/mach/map.h +3 -0
@@ -31,6 +31,8 @@#define EXYNOS4_PA_FIMC2 0x11820000#define EXYNOS4_PA_FIMC3 0x11830000 +#define EXYNOS4_PA_JPEG 0x11840000 +#define EXYNOS4_PA_G2D 0x12800000#define EXYNOS4_PA_I2S0 0x03830000
@@ -164,6 +166,7 @@#define S5P_PA_FIMC1 EXYNOS4_PA_FIMC1#define S5P_PA_FIMC2 EXYNOS4_PA_FIMC2#define S5P_PA_FIMC3 EXYNOS4_PA_FIMC3 +#define S5P_PA_JPEG EXYNOS4_PA_JPEG#define S5P_PA_G2D EXYNOS4_PA_G2D#define S5P_PA_FIMD0 EXYNOS4_PA_FIMD0#define S5P_PA_HDMI EXYNOS4_PA_HDMI
arch/arm/plat-s5p/Kconfig +5 -0
@@ -80,6 +80,11 @@ config S5P_DEV_FIMC3 help Compile in platform device definitions for FIMC controller 3 +config S5P_DEV_JPEG + bool + help + Compile in platform device definitions for JPEG codec + config S5P_DEV_G2D bool help
arch/arm/plat-samsung/devs.c +18 -0
@@ -295,6 +295,24 @@ struct platform_device s5p_device_g2d = { };#endif /* CONFIG_S5P_DEV_G2D */ +#ifdef CONFIG_S5P_DEV_JPEG +static struct resource s5p_jpeg_resource[] = { + [0 ] =DEFINE_RES_MEM (S5P_PA_JPEG ,SZ_4K ), + [1 ] =DEFINE_RES_IRQ (IRQ_JPEG ), +}; + +struct platform_device s5p_device_jpeg = { + .name ="s5p-jpeg" , + .id =0 , + .num_resources =ARRAY_SIZE (s5p_jpeg_resource), + .resource = s5p_jpeg_resource, + .dev = { + .dma_mask = &samsung_device_dma_mask, + .coherent_dma_mask =DMA_BIT_MASK (32 ), + }, +}; +#endif /* CONFIG_S5P_DEV_JPEG */ +/* FIMD0 */ #ifdef CONFIG_S5P_DEV_FIMD0
arch/arm/plat-samsung/include/plat/devs.h +1 -0
@@ -79,6 +79,7 @@ extern struct platform_device s5p_device_fimc1;extern struct platform_device s5p_device_fimc2;extern struct platform_device s5p_device_fimc3;extern struct platform_device s5p_device_fimc_md; +extern struct platform_device s5p_device_jpeg;extern struct platform_device s5p_device_g2d;extern struct platform_device s5p_device_fimd0;extern struct platform_device s5p_device_hdmi;
Signature · 1 line
1.7.0.4
RE: [PATCHv3 1/3] ARM: Exynos: JPEG board definition
Quoted 3 lines · Andrzej Pietrasiewicz
ARM: Exynos: JPEG board definition
[...]
arch/arm/mach-exynos/include/mach/map.h line 169
Quoted 11 lines
arch/arm/mach-exynos/include/mach/map.h +3
-0+#define EXYNOS4_PA_JPEG 0x11840000 +#define EXYNOS4_PA_G2D 0x12800000#define EXYNOS4_PA_I2S0 0x03830000@@ -164,6 +166,7 @@#define S5P_PA_FIMC1 EXYNOS4_PA_FIMC1#define S5P_PA_FIMC2 EXYNOS4_PA_FIMC2#define S5P_PA_FIMC3 EXYNOS4_PA_FIMC3 +#define S5P_PA_JPEG EXYNOS4_PA_JPEG
I'm not sure we _really_ need to re-define for JPEG. Why not just use EXYNOS4_PA_JPEG?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
RE: [PATCHv3 1/3] ARM: Exynos: JPEG board definition
Hello,
Quoted 10 lines · Kukjin Kim
Quoted 2 lines
ARM: Exynos: JPEG board definition
[...]
Quoted 5 lines
arch/arm/mach-exynos/include/mach/map.h +2
-0+#define EXYNOS4_PA_JPEG 0x11840000 +#define EXYNOS4_PA_G2D 0x12800000
Quoted 9 lines
arch/arm/mach-exynos/include/mach/map.h line 169
Quoted 6 lines
#define
EXYNOS4_PA_I2S00x03830000arch/arm/mach-exynos/include/mach/map.h +1
-0@@ -164,6 +166,7 @@#define S5P_PA_FIMC1 EXYNOS4_PA_FIMC1#define S5P_PA_FIMC2 EXYNOS4_PA_FIMC2#define S5P_PA_FIMC3 EXYNOS4_PA_FIMC3 +#define S5P_PA_JPEG EXYNOS4_PA_JPEGI'm not sure we _really_ need to re-define for JPEG. Why not just use
EXYNOS4_PA_JPEG?
The s5p-jpeg driver can be also used on S5PV210 so this approach seems to be fine, the patch only lacks definitions for the S5PV210 series.
Best regards
Signature · 2 lines
Marek Szyprowski Samsung Poland R&D Center
Re: [PATCHv3 1/3] ARM: Exynos: JPEG board definition
2012-02-09 오전 6:46, Marek Szyprowski 쓴 글:
Quoted 24 lines
Hello,
Quoted 10 lines · Kukjin Kim
Quoted 2 lines
ARM: Exynos: JPEG board definition
[...]
Quoted 5 lines
arch/arm/mach-exynos/include/mach/map.h +2
-0+#define EXYNOS4_PA_JPEG 0x11840000 +#define EXYNOS4_PA_G2D 0x12800000Quoted 9 lines
arch/arm/mach-exynos/include/mach/map.h line 169
Quoted 6 lines
#define EXYNOS4_PA_I2S0 0x03830000arch/arm/mach-exynos/include/mach/map.h +1
-0@@ -164,6 +166,7 @@#define S5P_PA_FIMC1 EXYNOS4_PA_FIMC1#define S5P_PA_FIMC2 EXYNOS4_PA_FIMC2#define S5P_PA_FIMC3 EXYNOS4_PA_FIMC3 +#define S5P_PA_JPEG EXYNOS4_PA_JPEGI'm not sure we _really_ need to re-define for JPEG. Why not just use
EXYNOS4_PA_JPEG?
Quoted 3 lines
The s5p-jpeg driver can be also used on S5PV210 so this approach seems to be fine, the patch only lacks definitions for the S5PV210 series.
I mean, if we use still this style, re-definition for physical address and interrupt number, it will break one kernel image with others. Anyway, I will apply this and will sort it out next time.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Re: [PATCHv3 1/3] ARM: Exynos: JPEG board definition
In reply to Andrzej PietrasiewiczQuoted 2 lines · Andrzej Pietrasiewicz
ARM: Exynos: JPEG board definition
Please adding comments in detail next time.
Quoted 15 lines
Signed-off-by Andrzej Pietrasiewicz<[email protected]>Signed-off-by Kyungmin Park<[email protected]>--- arch/arm/mach-exynos/clock.c | 5 +++++ arch/arm/mach-exynos/include/mach/map.h | 3 +++ arch/arm/plat-s5p/Kconfig | 5 +++++ arch/arm/plat-samsung/devs.c | 18 ++++++++++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 1 + 5 files changed, 32 insertions(+), 0 deletions(-)arch/arm/mach-exynos/clock.c +0
-0
arch/arm/mach-exynos/clock.c static struct clk init_clocks_off[] = { · line 476
Quoted 7 lines
arch/arm/mach-exynos/clock.c +4
-0@@ -470,6 +470,11 @@ static struct clk init_clocks_off[] = { .enable = exynos4_clk_ip_cam_ctrl, .ctrlbit = (1<< 5), }, { + .name = "jpeg", + .id = 0, + .enable = exynos4_clk_ip_cam_ctrl, + .ctrlbit = (1<< 6),
Please use tab...
Quoted 75 lines
arch/arm/mach-exynos/clock.c +1
-0+ }, { .name = "fimc", .devname = "exynos4-fimc.0", .enable = exynos4_clk_ip_cam_ctrl,arch/arm/mach-exynos/include/mach/map.h +3
-0@@ -31,6 +31,8 @@#define EXYNOS4_PA_FIMC2 0x11820000#define EXYNOS4_PA_FIMC3 0x11830000 +#define EXYNOS4_PA_JPEG 0x11840000 +#define EXYNOS4_PA_G2D 0x12800000#define EXYNOS4_PA_I2S0 0x03830000@@ -164,6 +166,7 @@#define S5P_PA_FIMC1 EXYNOS4_PA_FIMC1#define S5P_PA_FIMC2 EXYNOS4_PA_FIMC2#define S5P_PA_FIMC3 EXYNOS4_PA_FIMC3 +#define S5P_PA_JPEG EXYNOS4_PA_JPEG#define S5P_PA_G2D EXYNOS4_PA_G2D#define S5P_PA_FIMD0 EXYNOS4_PA_FIMD0#define S5P_PA_HDMI EXYNOS4_PA_HDMIarch/arm/plat-s5p/Kconfig +5
-0@@ -80,6 +80,11 @@ config S5P_DEV_FIMC3 help Compile in platform device definitions for FIMC controller 3 +config S5P_DEV_JPEG + bool + help + Compile in platform device definitions for JPEG codec + config S5P_DEV_G2D bool helparch/arm/plat-samsung/devs.c +18
-0@@ -295,6 +295,24 @@ struct platform_device s5p_device_g2d = { };#endif /* CONFIG_S5P_DEV_G2D */ +#ifdef CONFIG_S5P_DEV_JPEG +static struct resource s5p_jpeg_resource[] = { + [0 ] =DEFINE_RES_MEM (S5P_PA_JPEG ,SZ_4K ), + [1 ] =DEFINE_RES_IRQ (IRQ_JPEG ), +}; + +struct platform_device s5p_device_jpeg = { + .name ="s5p-jpeg" , + .id =0 , + .num_resources =ARRAY_SIZE (s5p_jpeg_resource), + .resource = s5p_jpeg_resource, + .dev = { + .dma_mask =&samsung_device_dma_mask, + .coherent_dma_mask =DMA_BIT_MASK (32 ), + }, +}; +#endif /* CONFIG_S5P_DEV_JPEG */ +/* FIMD0 */ #ifdef CONFIG_S5P_DEV_FIMD0 arch/arm/plat-samsung/include/plat/devs.h +0
-0
arch/arm/plat-samsung/include/plat/devs.h extern struct platform_device s5p_device_fimc1; · line 85
Quoted 7 lines
arch/arm/plat-samsung/include/plat/devs.h +1
-0@@ -79,6 +79,7 @@ extern struct platform_device s5p_device_fimc1;extern struct platform_device s5p_device_fimc2;extern struct platform_device s5p_device_fimc3;extern struct platform_device s5p_device_fimc_md; +extern struct platform_device s5p_device_jpeg;extern struct platform_device s5p_device_g2d;extern struct platform_device s5p_device_fimd0;extern struct platform_device s5p_device_hdmi;
Applied and I fixed when I apply this.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v3 2/3 ARM: Exynos: Register JPEG on universal_c210
In reply to Andrzej PietrasiewiczARM: Exynos: Register JPEG on universal_c210
--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-universal_c210.c | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/Kconfig +1 -0
@@ -232,6 +232,7 @@ config MACH_UNIVERSAL_C210 select S5P_DEV_FIMC3 select S5P_DEV_G2D select S5P_DEV_CSIS0 + select S5P_DEV_JPEG select S5P_DEV_FIMD0 select S3C_DEV_HSMMC select S3C_DEV_HSMMC2
arch/arm/mach-exynos/mach-universal_c210.c +2 -0
@@ -980,6 +980,7 @@ static struct platform_device *universal_devices[] __initdata = { &universal_gpio_keys, &s5p_device_onenand, &s5p_device_fimd0, + &s5p_device_jpeg, &s5p_device_mfc, &s5p_device_mfc_l, &s5p_device_mfc_r,
@@ -1045,6 +1046,7 @@ static void __init universal_machine_init(void) s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC ].dev; s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0 ].dev; + s5p_device_jpeg.dev.parent = &exynos4_device_pd[PD_CAM ].dev; s5p_device_fimc0.dev.parent = &exynos4_device_pd[PD_CAM ].dev; s5p_device_fimc1.dev.parent = &exynos4_device_pd[PD_CAM ].dev; s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM ].dev;
Signature · 1 line
1.7.0.4
RE: [PATCHv3 2/3] ARM: Exynos: Register JPEG on universal_c210
Quoted 3 lines · Andrzej Pietrasiewicz
ARM: Exynos: Register JPEG on
universal_c210
[...]
arch/arm/mach-exynos/mach-universal_c210.c static void __init universal_machine_init(void) · line 1052
Quoted 5 lines
arch/arm/mach-exynos/mach-universal_c210.c +1
-0+ s5p_device_jpeg.dev.parent = &exynos4_device_pd[PD_CAM ].dev; s5p_device_fimc0.dev.parent = &exynos4_device_pd[PD_CAM ].dev; s5p_device_fimc1.dev.parent = &exynos4_device_pd[PD_CAM ].dev; s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM ].dev;
No, we moved to use generic power domain.
See v3.4-for-rafael branch in my tree and it has been merged into linux-next via pm tree.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v3 3/3 ARM: Exynos: Register JPEG on nuri
In reply to Andrzej PietrasiewiczARM: Exynos: Register JPEG on nuri
--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-nuri.c | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/Kconfig +1 -0
@@ -271,6 +271,7 @@ config MACH_NURI select S3C_DEV_I2C3 select S3C_DEV_I2C5 select S5P_DEV_CSIS0 + select S5P_DEV_JPEG select S5P_DEV_FIMC0 select S5P_DEV_FIMC1 select S5P_DEV_FIMC2
arch/arm/mach-exynos/mach-nuri.c +2 -0
@@ -1260,6 +1260,7 @@ static struct platform_device *nuri_devices[] __initdata = { &i2c9_gpio, &s3c_device_adc, &s5p_device_g2d, + &s5p_device_jpeg, &s3c_device_rtc, &s5p_device_mfc, &s5p_device_mfc_l,
@@ -1319,6 +1320,7 @@ static void __init nuri_machine_init(void) s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC ].dev; s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0 ].dev; + s5p_device_jpeg.dev.parent = &exynos4_device_pd[PD_CAM ].dev; s5p_device_fimc0.dev.parent = &exynos4_device_pd[PD_CAM ].dev; s5p_device_fimc1.dev.parent = &exynos4_device_pd[PD_CAM ].dev; s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM ].dev;
Signature · 1 line
1.7.0.4