aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
authorPraneeth Bajjuri <praneeth@ti.com>2021-04-22 12:37:22 +0000
committerPraneeth Bajjuri <praneeth@ti.com>2021-05-04 23:19:24 -0500
commitc5bffc721742ebb5b95eff6a79efca15b7d52c8a (patch)
treeae4eceefdd9aa60baeee59b36bcc7f0e78c2958a /recipes-bsp
parent78b8829d428e151c039ab74c4b0442a76a26c5c9 (diff)
downloadmeta-ti-c5bffc721742ebb5b95eff6a79efca15b7d52c8a.tar.gz
meta-ti-c5bffc721742ebb5b95eff6a79efca15b7d52c8a.tar.bz2
meta-ti-c5bffc721742ebb5b95eff6a79efca15b7d52c8a.zip
uio-module-drv: Build fix for linux kernel 5.10
This update contains build fix for linux kernel 5.10 * uio-module-drv: Replace ioremap_nocache with ioremap Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> Reviewed-by: Gowtham Tammana <g-tammana@ti.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/uio-module-drv/uio-module-drv/0001-uio-module-drv-Replace-ioremap_nocache-with-ioremap.patch35
-rw-r--r--recipes-bsp/uio-module-drv/uio-module-drv_git.bb4
2 files changed, 39 insertions, 0 deletions
diff --git a/recipes-bsp/uio-module-drv/uio-module-drv/0001-uio-module-drv-Replace-ioremap_nocache-with-ioremap.patch b/recipes-bsp/uio-module-drv/uio-module-drv/0001-uio-module-drv-Replace-ioremap_nocache-with-ioremap.patch
new file mode 100644
index 000000000..955ef5586
--- /dev/null
+++ b/recipes-bsp/uio-module-drv/uio-module-drv/0001-uio-module-drv-Replace-ioremap_nocache-with-ioremap.patch
@@ -0,0 +1,35 @@
+From b5c4036dac06817bffd0be21c5fa1b7f75f74e4b Mon Sep 17 00:00:00 2001
+From: Suman Anna <s-anna@ti.com>
+Date: Mon, 19 Apr 2021 13:15:51 -0500
+Subject: [PATCH] uio-module-drv: Replace ioremap_nocache with ioremap
+
+The ioremap_nocache is the same as the regular ioremap and its
+definition has been dropped from the Linux kernel v5.6 onwards in
+commit 4bdc0d676a64 ("remove ioremap_nocache and devm_ioremap_nocache")
+[1]. The uio-module-drv module fails to build against these newer
+kernels, so fix it by simply replacing ioremap_nocache with ioremap.
+
+[1]
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4bdc0d676a643140bdf17dbf7eafedee3d496a3c
+
+Signed-off-by: Suman Anna <s-anna@ti.com>
+---
+ uio_module_drv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/uio_module_drv.c b/uio_module_drv.c
+index 5a67dd199e21..7cc6005d1f05 100644
+--- a/uio_module_drv.c
++++ b/uio_module_drv.c
+@@ -240,7 +240,7 @@ static ssize_t uio_module_drv_transfer(struct file *file, char __user *buf,
+ return -EINVAL;
+ }
+
+- virt_addr_p = ioremap_nocache(phys_addr, count);
++ virt_addr_p = ioremap(phys_addr, count);
+ if (!virt_addr_p) {
+ dev_err(uio_module_drv->dev, "Mapping of virtual memory failed\n");
+ return(-ENOMEM);
+--
+2.30.1
+
diff --git a/recipes-bsp/uio-module-drv/uio-module-drv_git.bb b/recipes-bsp/uio-module-drv/uio-module-drv_git.bb
index 6ac918752..cb61305f7 100644
--- a/recipes-bsp/uio-module-drv/uio-module-drv_git.bb
+++ b/recipes-bsp/uio-module-drv/uio-module-drv_git.bb
@@ -2,6 +2,10 @@ DESCRIPTION = "User space IO (UIO) driver for on-chip modules"
include uio-module-drv.inc
+FILESEXTRAPATHS_prepend:= "${THISDIR}/${PN}:"
+
+SRC_URI += "file://0001-uio-module-drv-Replace-ioremap_nocache-with-ioremap.patch"
+
# This package builds a kernel module, use kernel PR as base and append a local
MACHINE_KERNEL_PR_append = "d"
PR = "${MACHINE_KERNEL_PR}"