Skip to contentSkip to conversation

sunxi: Remove the calls to dma_direct_set_offset

PATCH In review Maxime Ripard 4 participants 15 messages Nov 6, 2020 – Nov 19, 2020

Subsystems (19)
lore
Share & tools
lore
#0 lore raw

cover sunxi: Remove the calls to dma_direct_set_offset

Hi,

Here's an attempt to removing the dma_direct_set_offset calls we have in numerous drivers and move all those quirks into a global notifier as suggested by Robin.

Let me know what you think,
Maxime

Maxime Ripard (7):
drm/sun4i: backend: Fix probe failure with multiple backends
soc: sunxi: Deal with the MBUS DMA offsets in a central place drm/sun4i: backend: Remove the MBUS quirks
media: sun4i: Remove the MBUS quirks
media: sun6i: Remove the MBUS quirks
media: cedrus: Remove the MBUS quirks
media: sun8i-di: Remove the call to of_dma_configure

 drivers/gpu/drm/sun4i/sun4i_backend.c         |  13 --
 .../platform/sunxi/sun4i-csi/sun4i_csi.c      |  27 ----
 .../platform/sunxi/sun6i-csi/sun6i_csi.c      |  17 ---
 .../media/platform/sunxi/sun8i-di/sun8i-di.c  |   4 -
 drivers/soc/sunxi/Kconfig                     |   8 ++
 drivers/soc/sunxi/Makefile                    |   1 +
 drivers/soc/sunxi/sunxi_mbus.c                | 132 ++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   |   1 -
 drivers/staging/media/sunxi/cedrus/cedrus.h   |   3 -
 .../staging/media/sunxi/cedrus/cedrus_hw.c    |  18 ---
 10 files changed, 141 insertions(+), 83 deletions(-)
 create mode 100644 drivers/soc/sunxi/sunxi_mbus.c
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 1/7 drm/sun4i: backend: Fix probe failure with multiple backends

Commit e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset") introduced a regression in our code since the second backed to probe will now get -EINVAL back from dma_direct_set_offset and will prevent the entire DRM device from probing.

Ignore -EINVAL as a temporary measure to get it back working, before removing that call entirely.

Fixes e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset")
---
 drivers/gpu/drm/sun4i/sun4i_backend.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun4i_backend.c +7 -1
index 77497b45f9a2..55960cbb1019 100644
@@ -814,9 +814,15 @@ static int sun4i_backend_bind(struct device *dev, struct device *master,
 		 *
 		 * XXX(hch): this has no business in a driver and needs to move
 		 * to the device tree.
+		 *
+		 * If we have two subsequent calls to dma_direct_set_offset
+		 * returns -EINVAL. Unfortunately, this happens when we have two
+		 * backends in the system, and will result in the driver
+		 * reporting an error while it has been setup properly before.
+		 * Ignore EINVAL, but it should really be removed eventually.
 		 */
 		ret = dma_direct_set_offset(drm->dev, PHYS_OFFSET, 0, SZ_4G);
-		if (ret)
+		if (ret && ret != -EINVAL)
 			return ret;
 	}
 
Signature · 1 line
2.28.0
#2 lore raw

PATCH 2/7 soc: sunxi: Deal with the MBUS DMA offsets in a central place

In reply to Maxime Ripard

So far most of the drivers with the MBUS quirks had to duplicate the code to deal with DT compatibility and enforcing the DMA offsets.

Let's move for a more maintainable solution by putting everything in a notifier that would take care of setting up the DMA offsets for all the MBUS devices.

---
 drivers/soc/sunxi/Kconfig      |   8 ++
 drivers/soc/sunxi/Makefile     |   1 +
 drivers/soc/sunxi/sunxi_mbus.c | 132 +++++++++++++++++++++++++++++++++
 3 files changed, 141 insertions(+)
 create mode 100644 drivers/soc/sunxi/sunxi_mbus.c
