ARM: S5P: Add support for MFC 5.1 device on S5PV210 and EXYNOS4
Subsystems (3)
cover ARM: S5P: Add support for MFC 5.1 device on S5PV210 and EXYNOS4
Hello,
Multi Format Codec 5.1 is a device present in the S5PV210 and EXYNOS4 SoCs by Samsung. This patch set adds platform and mach data for MFC 5.1.
Best regards,
Kamil Debski
Patch summary:
Kamil Debski (3):
ARM: S5P: Add MFC 5.1 driver to plat-s5p, mach-s5pv210 and mach-exynos4
ARM: S5PV210: Enable MFC on Goni & Aquila
ARM: EXYNOS4: Enable MFC on universal_c210
arch/arm/mach-exynos4/Kconfig | 1 + arch/arm/mach-exynos4/clock.c | 63 +++++++++++++++++++++++++++ arch/arm/mach-exynos4/include/mach/map.h | 3 + arch/arm/mach-exynos4/mach-universal_c210.c | 8 +++ arch/arm/mach-s5pv210/Kconfig | 1 + arch/arm/mach-s5pv210/clock.c | 6 +++ arch/arm/mach-s5pv210/include/mach/map.h | 3 + arch/arm/mach-s5pv210/mach-aquila.c | 1 + arch/arm/mach-s5pv210/mach-goni.c | 1 + arch/arm/plat-s5p/Kconfig | 5 ++ arch/arm/plat-s5p/Makefile | 2 +- arch/arm/plat-s5p/dev-mfc.c | 49 +++++++++++++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 1 + 13 files changed, 143 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-mfc.c
PATCH 1/3 ARM: S5P: Add MFC 5.1 driver to plat-s5p, mach-s5pv210 and mach-exynos4
Add support for MFC 5.1 device to plat-s5p, mach-exynos4, mach-s5pv210:
- clock support
- memory mapping
- s5p_device_mfc platform device
--- arch/arm/mach-exynos4/clock.c | 63 +++++++++++++++++++++++++++++ arch/arm/mach-exynos4/include/mach/map.h | 3 + arch/arm/mach-s5pv210/clock.c | 6 +++ arch/arm/mach-s5pv210/include/mach/map.h | 3 + arch/arm/plat-s5p/Kconfig | 5 ++ arch/arm/plat-s5p/Makefile | 2 +- arch/arm/plat-s5p/dev-mfc.c | 49 ++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 1 + 8 files changed, 131 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-mfc.c
arch/arm/mach-exynos4/clock.c +63 -0
@@ -571,6 +571,11 @@ static struct clk init_clocks_off[] = { .enable = exynos4_clk_ip_image_ctrl, .ctrlbit = (1 << 0), }, { + .name = "mfc", + .id = -1, + .enable = exynos4_clk_ip_mfc_ctrl, + .ctrlbit = (1 << 0), + }, { .name = "i2c", .id = 0, .parent = &clk_aclk_100.clk,
@@ -795,6 +800,54 @@ static struct clksrc_sources clkset_mout_g2d = { .nr_sources = ARRAY_SIZE(clkset_mout_g2d_list), }; + +static struct clk *clkset_mout_mfc0_list[] = { + [0 ] = &clk_mout_mpll.clk, + [1 ] = &clk_sclk_apll.clk, +}; + +static struct clksrc_sources clkset_mout_mfc0 = { + .sources = clkset_mout_mfc0_list, + .nr_sources =ARRAY_SIZE (clkset_mout_mfc0_list), +}; + +static struct clksrc_clk clk_mout_mfc0 = { + .clk = { + .name ="mout_mfc0" , + .id =-1 , + }, + .sources = &clkset_mout_mfc0, + .reg_src = { .reg =S5P_CLKSRC_MFC , .shift =0 , .size =1 }, +}; + +static struct clk *clkset_mout_mfc1_list[] = { + [0 ] = &clk_mout_epll.clk, + [1 ] = &clk_sclk_vpll.clk, +}; + +static struct clksrc_sources clkset_mout_mfc1 = { + .sources = clkset_mout_mfc1_list, + .nr_sources =ARRAY_SIZE (clkset_mout_mfc1_list), +}; + +static struct clksrc_clk clk_mout_mfc1 = { + .clk = { + .name ="mout_mfc1" , + .id =-1 , + }, + .sources = &clkset_mout_mfc1, + .reg_src = { .reg =S5P_CLKSRC_MFC , .shift =4 , .size =1 }, +}; + +static struct clk *clkset_mout_mfc_list[] = { + [0 ] = &clk_mout_mfc0.clk, + [1 ] = &clk_mout_mfc1.clk, +}; + +static struct clksrc_sources clkset_mout_mfc = { + .sources = clkset_mout_mfc_list, + .nr_sources =ARRAY_SIZE (clkset_mout_mfc_list), +};static struct clksrc_clk clk_dout_mmc0 = { .clk = { .name ="dout_mmc0" ,
@@ -1046,6 +1099,14 @@ static struct clksrc_clk clksrcs[] = { .reg_div = { .reg = S5P_CLKDIV_IMAGE, .shift = 0, .size = 4 }, }, { .clk = { + .name = "sclk_mfc", + .id = -1, + }, + .sources = &clkset_mout_mfc, + .reg_src = { .reg = S5P_CLKSRC_MFC, .shift = 8, .size = 1 }, + .reg_div = { .reg = S5P_CLKDIV_MFC, .shift = 0, .size = 4 }, + }, { + .clk = { .name = "sclk_mmc", .id = 0, .parent = &clk_dout_mmc0.clk,
@@ -1122,6 +1183,8 @@ static struct clksrc_clk *sysclks[] = { &clk_dout_mmc2, &clk_dout_mmc3, &clk_dout_mmc4, + &clk_mout_mfc0, + &clk_mout_mfc1, };static int xtal_rate;
arch/arm/mach-exynos4/include/mach/map.h +3 -0
@@ -101,6 +101,8 @@#define EXYNOS4_PA_SROMC 0x12570000 +#define EXYNOS4_PA_MFC 0x13400000 +#define EXYNOS4_PA_UART 0x13800000#define EXYNOS4_PA_IIC (x) (0x13860000 + ((x) * 0x10000))
@@ -141,6 +143,7 @@#define S5P_PA_ONENAND_DMA EXYNOS4_PA_ONENAND_DMA#define S5P_PA_SDRAM EXYNOS4_PA_SDRAM#define S5P_PA_SROMC EXYNOS4_PA_SROMC +#define S5P_PA_MFC EXYNOS4_PA_MFC#define S5P_PA_SYSCON EXYNOS4_PA_SYSCON#define S5P_PA_TIMER EXYNOS4_PA_TIMER
arch/arm/mach-s5pv210/clock.c +6 -0
@@ -347,6 +347,12 @@ static struct clk init_clocks_off[] = { .enable = s5pv210_clk_ip0_ctrl, .ctrlbit = (1 << 26), }, { + .name = "mfc", + .id = -1, + .parent = &clk_pclk_psys.clk, + .enable = s5pv210_clk_ip0_ctrl, + .ctrlbit = (1 << 16), + }, { .name = "otg", .id = -1, .parent = &clk_hclk_psys.clk,
arch/arm/mach-s5pv210/include/mach/map.h +3 -0
@@ -59,6 +59,8 @@#define S5PV210_PA_CFCON 0xE8200000 +#define S5PV210_PA_MFC (0xF1700000) +#define S5PV210_PA_HSMMC (x) (0xEB000000 + ((x) * 0x100000))#define S5PV210_PA_HSOTG 0xEC000000
@@ -107,6 +109,7 @@#define S5P_PA_FIMC1 S5PV210_PA_FIMC1#define S5P_PA_FIMC2 S5PV210_PA_FIMC2#define S5P_PA_MIPI_CSIS0 S5PV210_PA_MIPI_CSIS +#define S5P_PA_MFC S5PV210_PA_MFC#define S5P_PA_ONENAND S5PC110_PA_ONENAND#define S5P_PA_ONENAND_DMA S5PC110_PA_ONENAND_DMA#define S5P_PA_SDRAM S5PV210_PA_SDRAM
arch/arm/plat-s5p/Kconfig +5 -0
@@ -5,6 +5,11 @@ # # Licensed under GPLv2 +config S5P_DEV_MFC + bool + help + Compile in platform device definitions for MFC + config PLAT_S5P bool depends on (ARCH_S5P64X0 || ARCH_S5P6442 || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS4)
arch/arm/plat-s5p/Makefile +1 -1
@@ -25,7 +25,7 @@ obj-$(CONFIG_PM) += irq-pm.o obj-$(CONFIG_S5P_HRT) += s5p-time.o # devices - +obj-$(CONFIG_S5P_DEV_MFC) += dev-mfc.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-mfc.c new file +49 -0
49 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/devs.h +1 -0
@@ -138,6 +138,7 @@ extern struct platform_device s5p_device_fimc0;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_mfc;extern struct platform_device s5p_device_mipi_csis0;extern struct platform_device s5p_device_mipi_csis1;
Signature · 1 line
1.6.3.3
PATCH 2/3 ARM: S5PV210: Enable MFC on Goni & Aquila
In reply to Kamil DebskiEnable MFC 5.1 device on the Goni & Aquila boards using the S5PV210 SoC.
--- arch/arm/mach-s5pv210/Kconfig | 1 + arch/arm/mach-s5pv210/mach-aquila.c | 1 + arch/arm/mach-s5pv210/mach-goni.c | 1 + 3 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/Kconfig +1 -0
@@ -90,6 +90,7 @@ config MACH_GONI select S3C_DEV_HSMMC2 select S3C_DEV_I2C1 select S3C_DEV_I2C2 + select S5P_DEV_MFC select S3C_DEV_USB_HSOTG select S5P_DEV_ONENAND select SAMSUNG_DEV_KEYPAD
arch/arm/mach-s5pv210/mach-aquila.c +1 -0
@@ -616,6 +616,7 @@ static struct platform_device *aquila_devices[] __initdata = { &s5p_device_fimc0, &s5p_device_fimc1, &s5p_device_fimc2, + &s5p_device_mfc, &s5pv210_device_iis0, &wm8994_fixed_voltage0, &wm8994_fixed_voltage1,
arch/arm/mach-s5pv210/mach-goni.c +1 -0
@@ -809,6 +809,7 @@ static struct platform_device *goni_devices[] __initdata = { &goni_i2c_gpio5, &mmc2_fixed_voltage, &goni_device_gpiokeys, + &s5p_device_mfc, &s3c_device_i2c0, &s5p_device_fimc0, &s5p_device_fimc1,
Signature · 1 line
1.6.3.3
PATCH 3/3 exynos4: Enable MFC on universal_c210
In reply to Kamil DebskiEnable MFC 5.1 device on the universal_c210 boards using the EXYNOS4 SoC.
--- arch/arm/mach-exynos4/Kconfig | 1 + arch/arm/mach-exynos4/mach-universal_c210.c | 8 ++++++++ 2 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/mach-exynos4/Kconfig +1 -0
@@ -152,6 +152,7 @@ config MACH_UNIVERSAL_C210 select S5P_DEV_FIMC1 select S5P_DEV_FIMC2 select S5P_DEV_FIMC3 + select S5P_DEV_MFC select S3C_DEV_HSMMC select S3C_DEV_HSMMC2 select S3C_DEV_HSMMC3
arch/arm/mach-exynos4/mach-universal_c210.c +8 -0
@@ -620,7 +620,11 @@ static struct platform_device *universal_devices[] __initdata = { &s5p_device_fimc1, &s5p_device_fimc2, &s5p_device_fimc3, + &s5p_device_mfc, &exynos4_device_pd[PD_CAM ], + &exynos4_device_pd[PD_MFC ], + &exynos4_device_sysmmu[S5P_SYSMMU_MFC_R ], + &exynos4_device_sysmmu[S5P_SYSMMU_MFC_L ], &exynos4_device_sysmmu[S5P_SYSMMU_FIMC0 ], &exynos4_device_sysmmu[S5P_SYSMMU_FIMC1 ], &exynos4_device_sysmmu[S5P_SYSMMU_FIMC2],
@@ -651,6 +655,10 @@ static void __init universal_machine_init(void)/* Last */ platform_add_devices (universal_devices,ARRAY_SIZE (universal_devices)); + s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC ].dev; + exynos4_device_sysmmu[S5P_SYSMMU_MFC_L ].dev.parent = &exynos4_device_pd[PD_MFC ].dev; + exynos4_device_sysmmu[S5P_SYSMMU_MFC_R ].dev.parent = &exynos4_device_pd[PD_MFC ].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.6.3.3