ARM: EXYNOS: Add MFC device tree support
Hi Sylwester,
Thank you for the comments.
Will make the necessary changes.
Regards
Arun
Quoted 128 lines · Sylwester Nawrocki
Just a few small comments...
Quoted 8 lines · Arun Kumar K
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<[email protected]>Signed-off-by Arun Kumar K<[email protected]>---
...
Documentation/devicetree/bindings/media/s5p-mfc.txt line 3
Quoted 12 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt +0
-0new file mode 100644
index 0000000..9a74d09Documentation/devicetree/bindings/media/s5p-mfc.txt new file +3
-0@@ -0,0 +1,27 @@ +* Samsung Multi Format Codec (MFC) + +Mult Format Codec (MFC) is the IP present in Samsung SoCs whichMult -> Multi
Quoted 4 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +4
-0+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.Documentation/devicetree/bindings/media/s5p-mfc.txt line 17
Quoted 10 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +10
-0+ +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 interupt number to the CPU.interupt -> interrupt
Quoted 9 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +9
-0+ + - 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. + + - samsung,mfc-l : Base address of the second memory bank used by MFC + for DMA contiguous memory allocation. +...
Documentation/devicetree/bindings/media/s5p-mfc.txt
Quoted 13 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +13
-0+struct mfc_dt_meminfo { + unsigned long loff; + unsigned long lsize; + unsigned long roff; + unsigned long rsize; +}; + +int fdt_find_mfc_mem(unsigned long node, const char *uname, int depth, + void *data) +{ + __be32 *prop; + unsigned long len; + struct mfc_dt_meminfo *mfc_mem = (struct mfc_dt_meminfo *)data;No need for explicit cast from void *.
Quoted 1 line
+ if (
of_flat_dt_is_compatible(node, "samsung,mfc-v6")) {Might be worth to change it to
if (!of_flat_dt_is_compatible(node, "samsung,mfc-v6")) return 0;and avoid indentation.
Quoted 18 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +6
-0+ prop = of_get_flat_dt_prop(node, "samsung,mfc-l",&len); + if (!prop) + return 0; + mfc_mem->loff = of_read_ulong(prop, len/4); + + prop = of_get_flat_dt_prop(node,"samsung,mfc-l-size",&len);
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +10
-0+ if (!prop) + return 0; + mfc_mem->lsize = of_read_ulong(prop, len/4); + + prop = of_get_flat_dt_prop(node, "samsung,mfc-r",&len); + if (!prop) + return 0; + mfc_mem->roff = of_read_ulong(prop, len/4); + + prop = of_get_flat_dt_prop(node,"samsung,mfc-r-size",&len);
Documentation/devicetree/bindings/media/s5p-mfc.txt
Quoted 8 lines
Documentation/devicetree/bindings/media/s5p-mfc.txt new file +8
-0+ if (!prop) + return 0; + mfc_mem->rsize = of_read_ulong(prop, len/4); + + return 1; + } + return 0; +}--
Regards,
Sylwester--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html