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

Commit 8fe9c8b7 authored by Olof Johansson's avatar Olof Johansson
Browse files

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

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

Topic branch for Exynos MFC changes for v4.8, part 2:

Replace hardcoded reserved memory ranges with auto-allocated ones
and enable MFC for all boards.

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

:
  ARM: dts: exynos: enable MFC device for all boards
  ARM: dts: exynos: move MFC reserved memory regions from boards to .dtsi
  ARM: dts: exynos: replace hardcoded reserved memory ranges with auto-allocated ones
  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 355e5ce7 9f7d27fa
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>;
};
+35 −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_mfc_left {
			compatible = "shared-dma-pool";
			no-map;
			size = <0x1000000>;
			alignment = <0x100000>;
		};

		mfc_right: region_mfc_right {
			compatible = "shared-dma-pool";
			no-map;
			size = <0x800000>;
			alignment = <0x100000>;
		};
	};
};

&mfc {
	memory-region = <&mfc_left>, <&mfc_right>;
};
+0 −4
Original line number Diff line number Diff line
@@ -632,10 +632,6 @@
	status = "okay";
};

&mfc {
	status = "okay";
};

&jpeg {
	status = "okay";
};
+0 −1
Original line number Diff line number Diff line
@@ -431,7 +431,6 @@
			clocks = <&cmu CLK_MFC>, <&cmu CLK_SCLK_MFC>;
			power-domains = <&pd_mfc>;
			iommus = <&sysmmu_mfc>;
			status = "disabled";
		};

		sysmmu_mfc: sysmmu@13620000 {
+0 −1
Original line number Diff line number Diff line
@@ -428,7 +428,6 @@
		clock-names = "mfc", "sclk_mfc";
		iommus = <&sysmmu_mfc_l>, <&sysmmu_mfc_r>;
		iommu-names = "left", "right";
		status = "disabled";
	};

	serial_0: serial@13800000 {
Loading