drivers/soc/sunxi/Kconfig +8 -0
index f10fd6cae13e..1fef0e711056 100644
@@ -2,6 +2,14 @@
 #
 # Allwinner sunXi SoC drivers
 #
+
+config SUNXI_MBUS
+	bool
+	default ARCH_SUNXI
+	help
+	  Say y to enable the fixups needed to support the Allwinner
+	  MBUS DMA quirks.
+
 config SUNXI_SRAM
 	bool
 	default ARCH_SUNXI
drivers/soc/sunxi/Makefile +1 -0
index 7816fbbec387..549159571d4f 100644
@@ -1,2 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_SUNXI_MBUS) +=	sunxi_mbus.o
 obj-$(CONFIG_SUNXI_SRAM) +=	sunxi_sram.o
drivers/soc/sunxi/sunxi_mbus.c new file +132 -0

132 lines not on this page · raw message

Signature · 1 line
2.28.0
#3 lore raw

PATCH 3/7 drm/sun4i: backend: Remove the MBUS quirks

In reply to Maxime Ripard

Now that the MBUS quirks are applied by our global notifier, we can remove them from our DRM driver.

---
 drivers/gpu/drm/sun4i/sun4i_backend.c | 19 -------------------
 1 file changed, 19 deletions(-)
drivers/gpu/drm/sun4i/sun4i_backend.c +0 -19
index 55960cbb1019..522e51a404cc 100644
@@ -805,25 +805,6 @@ static int sun4i_backend_bind(struct device *dev, struct device *master,
 		ret = of_dma_configure(drm->dev, dev->of_node, true);
 		if (ret)
 			return ret;
-	} else {
-		/*
-		 * If we don't have the interconnect property, most likely
-		 * because of an old DT, we need to set the DMA offset by hand
-		 * on our device since the RAM mapping is at 0 for the DMA bus,
-		 * unlike the CPU.
-		 *
-		 * XXX(hch): this has no business in a driver and needs to move
-		 * to the device tree.
-		 *
-		 * If we have two subsequent calls to dma_direct_set_offset
-		 * returns -EINVAL. Unfortunately, this happens when we have two
-		 * backends in the system, and will result in the driver
-		 * reporting an error while it has been setup properly before.
-		 * Ignore EINVAL, but it should really be removed eventually.
-		 */
-		ret = dma_direct_set_offset(drm->dev, PHYS_OFFSET, 0, SZ_4G);
-		if (ret && ret != -EINVAL)
-			return ret;
 	}
 
 	backend->engine.node = dev->of_node;
Signature · 1 line
2.28.0
#4 lore raw

PATCH 4/7 media: sun4i: Remove the MBUS quirks

In reply to Maxime Ripard

Now that the MBUS quirks are applied by our global notifier, we can remove them from our CSI driver for the A10.

---
 .../platform/sunxi/sun4i-csi/sun4i_csi.c      | 27 -------------------
 1 file changed, 27 deletions(-)
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c +0 -27
index eb15c8c725ca..ec46cff80fdb 100644
@@ -167,33 +167,6 @@ static int sun4i_csi_probe(struct platform_device *pdev)
 	if (!csi->traits)
 		return -EINVAL;
 
-	/*
-	 * On Allwinner SoCs, some high memory bandwidth devices do DMA
-	 * directly over the memory bus (called MBUS), instead of the
-	 * system bus. The memory bus has a different addressing scheme
-	 * without the DRAM starting offset.
-	 *
-	 * In some cases this can be described by an interconnect in
-	 * the device tree. In other cases where the hardware is not
-	 * fully understood and the interconnect is left out of the
-	 * device tree, fall back to a default offset.
-	 */
-	if (of_find_property(csi->dev->of_node, "interconnects", NULL)) {
-		ret = of_dma_configure(csi->dev, csi->dev->of_node, true);
-		if (ret)
-			return ret;
-	} else {
-		/*
-		 * XXX(hch): this has no business in a driver and needs to move
-		 * to the device tree.
-		 */
-#ifdef PHYS_PFN_OFFSET
-		ret = dma_direct_set_offset(csi->dev, PHYS_OFFSET, 0, SZ_4G);
-		if (ret)
-			return ret;
-#endif
-	}
-
 	csi->mdev.dev = csi->dev;
 	strscpy(csi->mdev.model, "Allwinner Video Capture Device",
 		sizeof(csi->mdev.model));
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#5 lore raw

