ARM: EXYNOS: Add MFC device tree support
Hi Kgene,
Thank you for the review comments.
Please find my response inline.
Quoted 11 lines · Kukjin Kim
Quoted 10 lines · Arun Kumar K
Hi Thomas,
Thank you for the comments.
Please find my response inline.------- Original Message -------
Sender : Thomas Abraham<[email protected]>
Date : Aug 16, 2012 17:12 (GMT+05:30)
Title : Re: [PATCH] ARM: EXYNOS: Add MFC device tree support
Quoted 9 lines
Quoted 6 lines · Arun Kumar K
Quoted 5 lines
From: Naveen Krishna Chatradhi <[email protected]>
This patch adds device tree entry for MFC in the Exynos machines. Exynos4 SoCs support MFC v5 version and Exynos5 has MFC v6.x version. So making the required changes in the clock
Since v6.1 is not used anywhere so just MFC v6 should be ok.
Ok.
Quoted 40 lines
Quoted 40 lines
Quoted 6 lines
files and adds MFC to the DT device list.
Signed-off-by Naveen Krishna Chatradhi <[email protected]>Signed-off-by Arun Kumar K <[email protected]>--- .../devicetree/bindings/media/s5p-mfc.txt | 24++++++++++++++++++++
Quoted 4 lines
arch/arm/boot/dts/exynos4210.dtsi | 10 ++++++++ arch/arm/boot/dts/exynos5250.dtsi | 10 ++++++++ arch/arm/mach-exynos/clock-exynos5.c | 2 +- arch/arm/mach-exynos/mach-exynos4-dt.c | 22++++++++++++++++++
Quoted 1 line
arch/arm/mach-exynos/mach-exynos5-dt.c | 22++++++++++++++++++
Review
Quoted 4 lines
6 files changed, 89 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/s5p-mfc.txt(quoted diff) +0
-0
b/Documentation/devicetree/bindings/media/s5p-mfc.txtQuoted 10 lines
new file mode 100644
index 0000000..b9bd266Documentation/devicetree/bindings/media/s5p-mfc.txt new file +4
-0@@ -0,0 +1,24 @@ +* Samsung Multi Format Codec (MFC) + +Mult Format Codec (MFC) is the IP present in Samsung SoCs which +supports high resolution decoding and encoding functionalities.Quoted 2 lines
In addition to this, specifying that mfc is used for video encode/decode would be informative.
Ok. I will make it more descriptive.
Quoted 6 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +5
-0+ +Required properties: + - compatible : value should be either one among the following + (a) "samsung,s5p-mfc-v5" for MFC v5 present in Exynos4 SoCs + (b) "samsung,s5p-mfc-v6" for MFC v6.x present in Exynos5 SoCs
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
"s5p" should be dropped from the compatible values. For example, it should be "samsung,mfc-v5", which is sufficient to identify the version of the mfc controller.
Ok will remove s5p.
Yeah, I agree, just 'mfc-vX' is enough.
Ok. Will change it.
Quoted 27 lines
Quoted 12 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt
Quoted 2 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +2
-0+ + - reg : Physical base address of the IP registers and length ofmemory
Quoted 9 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +8
-0+ mapped region. + + - interrupts : MFC interupt number to the CPU. + + - samsung,mfc-r : Base address of the first memory bank used by MFC + for DMA contiguous memory allocation. + + - samsung,mfc-r-size : Size of the first memory bank.Quoted 15 lines
Quoted 5 lines
It is not allowed to pass buffer base address and size from device tree. Device tree node should describe only the MFC controller hardware. Any memory management related information should be handled outside of device tree. This helps the bindings to be reusable across multiple operating systems.
The mfc-l and mfc-r base address and size is board specific info which has to
be passed to the driver. This is used for DMA contiguous allocation by driver and this value
can change on a different board.
So in that case, i will pass it as platform data to the driver from mach-exynos5-dt.cfile.
I hope that would be ok.
Quoted 5 lines
I don't think so. The mach-exynos5-dt is for all EXYNOS5 SoCs not
platform_data. As I know, the addresses and sizes for buffer passed via platform data before, so it can be passed via device tree for board(.dtsi)? not SoC. In addition, it depends on board.
Ok. So as suggested the best option would be to move the mfc-l and r base address and size information to board dts file (exynos5250-smdk5250.dts) from exynos5250.dtsi. Hope this would be good.
Quoted 34 lines
Quoted 21 lines
Quoted 9 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +5
-0+ + - samsung,mfc-l : Base address of the second memory bank used by MFC + for DMA contiguous memory allocation. + + - samsung,mfc-l-size : Size of the second memory bank.Same comment as above. And the bindings documentation is usually included in the same patch that adds device tree support for the driver.
Ok
Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/boot/dts/exynos4210.dtsiQuoted 7 lines
index 02891fe..b5ee43d 100644
arch/arm/boot/dts/exynos4210.dtsi +0
-0@@ -56,6 +56,16 @@ interrupts = <0 43 0>; };Quoted 2 lines
arch/arm/boot/dts/exynos4210.dtsi line 60
Quoted 2 lines
arch/arm/boot/dts/exynos4210.dtsi +2
-0+ mfc { + compatible = "samsung,s5p-mfc";Maybe
+ compatible = "samsung,mfc-v5"; ?Quoted 6 lines
arch/arm/boot/dts/exynos4210.dtsi line 66
Quoted 6 lines
arch/arm/boot/dts/exynos4210.dtsi +6
-0+ reg = <0x13400000 0x10000>; + interrupts = <0 94 0>; + samsung,mfc-r = <0x43000000>; + samsung,mfc-r-size = <8388608>; + samsung,mfc-l = <0x51000000>; + samsung,mfc-l-size = <8388608>;
Quoted 3 lines
As I commented, the size depends on each board not SoC. So should be removed here.
Ok
Quoted 2 lines
[...]
Thanks and regards
Arun