Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d41bde88 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'samsung-drivers-exynos-mfc-4.8' of...

Merge tag 'samsung-drivers-exynos-mfc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers

Topic branch for Exynos MFC changes for v4.8:
Pull s5p-mfc changes from media tree so the arm/mach-exynos code
could be removed. The bindings are converted to generic reserved memory
bindings.

* tag 'samsung-drivers-exynos-mfc-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux

:
  ARM: dts: exynos: Enable MFC device on Exynos4412 Odroid boards
  ARM: dts: exynos: Convert MFC device to generic reserved memory bindings
  ARM: EXYNOS: Remove code for MFC custom reserved memory handling
  media: s5p-mfc: add iommu support
  media: s5p-mfc: replace custom reserved memory handling code with generic one
  media: s5p-mfc: use generic reserved memory bindings
  of: reserved_mem: add support for using more than one region for given device
  media: set proper max seg size for devices on Exynos SoCs
  media: vb2-dma-contig: add helper for setting dma max seg size
  s5p-mfc: Fix race between s5p_mfc_probe() and s5p_mfc_open()
  s5p-mfc: Add release callback for memory region devs
  s5p-mfc: Set device name for reserved memory region devs

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents d8d8126f 96167bd3
Loading
Loading
Loading
Loading
+31 −8
Original line number Diff line number Diff line
@@ -21,15 +21,18 @@ Required properties:
  - clock-names : from common clock binding: must contain "mfc",
		  corresponding to entry in the clocks property.

  - 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.

Optional properties:
  - power-domains : power-domain property defined with a phandle
			   to respective power domain.
  - memory-region : from reserved memory binding: phandles to two reserved
	memory regions, first is for "left" mfc memory bus interfaces,
	second if for the "right" mfc memory bus, used when no SYSMMU
	support is available

Obsolete properties:
  - samsung,mfc-r, samsung,mfc-l : support removed, please use memory-region
	property instead


Example:
SoC specific DT entry:
@@ -43,9 +46,29 @@ mfc: codec@13400000 {
	clock-names = "mfc";
};

Reserved memory specific DT entry for given board (see reserved memory binding
for more information):

reserved-memory {
	#address-cells = <1>;
	#size-cells = <1>;
	ranges;

	mfc_left: region@51000000 {
		compatible = "shared-dma-pool";
		no-map;
		reg = <0x51000000 0x800000>;
	};

	mfc_right: region@43000000 {
		compatible = "shared-dma-pool";
		no-map;
		reg = <0x43000000 0x800000>;
	};
};

Board specific DT entry:

codec@13400000 {
	samsung,mfc-r = <0x43000000 0x800000>;
	samsung,mfc-l = <0x51000000 0x800000>;
	memory-region = <&mfc_left>, <&mfc_right>;
};
+29 −0
Original line number Diff line number Diff line
/*
 * Samsung's Exynos SoC MFC (Video Codec) reserved memory common definition.
 *
 * Copyright (c) 2016 Samsung Electronics Co., Ltd
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

/ {
	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		mfc_left: region@51000000 {
			compatible = "shared-dma-pool";
			no-map;
			reg = <0x51000000 0x800000>;
		};

		mfc_right: region@43000000 {
			compatible = "shared-dma-pool";
			no-map;
			reg = <0x43000000 0x800000>;
		};
	};
};
+2 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include "exynos4210.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "exynos-mfc-reserved-memory.dtsi"

/ {
	model = "Insignal Origen evaluation board based on Exynos4210";
@@ -288,8 +289,7 @@
};

&mfc {
	samsung,mfc-r = <0x43000000 0x800000>;
	samsung,mfc-l = <0x51000000 0x800000>;
	memory-region = <&mfc_left>, <&mfc_right>;
	status = "okay";
};

+2 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
/dts-v1/;
#include "exynos4210.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include "exynos-mfc-reserved-memory.dtsi"

/ {
	model = "Samsung smdkv310 evaluation board based on Exynos4210";
@@ -133,8 +134,7 @@
};

&mfc {
	samsung,mfc-r = <0x43000000 0x800000>;
	samsung,mfc-l = <0x51000000 0x800000>;
	memory-region = <&mfc_left>, <&mfc_right>;
	status = "okay";
};

+6 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include "exynos4412.dtsi"
#include "exynos4412-ppmu-common.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include "exynos-mfc-reserved-memory.dtsi"

/ {
	chosen {
@@ -499,6 +500,11 @@
	clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
};

&mfc {
	memory-region = <&mfc_left>, <&mfc_right>;
	status = "okay";
};

&mixer {
	status = "okay";
};
Loading