ARM: S5P: Add support for MFC device on S5PV210 and EXYNOS4
Subsystems (3)
v2 cover ARM: S5P: Add support for MFC device on S5PV210 and EXYNOS4
Hello,
Multi Format Codec is a device present in the S5PV210 and EXYNOS4 SoCs by Samsung. This patch set adds platform and mach data for MFC. The new version contains memory initialization code for MFC and support for DMA contig allocator.
The patches have been applied to this branch, it should become available in a couple of hours:
http://git.infradead.org/users/kmpark/linux-2.6-samsung/shortlog/refs/heads/mfc-for-kgene
The MFC driver can be found on this branch (it should also sync in a couple of hours):
http://git.infradead.org/users/kmpark/linux-2.6-samsung/shortlog/refs/heads/mfc-for-mauro
The driver has been sent today to the linux-media list.
Best regards,
Kamil Debski
Change log:
=================
Changes since v1
=================
- support for DMA conitg allocator
- reserving memory for MFC
Patch summary:
Kamil Debski (3):
ARM: Add support for MFC device to plat-s5p, mach-s5pv210 and
mach-exynos4
ARM: S5PV210: Enable MFC on Goni
ARM: EXYNOS4: Enable MFC on universal_c210
arch/arm/Kconfig | 2 + arch/arm/mach-exynos4/Kconfig | 2 + arch/arm/mach-exynos4/clock.c | 63 ++++++++++++++ arch/arm/mach-exynos4/include/mach/map.h | 2 + arch/arm/mach-exynos4/mach-universal_c210.c | 13 +++ 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-goni.c | 10 ++ arch/arm/plat-s5p/Kconfig | 5 + arch/arm/plat-s5p/Makefile | 2 +- arch/arm/plat-s5p/dev-mfc.c | 125 +++++++++++++++++++++++++++ arch/arm/plat-s5p/include/plat/mfc.h | 28 ++++++ arch/arm/plat-samsung/include/plat/devs.h | 3 + 14 files changed, 264 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-mfc.c create mode 100644 arch/arm/plat-s5p/include/plat/mfc.h
PATCH v2 1/3 ARM: Add support for MFC device to plat-s5p, mach-s5pv210 and mach-exynos4
Add support for MFC device to plat-s5p, mach-exynos4, mach-s5pv210:
- clock support
- memory mapping and reserving
- s5p_device_mfc platform device
--- arch/arm/Kconfig | 2 + arch/arm/mach-exynos4/clock.c | 63 +++++++++++++++ arch/arm/mach-exynos4/include/mach/map.h | 2 + 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 | 125 +++++++++++++++++++++++++++++ arch/arm/plat-s5p/include/plat/mfc.h | 28 +++++++ arch/arm/plat-samsung/include/plat/devs.h | 3 + 10 files changed, 238 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-mfc.c create mode 100644 arch/arm/plat-s5p/include/plat/mfc.h
arch/arm/Kconfig +2 -0
@@ -749,6 +749,7 @@ config ARCH_S5PV210 bool "Samsung S5PV210/S5PC110" select CPU_V7 select ARCH_SPARSEMEM_ENABLE + select ARCH_HAS_HOLES_MEMORYMODEL select GENERIC_GPIO select HAVE_CLK select ARM_L1_CACHE_SHIFT_6
@@ -765,6 +766,7 @@ config ARCH_EXYNOS4 bool "Samsung EXYNOS4" select CPU_V7 select ARCH_SPARSEMEM_ENABLE + select ARCH_HAS_HOLES_MEMORYMODEL select GENERIC_GPIO select HAVE_CLK select ARCH_HAS_CPUFREQ
arch/arm/mach-exynos4/clock.c +63 -0
87 lines not on this page · raw message
arch/arm/mach-exynos4/include/mach/map.h +2 -0
@@ -105,6 +105,7 @@#define EXYNOS4_PA_EHCI 0x12580000#define EXYNOS4_PA_HSPHY 0x125B0000 +#define EXYNOS4_PA_MFC 0x13400000#define EXYNOS4_PA_UART 0x13800000
@@ -146,6 +147,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#define S5P_PA_EHCI EXYNOS4_PA_EHCI
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_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 +125 -0
125 lines not on this page · raw message
arch/arm/plat-s5p/include/plat/mfc.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* Copyright (C) 2011 Samsung Electronics Co.Ltd +* Author: Marek Szyprowski <[email protected]> +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +*/ + +#ifndef __PLAT_S5P_MFC_H +#define __PLAT_S5P_MFC_H + +/** +* s5p_mfc_reserve_mem - function to early reserve memory for MFC driver +* @rbase: base address for MFC 'right' memory interface +* @rsize: size of the memory reserved for MFC 'right' interface +* @lbase: base address for MFC 'left' memory interface +* @lsize: size of the memory reserved for MFC 'left' interface +* +* This function reserves system memory for both MFC device memory +* interfaces and registers it to respective struct device entries as +* coherent memory. +*/ +void __init s5p_mfc_reserve_mem (phys_addr_t rbase,unsigned int rsize, +phys_addr_t lbase,unsigned int lsize); + +#endif /* __PLAT_S5P_MFC_H */
arch/arm/plat-samsung/include/plat/devs.h +3 -0
@@ -132,6 +132,9 @@ 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_mfc_l; +extern struct platform_device s5p_device_mfc_r;extern struct platform_device s5p_device_mipi_csis0;extern struct platform_device s5p_device_mipi_csis1;
Signature · 1 line
1.6.3.3
PATCH v2 2/3 ARM: S5PV210: Enable MFC on Goni
In reply to Kamil DebskiEnable MFC device on the Goni board using the S5PV210 SoC.
--- arch/arm/mach-s5pv210/Kconfig | 1 + arch/arm/mach-s5pv210/mach-goni.c | 10 ++++++++++ 2 files changed, 11 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-goni.c +10 -0
@@ -47,6 +47,7 @@#include <plat/sdhci.h> #include <plat/clock.h> #include <plat/s5p-time.h> +#include <plat/mfc.h> /* Following are default values for UCON, ULCON and UFCON UART registers */ #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -808,6 +809,9 @@ static struct platform_device *goni_devices[] __initdata = { &goni_i2c_gpio5, &mmc2_fixed_voltage, &goni_device_gpiokeys, + &s5p_device_mfc, + &s5p_device_mfc_l, + &s5p_device_mfc_r, &s3c_device_i2c0, &s5p_device_fimc0, &s5p_device_fimc1,
@@ -841,6 +845,11 @@ static void __init goni_map_io(void)s5p_set_timer_source (S5P_PWM3 ,S5P_PWM4 ); } +static void __init goni_reserve (void ) +{ +s5p_mfc_reserve_mem (0x43000000 ,8 <<20 ,0x51000000 ,8 <<20 ); +} +static void __init goni_machine_init (void ) {/* Radio: call before I2C 1 registeration */
@@ -893,4 +902,5 @@ MACHINE_START(GONI, "GONI") .map_io = goni_map_io, .init_machine = goni_machine_init, .timer = &s5p_timer, + .reserve = &goni_reserve,MACHINE_END
Signature · 1 line
1.6.3.3
PATCH v2 3/3 ARM: EXYNOS4: Enable MFC on universal_c210
In reply to Kamil DebskiEnable MFC device on the universal_c210 boards using the EXYNOS4 SoC.
--- arch/arm/mach-exynos4/Kconfig | 2 ++ arch/arm/mach-exynos4/mach-universal_c210.c | 13 +++++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-)
arch/arm/mach-exynos4/Kconfig +2 -0
@@ -153,12 +153,14 @@ config MACH_ARMLEX4210 config MACH_UNIVERSAL_C210 bool "Mobile UNIVERSAL_C210 Board" select CPU_EXYNOS4210 + select S5P_DEV_MFC select S3C_DEV_HSMMC select S3C_DEV_HSMMC2 select S3C_DEV_HSMMC3 select S3C_DEV_I2C1 select S3C_DEV_I2C5 select S5P_DEV_ONENAND + select EXYNOS4_DEV_PD select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C5 select EXYNOS4_SETUP_SDHCI
arch/arm/mach-exynos4/mach-universal_c210.c +13 -0
@@ -27,7 +27,9 @@#include <plat/cpu.h> #include <plat/devs.h> #include <plat/iic.h> +#include <plat/mfc.h> #include <plat/sdhci.h> +#include <plat/pd.h> #include <mach/map.h>
@@ -617,6 +619,10 @@ static struct platform_device *universal_devices[] __initdata = {/* Universal Devices */ &universal_gpio_keys, &s5p_device_onenand, + &s5p_device_mfc, + &s5p_device_mfc_l, + &s5p_device_mfc_r, + &exynos4_device_pd[PD_MFC], };static void __init universal_map_io (void )
@@ -626,6 +632,11 @@ static void __init universal_map_io(void)s3c24xx_init_uarts (universal_uartcfgs,ARRAY_SIZE (universal_uartcfgs)); } +static void __init universal_reserve (void ) +{ +s5p_mfc_reserve_mem (0x43000000 ,8 <<20 ,0x51000000 ,8 <<20 ); +} +static void __init universal_machine_init (void ) {universal_sdhci_init ();
@@ -638,6 +649,7 @@ 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; }MACHINE_START (UNIVERSAL_C210 ,"UNIVERSAL_C210" )
@@ -647,4 +659,5 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") .map_io = universal_map_io, .init_machine = universal_machine_init, .timer = &exynos4_timer, + .reserve = &universal_reserve,MACHINE_END
Signature · 1 line
1.6.3.3
Quoted 6 lines · Kamil Debski
Hello,
Multi Format Codec is a device present in the S5PV210 and EXYNOS4 SoCs by Samsung.
This patch set adds platform and mach data for MFC. The new version
contains
Quoted 3 lines
memory initialization code for MFC and support for DMA contig allocator.
The patches have been applied to this branch, it should become available
in a
Quoted 2 lines
couple of hours:
http://git.infradead.org/users/kmpark/linux-2.6-samsung/shortlog/refs/heads/
mfc-
Quoted 3 lines
for-kgene
The MFC driver can be found on this branch (it should also sync in a
couple of
Quoted 2 lines
hours):
http://git.infradead.org/users/kmpark/linux-2.6-samsung/shortlog/refs/heads/
mfc-
Quoted 32 lines
for-mauro
The driver has been sent today to the linux-media list.Best regards,
Kamil DebskiChange log:
=================
Changes since v1
=================
- support for DMA conitg allocator
- reserving memory for MFCPatch summary:
Kamil Debski (3):
ARM: Add support for MFC device to plat-s5p, mach-s5pv210 and
mach-exynos4
ARM: S5PV210: Enable MFC on Goni
ARM: EXYNOS4: Enable MFC onuniversal_c210arch/arm/Kconfig | 2 + arch/arm/mach-exynos4/Kconfig | 2 + arch/arm/mach-exynos4/clock.c | 63 ++++++++++++++ arch/arm/mach-exynos4/include/mach/map.h | 2 + arch/arm/mach-exynos4/mach-universal_c210.c | 13 +++ 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-goni.c | 10 ++ arch/arm/plat-s5p/Kconfig | 5 +
Quoted 8 lines
arch/arm/plat-s5p/Makefile | 2 +- arch/arm/plat-s5p/dev-mfc.c | 125 +++++++++++++++++++++++++++ arch/arm/plat-s5p/include/plat/mfc.h | 28 ++++++ arch/arm/plat-samsung/include/plat/devs.h | 3 + 14 files changed, 264 insertions(+), 1 deletions(-) create mode 100644 arch/arm/plat-s5p/dev-mfc.c create mode 100644 arch/arm/plat-s5p/include/plat/mfc.h
Hi Kamil,
Could you please re-work/re-submit based on current my for-next? Now, it is needed to update about clkdev and external gic...
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.