* [PATCH v5] Add MFC device tree support @ 2012-09-27 17:09 Arun Kumar K 2012-09-27 17:09 ` [PATCH v5] ARM: EXYNOS: " Arun Kumar K 0 siblings, 1 reply; 7+ messages in thread From: Arun Kumar K @ 2012-09-27 17:09 UTC (permalink / raw) To: linux-samsung-soc, devicetree-discuss Cc: kgene.kim, k.debski, jtp.park, thomas.abraham, k.lewandowsk, s.nawrocki, ch.naveen, arun.kk, joshi This patch adds the device tree entries for MFC on Exynos5. This is rebased to the linux-samsung for-next branch. Changelog v5 - Fixed non-DT compile issue - Moved fdt mfc parsing function to plat-samsung as suggested by Kukjin Kim http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg12647.html - Use single property for both base address and size for mfc memory banks as suggested by Tomasz Figa http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg12650.html Changelog v4 - Addressed review comments from Karol Lewandowski http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/12703 Changelog v3 - Addressed review comments given by Sylwester Nawrocki http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg12340.html Changelog v2 - Use fdt functions to parse dtsi file for mfc memory info Changelog v1 - Moved board specific DT information to different dtsi file - Changed compatible name for the device - Addressed other review comments Arun Kumar K (1): ARM: EXYNOS: Add MFC device tree support .../devicetree/bindings/media/s5p-mfc.txt | 23 +++++++++++++ arch/arm/boot/dts/exynos5250-smdk5250.dts | 5 +++ arch/arm/boot/dts/exynos5250.dtsi | 6 +++ arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/clock-exynos5.c | 2 +- arch/arm/mach-exynos/mach-exynos5-dt.c | 16 +++++++++ arch/arm/plat-samsung/devs.c | 1 + arch/arm/plat-samsung/include/plat/mfc.h | 11 ++++++ arch/arm/plat-samsung/s5p-dev-mfc.c | 34 ++++++++++++++++++++ 9 files changed, 98 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/s5p-mfc.txt ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5] ARM: EXYNOS: Add MFC device tree support 2012-09-27 17:09 [PATCH v5] Add MFC device tree support Arun Kumar K @ 2012-09-27 17:09 ` Arun Kumar K 2012-10-12 6:42 ` Arun Kumar K ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Arun Kumar K @ 2012-09-27 17:09 UTC (permalink / raw) To: linux-samsung-soc, devicetree-discuss Cc: kgene.kim, k.debski, jtp.park, thomas.abraham, k.lewandowsk, s.nawrocki, ch.naveen, arun.kk, joshi This patch adds device tree entry for MFC v6 in the Exynos5 SoC. Makes the required changes in the clock files and adds MFC to the DT device list. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> --- .../devicetree/bindings/media/s5p-mfc.txt | 23 +++++++++++++ arch/arm/boot/dts/exynos5250-smdk5250.dts | 5 +++ arch/arm/boot/dts/exynos5250.dtsi | 6 +++ arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/clock-exynos5.c | 2 +- arch/arm/mach-exynos/mach-exynos5-dt.c | 16 +++++++++ arch/arm/plat-samsung/devs.c | 1 + arch/arm/plat-samsung/include/plat/mfc.h | 11 ++++++ arch/arm/plat-samsung/s5p-dev-mfc.c | 34 ++++++++++++++++++++ 9 files changed, 98 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/s5p-mfc.txt diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt new file mode 100644 index 0000000..67ec3d4 --- /dev/null +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt @@ -0,0 +1,23 @@ +* Samsung Multi Format Codec (MFC) + +Multi Format Codec (MFC) is the IP present in Samsung SoCs which +supports high resolution decoding and encoding functionalities. +The MFC device driver is a v4l2 driver which can encode/decode +video raw/elementary streams and has support for all popular +video codecs. + +Required properties: + - compatible : value should be either one among the following + (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs + (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs + + - reg : Physical base address of the IP registers and length of memory + mapped region. + + - interrupts : MFC interrupt number to the CPU. + + - samsung,mfc-r : Base address of the first memory bank used by MFC + for DMA contiguous memory allocation and its size. + + - samsung,mfc-l : Base address of the second memory bank used by MFC + for DMA contiguous memory allocation and its size. diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index a352df4..21d4ccd 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -166,4 +166,9 @@ spi_2: spi@12d40000 { status = "disabled"; }; + + codec@11000000 { + samsung,mfc-r = <0x43000000 0x800000>; + samsung,mfc-l = <0x51000000 0x800000>; + }; }; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index dddfd6e..49546bc 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -62,6 +62,12 @@ interrupts = <0 42 0>; }; + codec@11000000 { + compatible = "samsung,mfc-v6"; + reg = <0x11000000 0x10000>; + interrupts = <0 96 0>; + }; + rtc { compatible = "samsung,s3c6410-rtc"; reg = <0x101E0000 0x100>; diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 4372075..a0677f6 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -64,6 +64,7 @@ config SOC_EXYNOS5250 select SAMSUNG_DMADEV select S5P_PM if PM select S5P_SLEEP if PM + select S5P_DEV_MFC help Enable EXYNOS5250 SoC support diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index bab6140..46dfea6 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c @@ -664,7 +664,7 @@ static struct clk exynos5_init_clocks_off[] = { .ctrlbit = (1 << 25), }, { .name = "mfc", - .devname = "s5p-mfc", + .devname = "s5p-mfc-v6", .enable = exynos5_clk_ip_mfc_ctrl, .ctrlbit = (1 << 0), }, { diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index fee9dcd..b4ed43a 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -11,6 +11,8 @@ #include <linux/of_platform.h> #include <linux/serial_core.h> +#include <linux/memblock.h> +#include <linux/of_fdt.h> #include <asm/mach/arch.h> #include <asm/hardware/gic.h> @@ -18,6 +20,7 @@ #include <plat/cpu.h> #include <plat/regs-serial.h> +#include <plat/mfc.h> #include "common.h" @@ -72,6 +75,7 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { "exynos-gsc.2", NULL), OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3, "exynos-gsc.3", NULL), + OF_DEV_AUXDATA("samsung,mfc-v6", 0x11000000, "s5p-mfc-v6", NULL), {}, }; @@ -92,6 +96,17 @@ static char const *exynos5250_dt_compat[] __initdata = { NULL }; +static void __init exynos5_reserve(void) +{ + struct s5p_mfc_dt_meminfo mfc_mem; + + /* Reserve memory for MFC only if it's available */ + mfc_mem.compatible = "samsung,mfc-v6"; + if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) + s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, + mfc_mem.lsize); +} + DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ .init_irq = exynos5_init_irq, @@ -102,4 +117,5 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") .timer = &exynos4_timer, .dt_compat = exynos5250_dt_compat, .restart = exynos5_restart, + .reserve = exynos5_reserve, MACHINE_END diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 2df7af8..081621a 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -934,6 +934,7 @@ struct platform_device s5p_device_mfc_r = { .coherent_dma_mask = DMA_BIT_MASK(32), }, }; + #endif /* CONFIG_S5P_DEV_MFC */ /* MIPI CSIS */ diff --git a/arch/arm/plat-samsung/include/plat/mfc.h b/arch/arm/plat-samsung/include/plat/mfc.h index ac13227..128b719 100644 --- a/arch/arm/plat-samsung/include/plat/mfc.h +++ b/arch/arm/plat-samsung/include/plat/mfc.h @@ -10,6 +10,14 @@ #ifndef __PLAT_SAMSUNG_MFC_H #define __PLAT_SAMSUNG_MFC_H __FILE__ +struct s5p_mfc_dt_meminfo { + unsigned long loff; + unsigned long lsize; + unsigned long roff; + unsigned long rsize; + char *compatible; +}; + /** * s5p_mfc_reserve_mem - function to early reserve memory for MFC driver * @rbase: base address for MFC 'right' memory interface @@ -24,4 +32,7 @@ void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, phys_addr_t lbase, unsigned int lsize); +int s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, + int depth, void *data); + #endif /* __PLAT_SAMSUNG_MFC_H */ diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c index ad60894..ef9f470 100644 --- a/arch/arm/plat-samsung/s5p-dev-mfc.c +++ b/arch/arm/plat-samsung/s5p-dev-mfc.c @@ -14,6 +14,8 @@ #include <linux/dma-mapping.h> #include <linux/memblock.h> #include <linux/ioport.h> +#include <linux/of_fdt.h> +#include <linux/of.h> #include <mach/map.h> #include <plat/devs.h> @@ -69,3 +71,35 @@ static int __init s5p_mfc_memory_init(void) return 0; } device_initcall(s5p_mfc_memory_init); + +#ifdef CONFIG_OF +int s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, + int depth, void *data) +{ + __be32 *prop; + unsigned long len; + struct s5p_mfc_dt_meminfo *mfc_mem = data; + + if (!data) + return 0; + + if (!of_flat_dt_is_compatible(node, mfc_mem->compatible)) + return 0; + + prop = of_get_flat_dt_prop(node, "samsung,mfc-l", &len); + if (!prop || (len != 2 * sizeof(unsigned long))) + return 0; + + mfc_mem->loff = be32_to_cpu(prop[0]); + mfc_mem->lsize = be32_to_cpu(prop[1]); + + prop = of_get_flat_dt_prop(node, "samsung,mfc-r", &len); + if (!prop || (len != 2 * sizeof(unsigned long))) + return 0; + + mfc_mem->roff = be32_to_cpu(prop[0]); + mfc_mem->rsize = be32_to_cpu(prop[1]); + + return 1; +} +#endif -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v5] ARM: EXYNOS: Add MFC device tree support 2012-09-27 17:09 ` [PATCH v5] ARM: EXYNOS: " Arun Kumar K @ 2012-10-12 6:42 ` Arun Kumar K 2012-10-23 7:04 ` 김승우 2012-10-23 14:30 ` Kukjin Kim 2 siblings, 0 replies; 7+ messages in thread From: Arun Kumar K @ 2012-10-12 6:42 UTC (permalink / raw) To: Arun Kumar K Cc: linux-samsung-soc, devicetree-discuss, kgene.kim, k.debski, jtp.park, thomas.abraham, k.lewandowsk, s.nawrocki, ch.naveen, joshi Hi all, Any comments / acks on this? Regards Arun On Thu, Sep 27, 2012 at 10:39 PM, Arun Kumar K <arun.kk@samsung.com> wrote: > This patch adds device tree entry for MFC v6 in the Exynos5 > SoC. Makes the required changes in the clock files and adds > MFC to the DT device list. > > Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> > Signed-off-by: Arun Kumar K <arun.kk@samsung.com> > --- > .../devicetree/bindings/media/s5p-mfc.txt | 23 +++++++++++++ > arch/arm/boot/dts/exynos5250-smdk5250.dts | 5 +++ > arch/arm/boot/dts/exynos5250.dtsi | 6 +++ > arch/arm/mach-exynos/Kconfig | 1 + > arch/arm/mach-exynos/clock-exynos5.c | 2 +- > arch/arm/mach-exynos/mach-exynos5-dt.c | 16 +++++++++ > arch/arm/plat-samsung/devs.c | 1 + > arch/arm/plat-samsung/include/plat/mfc.h | 11 ++++++ > arch/arm/plat-samsung/s5p-dev-mfc.c | 34 ++++++++++++++++++++ > 9 files changed, 98 insertions(+), 1 deletions(-) > create mode 100644 Documentation/devicetree/bindings/media/s5p-mfc.txt > > diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt > new file mode 100644 > index 0000000..67ec3d4 > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt > @@ -0,0 +1,23 @@ > +* Samsung Multi Format Codec (MFC) > + > +Multi Format Codec (MFC) is the IP present in Samsung SoCs which > +supports high resolution decoding and encoding functionalities. > +The MFC device driver is a v4l2 driver which can encode/decode > +video raw/elementary streams and has support for all popular > +video codecs. > + > +Required properties: > + - compatible : value should be either one among the following > + (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs > + (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs > + > + - reg : Physical base address of the IP registers and length of memory > + mapped region. > + > + - interrupts : MFC interrupt number to the CPU. > + > + - samsung,mfc-r : Base address of the first memory bank used by MFC > + for DMA contiguous memory allocation and its size. > + > + - samsung,mfc-l : Base address of the second memory bank used by MFC > + for DMA contiguous memory allocation and its size. > diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts > index a352df4..21d4ccd 100644 > --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts > +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts > @@ -166,4 +166,9 @@ > spi_2: spi@12d40000 { > status = "disabled"; > }; > + > + codec@11000000 { > + samsung,mfc-r = <0x43000000 0x800000>; > + samsung,mfc-l = <0x51000000 0x800000>; > + }; > }; > diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi > index dddfd6e..49546bc 100644 > --- a/arch/arm/boot/dts/exynos5250.dtsi > +++ b/arch/arm/boot/dts/exynos5250.dtsi > @@ -62,6 +62,12 @@ > interrupts = <0 42 0>; > }; > > + codec@11000000 { > + compatible = "samsung,mfc-v6"; > + reg = <0x11000000 0x10000>; > + interrupts = <0 96 0>; > + }; > + > rtc { > compatible = "samsung,s3c6410-rtc"; > reg = <0x101E0000 0x100>; > diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig > index 4372075..a0677f6 100644 > --- a/arch/arm/mach-exynos/Kconfig > +++ b/arch/arm/mach-exynos/Kconfig > @@ -64,6 +64,7 @@ config SOC_EXYNOS5250 > select SAMSUNG_DMADEV > select S5P_PM if PM > select S5P_SLEEP if PM > + select S5P_DEV_MFC > help > Enable EXYNOS5250 SoC support > > diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c > index bab6140..46dfea6 100644 > --- a/arch/arm/mach-exynos/clock-exynos5.c > +++ b/arch/arm/mach-exynos/clock-exynos5.c > @@ -664,7 +664,7 @@ static struct clk exynos5_init_clocks_off[] = { > .ctrlbit = (1 << 25), > }, { > .name = "mfc", > - .devname = "s5p-mfc", > + .devname = "s5p-mfc-v6", > .enable = exynos5_clk_ip_mfc_ctrl, > .ctrlbit = (1 << 0), > }, { > diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c > index fee9dcd..b4ed43a 100644 > --- a/arch/arm/mach-exynos/mach-exynos5-dt.c > +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c > @@ -11,6 +11,8 @@ > > #include <linux/of_platform.h> > #include <linux/serial_core.h> > +#include <linux/memblock.h> > +#include <linux/of_fdt.h> > > #include <asm/mach/arch.h> > #include <asm/hardware/gic.h> > @@ -18,6 +20,7 @@ > > #include <plat/cpu.h> > #include <plat/regs-serial.h> > +#include <plat/mfc.h> > > #include "common.h" > > @@ -72,6 +75,7 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { > "exynos-gsc.2", NULL), > OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3, > "exynos-gsc.3", NULL), > + OF_DEV_AUXDATA("samsung,mfc-v6", 0x11000000, "s5p-mfc-v6", NULL), > {}, > }; > > @@ -92,6 +96,17 @@ static char const *exynos5250_dt_compat[] __initdata = { > NULL > }; > > +static void __init exynos5_reserve(void) > +{ > + struct s5p_mfc_dt_meminfo mfc_mem; > + > + /* Reserve memory for MFC only if it's available */ > + mfc_mem.compatible = "samsung,mfc-v6"; > + if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) > + s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, > + mfc_mem.lsize); > +} > + > DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") > /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ > .init_irq = exynos5_init_irq, > @@ -102,4 +117,5 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") > .timer = &exynos4_timer, > .dt_compat = exynos5250_dt_compat, > .restart = exynos5_restart, > + .reserve = exynos5_reserve, > MACHINE_END > diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c > index 2df7af8..081621a 100644 > --- a/arch/arm/plat-samsung/devs.c > +++ b/arch/arm/plat-samsung/devs.c > @@ -934,6 +934,7 @@ struct platform_device s5p_device_mfc_r = { > .coherent_dma_mask = DMA_BIT_MASK(32), > }, > }; > + > #endif /* CONFIG_S5P_DEV_MFC */ > > /* MIPI CSIS */ > diff --git a/arch/arm/plat-samsung/include/plat/mfc.h b/arch/arm/plat-samsung/include/plat/mfc.h > index ac13227..128b719 100644 > --- a/arch/arm/plat-samsung/include/plat/mfc.h > +++ b/arch/arm/plat-samsung/include/plat/mfc.h > @@ -10,6 +10,14 @@ > #ifndef __PLAT_SAMSUNG_MFC_H > #define __PLAT_SAMSUNG_MFC_H __FILE__ > > +struct s5p_mfc_dt_meminfo { > + unsigned long loff; > + unsigned long lsize; > + unsigned long roff; > + unsigned long rsize; > + char *compatible; > +}; > + > /** > * s5p_mfc_reserve_mem - function to early reserve memory for MFC driver > * @rbase: base address for MFC 'right' memory interface > @@ -24,4 +32,7 @@ > void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize, > phys_addr_t lbase, unsigned int lsize); > > +int s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, > + int depth, void *data); > + > #endif /* __PLAT_SAMSUNG_MFC_H */ > diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c > index ad60894..ef9f470 100644 > --- a/arch/arm/plat-samsung/s5p-dev-mfc.c > +++ b/arch/arm/plat-samsung/s5p-dev-mfc.c > @@ -14,6 +14,8 @@ > #include <linux/dma-mapping.h> > #include <linux/memblock.h> > #include <linux/ioport.h> > +#include <linux/of_fdt.h> > +#include <linux/of.h> > > #include <mach/map.h> > #include <plat/devs.h> > @@ -69,3 +71,35 @@ static int __init s5p_mfc_memory_init(void) > return 0; > } > device_initcall(s5p_mfc_memory_init); > + > +#ifdef CONFIG_OF > +int s5p_fdt_find_mfc_mem(unsigned long node, const char *uname, > + int depth, void *data) > +{ > + __be32 *prop; > + unsigned long len; > + struct s5p_mfc_dt_meminfo *mfc_mem = data; > + > + if (!data) > + return 0; > + > + if (!of_flat_dt_is_compatible(node, mfc_mem->compatible)) > + return 0; > + > + prop = of_get_flat_dt_prop(node, "samsung,mfc-l", &len); > + if (!prop || (len != 2 * sizeof(unsigned long))) > + return 0; > + > + mfc_mem->loff = be32_to_cpu(prop[0]); > + mfc_mem->lsize = be32_to_cpu(prop[1]); > + > + prop = of_get_flat_dt_prop(node, "samsung,mfc-r", &len); > + if (!prop || (len != 2 * sizeof(unsigned long))) > + return 0; > + > + mfc_mem->roff = be32_to_cpu(prop[0]); > + mfc_mem->rsize = be32_to_cpu(prop[1]); > + > + return 1; > +} > +#endif > -- > 1.7.0.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5] ARM: EXYNOS: Add MFC device tree support 2012-09-27 17:09 ` [PATCH v5] ARM: EXYNOS: " Arun Kumar K 2012-10-12 6:42 ` Arun Kumar K @ 2012-10-23 7:04 ` 김승우 2012-10-23 10:12 ` Arun Kumar K 2012-10-23 14:30 ` Kukjin Kim 2 siblings, 1 reply; 7+ messages in thread From: 김승우 @ 2012-10-23 7:04 UTC (permalink / raw) To: Arun Kumar K Cc: linux-samsung-soc, devicetree-discuss, kgene.kim, k.debski, jtp.park, thomas.abraham, k.lewandowsk, s.nawrocki, ch.naveen, joshi Hi Arun, On 2012년 09월 28일 02:09, Arun Kumar K wrote: > This patch adds device tree entry for MFC v6 in the Exynos5 > SoC. Makes the required changes in the clock files and adds > MFC to the DT device list. > > Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> > Signed-off-by: Arun Kumar K <arun.kk@samsung.com> > --- > .../devicetree/bindings/media/s5p-mfc.txt | 23 +++++++++++++ > arch/arm/boot/dts/exynos5250-smdk5250.dts | 5 +++ > arch/arm/boot/dts/exynos5250.dtsi | 6 +++ > arch/arm/mach-exynos/Kconfig | 1 + > arch/arm/mach-exynos/clock-exynos5.c | 2 +- > arch/arm/mach-exynos/mach-exynos5-dt.c | 16 +++++++++ > arch/arm/plat-samsung/devs.c | 1 + > arch/arm/plat-samsung/include/plat/mfc.h | 11 ++++++ > arch/arm/plat-samsung/s5p-dev-mfc.c | 34 ++++++++++++++++++++ > 9 files changed, 98 insertions(+), 1 deletions(-) > create mode 100644 Documentation/devicetree/bindings/media/s5p-mfc.txt > <snip> > diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c > index fee9dcd..b4ed43a 100644 > --- a/arch/arm/mach-exynos/mach-exynos5-dt.c > +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c > @@ -11,6 +11,8 @@ > > #include <linux/of_platform.h> > #include <linux/serial_core.h> > +#include <linux/memblock.h> > +#include <linux/of_fdt.h> > > #include <asm/mach/arch.h> > #include <asm/hardware/gic.h> > @@ -18,6 +20,7 @@ > > #include <plat/cpu.h> > #include <plat/regs-serial.h> > +#include <plat/mfc.h> > > #include "common.h" > > @@ -72,6 +75,7 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { > "exynos-gsc.2", NULL), > OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3, > "exynos-gsc.3", NULL), > + OF_DEV_AUXDATA("samsung,mfc-v6", 0x11000000, "s5p-mfc-v6", NULL), > {}, > }; > > @@ -92,6 +96,17 @@ static char const *exynos5250_dt_compat[] __initdata = { > NULL > }; > > +static void __init exynos5_reserve(void) > +{ > + struct s5p_mfc_dt_meminfo mfc_mem; > + > + /* Reserve memory for MFC only if it's available */ > + mfc_mem.compatible = "samsung,mfc-v6"; > + if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) of_scan_flat_dt() is called but it does not have __init on its definition. So this causes section mismatch. > + s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, > + mfc_mem.lsize); > +} > + > DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") > /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ > .init_irq = exynos5_init_irq, > @@ -102,4 +117,5 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") > .timer = &exynos4_timer, > .dt_compat = exynos5250_dt_compat, > .restart = exynos5_restart, > + .reserve = exynos5_reserve, > MACHINE_END <snip> Best Regards, - Seung-Woo Kim -- Seung-Woo Kim Samsung Software R&D Center -- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5] ARM: EXYNOS: Add MFC device tree support 2012-10-23 7:04 ` 김승우 @ 2012-10-23 10:12 ` Arun Kumar K 2012-10-19 1:39 ` Kukjin Kim 0 siblings, 1 reply; 7+ messages in thread From: Arun Kumar K @ 2012-10-23 10:12 UTC (permalink / raw) To: sw0312.kim Cc: Arun Kumar K, linux-samsung-soc, devicetree-discuss, kgene.kim, k.debski, jtp.park, thomas.abraham, k.lewandowsk, s.nawrocki, ch.naveen, joshi Hi Seungwoo Kim, Thank you for the review. >> + >> + /* Reserve memory for MFC only if it's available */ >> + mfc_mem.compatible = "samsung,mfc-v6"; >> + if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) > > of_scan_flat_dt() is called but it does not have __init on its > definition. So this causes section mismatch. > The function of_scan_flat_dt is having __init in its definition. I hope you meant the function s5p_fdt_find_mfc_mem which is not defined with __init and causing section mismatch. I will correct this and post an updated patch. Regards Arun ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5] ARM: EXYNOS: Add MFC device tree support 2012-10-23 10:12 ` Arun Kumar K @ 2012-10-19 1:39 ` Kukjin Kim 0 siblings, 0 replies; 7+ messages in thread From: Kukjin Kim @ 2012-10-19 1:39 UTC (permalink / raw) To: Arun Kumar K Cc: sw0312.kim, Arun Kumar K, linux-samsung-soc, devicetree-discuss, kgene.kim, k.debski, jtp.park, thomas.abraham, k.lewandowsk, s.nawrocki, ch.naveen, joshi On 10/23/12 19:12, Arun Kumar K wrote: > Hi Seungwoo Kim, > > Thank you for the review. > >>> + >>> + /* Reserve memory for MFC only if it's available */ >>> + mfc_mem.compatible = "samsung,mfc-v6"; >>> + if (of_scan_flat_dt(s5p_fdt_find_mfc_mem,&mfc_mem)) >> >> of_scan_flat_dt() is called but it does not have __init on its >> definition. So this causes section mismatch. >> > > The function of_scan_flat_dt is having __init in its definition. Yes. > I hope you meant the function s5p_fdt_find_mfc_mem which is not > defined with __init and causing section mismatch. I think so. > I will correct this and post an updated patch. I fixed when I applied. Seung-Woo, thanks for your reporting. Best regards, Kgene. -- Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v5] ARM: EXYNOS: Add MFC device tree support 2012-09-27 17:09 ` [PATCH v5] ARM: EXYNOS: " Arun Kumar K 2012-10-12 6:42 ` Arun Kumar K 2012-10-23 7:04 ` 김승우 @ 2012-10-23 14:30 ` Kukjin Kim 2 siblings, 0 replies; 7+ messages in thread From: Kukjin Kim @ 2012-10-23 14:30 UTC (permalink / raw) To: 'Arun Kumar K', linux-samsung-soc, devicetree-discuss Cc: k.debski, jtp.park, thomas.abraham, k.lewandowsk, s.nawrocki, ch.naveen, joshi Arun Kumar K wrote: > > This patch adds device tree entry for MFC v6 in the Exynos5 > SoC. Makes the required changes in the clock files and adds > MFC to the DT device list. > > Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> > Signed-off-by: Arun Kumar K <arun.kk@samsung.com> > --- > .../devicetree/bindings/media/s5p-mfc.txt | 23 +++++++++++++ > arch/arm/boot/dts/exynos5250-smdk5250.dts | 5 +++ > arch/arm/boot/dts/exynos5250.dtsi | 6 +++ > arch/arm/mach-exynos/Kconfig | 1 + > arch/arm/mach-exynos/clock-exynos5.c | 2 +- > arch/arm/mach-exynos/mach-exynos5-dt.c | 16 +++++++++ > arch/arm/plat-samsung/devs.c | 1 + > arch/arm/plat-samsung/include/plat/mfc.h | 11 ++++++ > arch/arm/plat-samsung/s5p-dev-mfc.c | 34 ++++++++++++++++++++ > 9 files changed, 98 insertions(+), 1 deletions(-) > create mode 100644 Documentation/devicetree/bindings/media/s5p-mfc.txt > Looks ok to me, applied. Thanks. Best regards, Kgene. -- Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-10-23 14:30 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-09-27 17:09 [PATCH v5] Add MFC device tree support Arun Kumar K 2012-09-27 17:09 ` [PATCH v5] ARM: EXYNOS: " Arun Kumar K 2012-10-12 6:42 ` Arun Kumar K 2012-10-23 7:04 ` 김승우 2012-10-23 10:12 ` Arun Kumar K 2012-10-19 1:39 ` Kukjin Kim 2012-10-23 14:30 ` Kukjin Kim
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).