PATCH 5/7 media: sun6i: Remove the MBUS quirks

In reply to Maxime Ripard

Now that the MBUS quirks are applied by our global notifier, we can remove them from our CSI driver for the A31.

---
 .../media/platform/sunxi/sun6i-csi/sun6i_csi.c  | 17 -----------------
 1 file changed, 17 deletions(-)
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +0 -17
index e69e14379fc6..27935f1e9555 100644
@@ -881,14 +881,6 @@ static int sun6i_csi_resource_request(struct sun6i_csi_dev *sdev,
 	return 0;
 }
 
-/*
- * PHYS_OFFSET isn't available on all architectures. In order to
- * accommodate for COMPILE_TEST, let's define it to something dumb.
- */
-#if defined(CONFIG_COMPILE_TEST) && !defined(PHYS_OFFSET)
-#define PHYS_OFFSET 0
-#endif
-
 static int sun6i_csi_probe(struct platform_device *pdev)
 {
 	struct sun6i_csi_dev *sdev;
@@ -899,15 +891,6 @@ static int sun6i_csi_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	sdev->dev = &pdev->dev;
-	/*
-	 * The DMA bus has the memory mapped at 0.
-	 *
-	 * XXX(hch): this has no business in a driver and needs to move
-	 * to the device tree.
-	 */
-	ret = dma_direct_set_offset(sdev->dev, PHYS_OFFSET, 0, SZ_4G);
-	if (ret)
-		return ret;
 
 	ret = sun6i_csi_resource_request(sdev, pdev);
 	if (ret)
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#6 lore raw

PATCH 6/7 media: cedrus: Remove the MBUS quirks

In reply to Maxime Ripard

Now that the MBUS quirks are applied by our global notifier, we can remove them from Cedrus. Since the only quirk was whether or not we had to apply that DMA quirk, we can also remove the quirks infrastructure.

---
 drivers/staging/media/sunxi/cedrus/cedrus.c    |  1 -
 drivers/staging/media/sunxi/cedrus/cedrus.h    |  3 ---
 drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 18 ------------------
 3 files changed, 22 deletions(-)
drivers/staging/media/sunxi/cedrus/cedrus.c +0 -1
index e0e35502e34a..d5fca10ea5b4 100644
@@ -523,7 +523,6 @@ static const struct cedrus_variant sun50i_h5_cedrus_variant = {
 static const struct cedrus_variant sun50i_h6_cedrus_variant = {
 	.capabilities	= CEDRUS_CAPABILITY_UNTILED |
 			  CEDRUS_CAPABILITY_H265_DEC,
-	.quirks		= CEDRUS_QUIRK_NO_DMA_OFFSET,
 	.mod_rate	= 600000000,
 };
 
drivers/staging/media/sunxi/cedrus/cedrus.h +0 -3
index 93c843ae14bb..626090a5811c 100644
@@ -29,8 +29,6 @@
 #define CEDRUS_CAPABILITY_UNTILED	BIT(0)
 #define CEDRUS_CAPABILITY_H265_DEC	BIT(1)
 
-#define CEDRUS_QUIRK_NO_DMA_OFFSET	BIT(0)
-
 enum cedrus_codec {
 	CEDRUS_CODEC_MPEG2,
 	CEDRUS_CODEC_H264,
@@ -150,7 +148,6 @@ struct cedrus_dec_ops {
 
 struct cedrus_variant {
 	unsigned int	capabilities;
-	unsigned int	quirks;
 	unsigned int	mod_rate;
 };
 
drivers/staging/media/sunxi/cedrus/cedrus_hw.c +0 -18
index bcf050a04ffc..286c7fe844c3 100644
@@ -222,24 +222,6 @@ int cedrus_hw_probe(struct cedrus_dev *dev)
 		return ret;
 	}
 
-	/*
-	 * The VPU is only able to handle bus addresses so we have to subtract
-	 * the RAM offset to the physcal addresses.
-	 *
-	 * This information will eventually be obtained from device-tree.
-	 *
-	 * XXX(hch): this has no business in a driver and needs to move
-	 * to the device tree.
-	 */
-
-#ifdef PHYS_PFN_OFFSET
-	if (!(variant->quirks & CEDRUS_QUIRK_NO_DMA_OFFSET)) {
-		ret = dma_direct_set_offset(dev->dev, PHYS_OFFSET, 0, SZ_4G);
-		if (ret)
-			return ret;
-	}
-#endif
-
 	ret = of_reserved_mem_device_init(dev->dev);
 	if (ret && ret != -ENODEV) {
 		dev_err(dev->dev, "Failed to reserve memory\n");
Signature · 7 lines
2.28.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#7 lore raw

PATCH 7/7 media: sun8i-di: Remove the call to of_dma_configure

In reply to Maxime Ripard

of_dma_configure is called by the core before probe gets called so this is redundant.

---
 drivers/media/platform/sunxi/sun8i-di/sun8i-di.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/media/platform/sunxi/sun8i-di/sun8i-di.c +0 -4
index ba5d07886607..ed863bf5ea80 100644
@@ -825,10 +825,6 @@ static int deinterlace_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	ret = of_dma_configure(dev->dev, dev->dev->of_node, true);
-	if (ret)
-		return ret;
-
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	dev->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(dev->base))
Signature · 1 line
2.28.0
maintainer Reviewed-by on the v1 series
#8 lore raw
In reply to Maxime Ripard

Hi,

Quoted 10 lines · Maxime Ripard

Hi,

Here's an attempt to removing the dma_direct_set_offset calls we have in numerous drivers and move all those quirks into a global notifier as suggested by Robin.

Let me know what you think,
Maxime

Quoted 8 lines

Maxime Ripard (7):
drm/sun4i: backend: Fix probe failure with multiple backends
soc: sunxi: Deal with the MBUS DMA offsets in a central place drm/sun4i: backend: Remove the MBUS quirks
media: sun4i: Remove the MBUS quirks
media: sun6i: Remove the MBUS quirks
media: cedrus: Remove the MBUS quirks
media: sun8i-di: Remove the call to of_dma_configure

Whole series looks good to me.

Now the question remaining is how do we merge this series so that the notifier gets merged before all the code dealing with the MBUS quirk gets removed.

Quoted 13 lines
 drivers/gpu/drm/sun4i/sun4i_backend.c         |  13 --
 .../platform/sunxi/sun4i-csi/sun4i_csi.c      |  27 ----
 .../platform/sunxi/sun6i-csi/sun6i_csi.c      |  17 ---
 .../media/platform/sunxi/sun8i-di/sun8i-di.c  |   4 -
 drivers/soc/sunxi/Kconfig                     |   8 ++
 drivers/soc/sunxi/Makefile                    |   1 +
 drivers/soc/sunxi/sunxi_mbus.c                | 132 ++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   |   1 -
 drivers/staging/media/sunxi/cedrus/cedrus.h   |   3 -
 .../staging/media/sunxi/cedrus/cedrus_hw.c    |  18 ---
 10 files changed, 141 insertions(+), 83 deletions(-)
 create mode 100644 drivers/soc/sunxi/sunxi_mbus.c
Quoted 8 lines

--
2.28.0

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by on the v1 series
#9 lore raw
In reply to Maxime Ripard

Thanks,

this looks good to me:

Can you include this patch at the end of your series to that it gets picked up with the other patches?

---
From 5963f88d365367fe74d477b8420d34562d684406 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <[email protected]>
Date: Fri, 6 Nov 2020 17:02:17 +0100
Subject: dma-mapping: remove the dma_direct_set_offset export

Drop the dma_direct_set_offset export and move the declaration to dma-map-ops.h now that the Allwinner drivers have stopped calling it.

---
 arch/arm/mach-keystone/keystone.c | 2 +-
 arch/arm/mach-omap1/usb.c         | 2 +-
 arch/sh/drivers/pci/pcie-sh7786.c | 2 +-
 arch/x86/pci/sta2x11-fixup.c      | 3 ++-
 include/linux/dma-map-ops.h       | 3 +++
 include/linux/dma-mapping.h       | 7 -------
 kernel/dma/direct.c               | 1 -
 7 files changed, 8 insertions(+), 12 deletions(-)
arch/arm/mach-keystone/keystone.c +1 -1
index 09a65c2dfd7327..cd711bfc591f21 100644
@@ -8,7 +8,7 @@
  */
 #include <linux/io.h>
 #include <linux/of.h>
-#include <linux/dma-mapping.h>
+#include <linux/dma-map-ops.h>
 #include <linux/init.h>
 #include <linux/of_platform.h>
 #include <linux/of_address.h>
arch/arm/mach-omap1/usb.c +1 -1
index ba8566204ea9f4..86d3b3c157af44 100644
@@ -9,7 +9,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
-#include <linux/dma-mapping.h>
+#include <linux/dma-map-ops.h>
 #include <linux/io.h>
 
 #include <asm/irq.h>
arch/sh/drivers/pci/pcie-sh7786.c +1 -1
index 4468289ab2cac7..4d499476c33ad6 100644
@@ -12,7 +12,7 @@
 #include <linux/io.h>
 #include <linux/async.h>
 #include <linux/delay.h>
-#include <linux/dma-mapping.h>
+#include <linux/dma-map-ops.h>
 #include <linux/slab.h>
 #include <linux/clk.h>
 #include <linux/sh_clk.h>
arch/x86/pci/sta2x11-fixup.c +2 -1
index 5701d5ba3df4ba..7d25256918543f 100644
@@ -11,7 +11,8 @@
 #include <linux/pci_ids.h>
 #include <linux/export.h>
 #include <linux/list.h>
-#include <linux/dma-direct.h>
+#include <linux/dma-map-ops.h>
+#include <linux/swiotlb.h>
 #include <asm/iommu.h>
 
 #define STA2X11_SWIOTLB_SIZE (4*1024*1024)
include/linux/dma-map-ops.h +3 -0
index a5f89fc4d6df16..03925e438ec3e5 100644
@@ -226,6 +226,9 @@ struct page *dma_alloc_from_pool(struct device *dev, size_t size,
 		bool (*phys_addr_ok)(struct device *, phys_addr_t, size_t));
 bool dma_free_from_pool(struct device *dev, void *start, size_t size);
 
+int dma_direct_set_offset(struct device *dev, phys_addr_t cpu_start,
+		dma_addr_t dma_start, u64 size);
+
 #ifdef CONFIG_ARCH_HAS_DMA_COHERENCE_H
 #include <asm/dma-coherence.h>
 #elif defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \
include/linux/dma-mapping.h +0 -7
index 2aaed35b556df4..2e49996a8f391a 100644
@@ -558,11 +558,4 @@ static inline int dma_mmap_wc(struct device *dev,
 #define dma_unmap_len_set(PTR, LEN_NAME, VAL)    do { } while (0)
 #endif
 
-/*
- * Legacy interface to set up the dma offset map.  Drivers really should not
- * actually use it, but we have a few legacy cases left.
- */
-int dma_direct_set_offset(struct device *dev, phys_addr_t cpu_start,
-		dma_addr_t dma_start, u64 size);
-
 #endif /* _LINUX_DMA_MAPPING_H */
kernel/dma/direct.c +0 -1
index 06c111544f61d6..002268262c9ad8 100644
@@ -547,4 +547,3 @@ int dma_direct_set_offset(struct device *dev, phys_addr_t cpu_start,
 	dev->dma_range_map = map;
 	return 0;
 }
-EXPORT_SYMBOL_GPL(dma_direct_set_offset);
Signature · 1 line
2.28.0
#10 lore raw

Hi Christoph, Chen-Yu, Hans,

Quoted 8 lines · Christoph Hellwig

Thanks,

this looks good to me:

Can you include this patch at the end of your series to that it gets picked up with the other patches?

I guess the easiest to avoid bisection issues would be to merge all this through drm-misc, would that work for you?

Maxime

#11 lore raw
Quoted 7 lines · Maxime Ripard

Hi Christoph, Chen-Yu, Hans,

Quoted 4 lines · Christoph Hellwig

Thanks,

this looks good to me:

Quoted 7 lines
Quoted 4 lines

Can you include this patch at the end of your series to that it gets picked up with the other patches?

I guess the easiest to avoid bisection issues would be to merge all this through drm-misc, would that work for you?

Fine with me!

#12 lore raw
In reply to Maxime Ripard
Quoted 7 lines · Maxime Ripard

Hi Christoph, Chen-Yu, Hans,

Quoted 4 lines · Christoph Hellwig

Thanks,

this looks good to me:

Quoted 7 lines
Quoted 4 lines

Can you include this patch at the end of your series to that it gets picked up with the other patches?

I guess the easiest to avoid bisection issues would be to merge all this through drm-misc, would that work for you?

Is this going to get picked up in drm-misc? I don't see it in linux-next so far.

#13 lore raw

Hi Christoph,

Quoted 10 lines · Christoph Hellwig
Quoted 9 lines · Maxime Ripard

Hi Christoph, Chen-Yu, Hans,

Quoted 6 lines · Christoph Hellwig

Thanks,

this looks good to me:

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Can you include this patch at the end of your series to that it gets picked up with the other patches?

I guess the easiest to avoid bisection issues would be to merge all this through drm-misc, would that work for you?

Is this going to get picked up in drm-misc? I don't see it in linux-next so far.

After some discussion with Arnd and Daniel, this will go through arm-soc, and I sent the PR here:
https://lore.kernel.org/linux-arm-kernel/[email protected]/

It hasn't been merged yet though

Maxime

Acked-by on the v1 series
#14 lore raw
In reply to Maxime Ripard
Quoted 5 lines · Maxime Ripard

Hi,

Here's an attempt to removing the dma_direct_set_offset calls we have in numerous drivers and move all those quirks into a global notifier as suggested by Robin.

For patches 4-7:

It's fine by me if this series is merged via the drm subsystem.

Regards,

Hans

Quoted 26 lines

Let me know what you think,
Maxime

Maxime Ripard (7):
drm/sun4i: backend: Fix probe failure with multiple backends
soc: sunxi: Deal with the MBUS DMA offsets in a central place drm/sun4i: backend: Remove the MBUS quirks
media: sun4i: Remove the MBUS quirks
media: sun6i: Remove the MBUS quirks
media: cedrus: Remove the MBUS quirks
media: sun8i-di: Remove the call to of_dma_configure

 drivers/gpu/drm/sun4i/sun4i_backend.c         |  13 --
 .../platform/sunxi/sun4i-csi/sun4i_csi.c      |  27 ----
 .../platform/sunxi/sun6i-csi/sun6i_csi.c      |  17 ---
 .../media/platform/sunxi/sun8i-di/sun8i-di.c  |   4 -
 drivers/soc/sunxi/Kconfig                     |   8 ++
 drivers/soc/sunxi/Makefile                    |   1 +
 drivers/soc/sunxi/sunxi_mbus.c                | 132 ++++++++++++++++++
 drivers/staging/media/sunxi/cedrus/cedrus.c   |   1 -
 drivers/staging/media/sunxi/cedrus/cedrus.h   |   3 -
 .../staging/media/sunxi/cedrus/cedrus_hw.c    |  18 ---
 10 files changed, 141 insertions(+), 83 deletions(-)
 create mode 100644 drivers/soc/sunxi/sunxi_mbus.c