Add fix for intel_lpss on Pro 7 and Laptop 3

On the Pro 7 and Laptop 3, intel_lpss_pci fails to probe and thus keeps
the system from booting. Add a patch to fix this.

Note: The added patch is on it's way upstream.
See: https://lkml.org/lkml/2019/10/16/1230
This commit is contained in:
Maximilian Luz 2019-11-03 01:04:48 +01:00
parent eb80db2cb1
commit 2d34af8e14
No known key found for this signature in database
GPG key ID: 70EC0937F6C26F02
23 changed files with 3372 additions and 11422 deletions

View file

@ -1,7 +1,7 @@
From 789b866d520178ff70caef9ad977290305cd27db Mon Sep 17 00:00:00 2001
From 41b0cd789d6e3dac7250dcb6b8317f061b297b98 Mon Sep 17 00:00:00 2001
From: qzed <qzed@users.noreply.github.com>
Date: Mon, 26 Aug 2019 01:15:40 +0200
Subject: [PATCH 01/12] surface-acpi
Subject: [PATCH 01/13] surface-acpi
---
drivers/acpi/acpica/dsopcode.c | 2 +-

View file

@ -1,7 +1,7 @@
From f784868ed2318515d368e4c994eb99ea2ca73886 Mon Sep 17 00:00:00 2001
From 9094dbe6e6366c5f798f8aec2d27adaa85aed98d Mon Sep 17 00:00:00 2001
From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com>
Date: Sat, 28 Sep 2019 17:48:21 +0200
Subject: [PATCH 02/12] suspend
Subject: [PATCH 02/13] suspend
---
drivers/nvme/host/core.c | 36 ++++++++++++--
@ -14,10 +14,10 @@ Subject: [PATCH 02/12] suspend
7 files changed, 182 insertions(+), 6 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index ae0b01059fc6..d3bcfead964e 100644
index 5d0f99bcc987..e2440dcda5a7 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1028,15 +1028,15 @@ static struct nvme_id_ns *nvme_identify_ns(struct nvme_ctrl *ctrl,
@@ -1031,15 +1031,15 @@ static struct nvme_id_ns *nvme_identify_ns(struct nvme_ctrl *ctrl,
return id;
}
@ -36,7 +36,7 @@ index ae0b01059fc6..d3bcfead964e 100644
c.features.fid = cpu_to_le32(fid);
c.features.dword11 = cpu_to_le32(dword11);
@@ -1047,6 +1047,24 @@ static int nvme_set_features(struct nvme_ctrl *dev, unsigned fid, unsigned dword
@@ -1050,6 +1050,24 @@ static int nvme_set_features(struct nvme_ctrl *dev, unsigned fid, unsigned dword
return ret;
}
@ -61,7 +61,7 @@ index ae0b01059fc6..d3bcfead964e 100644
int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count)
{
u32 q_count = (*count - 1) | ((*count - 1) << 16);
@@ -3562,6 +3580,18 @@ static void nvme_free_ctrl(struct device *dev)
@@ -3565,6 +3583,18 @@ static void nvme_free_ctrl(struct device *dev)
nvme_put_subsystem(subsys);
}

View file

@ -1,7 +1,7 @@
From 6eb9078484ae4d59a705fc4eabb54d5b60bd5109 Mon Sep 17 00:00:00 2001
From 3f6bc0b07311a0abc7054ce9687a892f0f47cc9f Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 27 Jul 2019 17:51:37 +0200
Subject: [PATCH 03/12] buttons
Subject: [PATCH 03/13] buttons
---
drivers/input/misc/Kconfig | 6 +-

View file

@ -1,7 +1,7 @@
From d3e2d5cde68c18fdebe77456c9e360d17af8f225 Mon Sep 17 00:00:00 2001
From 50327b89bfa86878def2dd012b8cf048fc83931d Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 17:53:54 +0200
Subject: [PATCH 04/12] cameras
Subject: [PATCH 04/13] cameras
---
drivers/media/usb/uvc/uvc_driver.c | 40 +

View file

@ -1,7 +1,7 @@
From 1174178edc84d79e1f361bf7917e81d92b0a1f1b Mon Sep 17 00:00:00 2001
From 0d1fe45af8a7164631859bb72b9d64d5573655f6 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 17:58:17 +0200
Subject: [PATCH 05/12] ipts
Subject: [PATCH 05/13] ipts
---
drivers/gpu/drm/i915/Makefile | 3 +

View file

@ -1,7 +1,7 @@
From 5ebbd99f31ba145796039bfeaf672d219aeeaf85 Mon Sep 17 00:00:00 2001
From 8ec84be9b4e5f067535064840148a367da4368e7 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 17:58:43 +0200
Subject: [PATCH 06/12] hid
Subject: [PATCH 06/13] hid
---
drivers/hid/hid-ids.h | 21 +++++++++----

View file

@ -1,7 +1,7 @@
From 7c09061a90a28a9fe2df8e5dc3b9fa8390b40548 Mon Sep 17 00:00:00 2001
From eb1ef50f9b1169e3395fbccbdf485aa0e96f19dd Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 17:59:13 +0200
Subject: [PATCH 07/12] sdcard-reader
Subject: [PATCH 07/13] sdcard-reader
---
drivers/usb/core/hub.c | 3 ++-

View file

@ -1,7 +1,7 @@
From 428a110a8e7d8ca6dbf4d916ea4f861747c8f285 Mon Sep 17 00:00:00 2001
From 0a2de38ea83fbd209e6c82d092c8e22d29800021 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 18:00:19 +0200
Subject: [PATCH 08/12] wifi
Subject: [PATCH 08/13] wifi
---
drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 3 +--

View file

@ -1,7 +1,7 @@
From 85edee56032573eafc1f58fe612e629b8df694b3 Mon Sep 17 00:00:00 2001
From 3facbb0d108df3fbcb899212266e5b1575afed0a Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 18:00:43 +0200
Subject: [PATCH 09/12] surface3-power
Subject: [PATCH 09/13] surface3-power
---
drivers/platform/x86/Kconfig | 7 +

View file

@ -1,7 +1,7 @@
From 34bb8ff418427f44896891eab0d8739335491118 Mon Sep 17 00:00:00 2001
From eb650424864378294c44c2668a307d857522b152 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 18:01:27 +0200
Subject: [PATCH 10/12] mwlwifi
Subject: [PATCH 10/13] mwlwifi
---
drivers/net/wireless/marvell/Kconfig | 1 +

View file

@ -1,7 +1,7 @@
From 2b33096313db62f3c76924c2d4b3f50f93a6cbf9 Mon Sep 17 00:00:00 2001
From b71560d7b8d83a8dc376543178cd952f0b701016 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 18:02:03 +0200
Subject: [PATCH 11/12] surface-lte
Subject: [PATCH 11/13] surface-lte
---
drivers/usb/serial/qcserial.c | 1 +

View file

@ -1,7 +1,7 @@
From 06b632658527c60bd254622fc812d5abd4019315 Mon Sep 17 00:00:00 2001
From b34930afa4861a0a639603685238d3d16d32fa4c Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 18:02:33 +0200
Subject: [PATCH 12/12] surfacebook2-dgpu
Subject: [PATCH 12/13] surfacebook2-dgpu
---
drivers/platform/x86/Kconfig | 9 +

View file

@ -0,0 +1,110 @@
From 47c5b0a738f431a2aa27116acd233afe41bfe0dd Mon Sep 17 00:00:00 2001
From: Tuowen Zhao <ztuowen@gmail.com>
Date: Wed, 16 Oct 2019 15:06:27 -0600
Subject: [PATCH 13/13] ioremap_uc
---
Documentation/driver-model/devres.txt | 1 +
arch/sparc/include/asm/io_64.h | 1 +
drivers/mfd/intel-lpss.c | 2 +-
include/linux/io.h | 2 ++
lib/devres.c | 19 +++++++++++++++++++
5 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index 43681ca0837f..7b1ee4190208 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -294,6 +294,7 @@ IOMAP
devm_ioport_unmap()
devm_ioremap()
devm_ioremap_nocache()
+ devm_ioremap_uc()
devm_ioremap_wc()
devm_ioremap_resource() : checks resource, requests memory region, ioremaps
devm_iounmap()
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h
index b162c23ae8c2..7a836d21ff0c 100644
--- a/arch/sparc/include/asm/io_64.h
+++ b/arch/sparc/include/asm/io_64.h
@@ -409,6 +409,7 @@ static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
}
#define ioremap_nocache(X,Y) ioremap((X),(Y))
+#define ioremap_uc(X,Y) ioremap((X),(Y))
#define ioremap_wc(X,Y) ioremap((X),(Y))
#define ioremap_wt(X,Y) ioremap((X),(Y))
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
index ff3fba16e735..37a5bb09d228 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -397,7 +397,7 @@ int intel_lpss_probe(struct device *dev,
if (!lpss)
return -ENOMEM;
- lpss->priv = devm_ioremap(dev, info->mem->start + LPSS_PRIV_OFFSET,
+ lpss->priv = devm_ioremap_uc(dev, info->mem->start + LPSS_PRIV_OFFSET,
LPSS_PRIV_SIZE);
if (!lpss->priv)
return -ENOMEM;
diff --git a/include/linux/io.h b/include/linux/io.h
index 32e30e8fb9db..da39ff89df65 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -75,6 +75,8 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
resource_size_t size);
+void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset,
+ resource_size_t size);
void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
resource_size_t size);
void __iomem *devm_ioremap_wc(struct device *dev, resource_size_t offset,
diff --git a/lib/devres.c b/lib/devres.c
index faccf1a037d0..97c56f9893a4 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -9,6 +9,7 @@
enum devm_ioremap_type {
DEVM_IOREMAP = 0,
DEVM_IOREMAP_NC,
+ DEVM_IOREMAP_UC,
DEVM_IOREMAP_WC,
};
@@ -39,6 +40,9 @@ static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset,
case DEVM_IOREMAP_NC:
addr = ioremap_nocache(offset, size);
break;
+ case DEVM_IOREMAP_UC:
+ addr = ioremap_uc(offset, size);
+ break;
case DEVM_IOREMAP_WC:
addr = ioremap_wc(offset, size);
break;
@@ -68,6 +72,21 @@ void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
}
EXPORT_SYMBOL(devm_ioremap);
+/**
+ * devm_ioremap_uc - Managed ioremap_uc()
+ * @dev: Generic device to remap IO address for
+ * @offset: Resource address to map
+ * @size: Size of map
+ *
+ * Managed ioremap_uc(). Map is automatically unmapped on driver detach.
+ */
+void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset,
+ resource_size_t size)
+{
+ return __devm_ioremap(dev, offset, size, DEVM_IOREMAP_UC);
+}
+EXPORT_SYMBOL_GPL(devm_ioremap_uc);
+
/**
* devm_ioremap_nocache - Managed ioremap_nocache()
* @dev: Generic device to remap IO address for
--
2.23.0

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
From f3c8c1722e729e2b8ef4c1cb261fa21fecf13f5d Mon Sep 17 00:00:00 2001
From 013f7e7dd213b36bbfbf75470c98cf9a6544d11b Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 27 Jul 2019 17:51:37 +0200
Subject: [PATCH 2/9] buttons
Subject: [PATCH 02/10] buttons
---
drivers/input/misc/Kconfig | 6 +-

View file

@ -1,7 +1,7 @@
From 887b26209eea40ed443ad7f1989f0e009f8928dd Mon Sep 17 00:00:00 2001
From 8ad1793370997d7323afa63817d77772aa5a8028 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Tue, 2 Jul 2019 22:17:46 +0200
Subject: [PATCH 3/9] surfacebook2-dgpu
Subject: [PATCH 03/10] surfacebook2-dgpu
---
drivers/platform/x86/Kconfig | 9 +
@ -11,7 +11,7 @@ Subject: [PATCH 3/9] surfacebook2-dgpu
create mode 100644 drivers/platform/x86/surfacebook2_dgpu_hps.c
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 0c1fc3655b5c..c8abd3d70461 100644
index 9dea69a1526a..0c8971f1774e 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -481,6 +481,15 @@ config SURFACE3_WMI
@ -31,10 +31,10 @@ index 0c1fc3655b5c..c8abd3d70461 100644
tristate "ThinkPad ACPI Laptop Extras"
depends on ACPI
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 662e595ae13f..c33d76577b5a 100644
index 18f5a4ba7244..725dedf5fbfe 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -49,6 +49,7 @@ obj-$(CONFIG_ACPI_WMI) += wmi.o
@@ -48,6 +48,7 @@ obj-$(CONFIG_ACPI_WMI) += wmi.o
obj-$(CONFIG_MSI_WMI) += msi-wmi.o
obj-$(CONFIG_PEAQ_WMI) += peaq-wmi.o
obj-$(CONFIG_SURFACE3_WMI) += surface3-wmi.o

View file

@ -1,7 +1,7 @@
From 487a63fd1eb7055ae79248e60d9688cb81c0f30c Mon Sep 17 00:00:00 2001
From 1341a85abda5b8b534818da51ec9d63e0dd3502c Mon Sep 17 00:00:00 2001
From: qzed <qzed@users.noreply.github.com>
Date: Tue, 17 Sep 2019 17:16:23 +0200
Subject: [PATCH 4/9] hid
Subject: [PATCH 04/10] hid
---
drivers/hid/hid-ids.h | 21 +++++++++----

View file

@ -1,7 +1,7 @@
From 4f79244298b003c92cd9590b767769d5b84b1ee1 Mon Sep 17 00:00:00 2001
From d11dce0069b2578b839ce598c88aec37077812bf Mon Sep 17 00:00:00 2001
From: qzed <qzed@users.noreply.github.com>
Date: Tue, 17 Sep 2019 17:17:56 +0200
Subject: [PATCH 5/9] surface3-power
Subject: [PATCH 05/10] surface3-power
---
drivers/platform/x86/Kconfig | 7 +
@ -11,10 +11,10 @@ Subject: [PATCH 5/9] surface3-power
create mode 100644 drivers/platform/x86/surface3_power.c
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index c8abd3d70461..c381d14dea20 100644
index 0c8971f1774e..c3d68aeec587 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -1315,6 +1315,13 @@ config SURFACE_3_BUTTON
@@ -1218,6 +1218,13 @@ config SURFACE_3_BUTTON
---help---
This driver handles the power/home/volume buttons on the Microsoft Surface 3 tablet.
@ -29,10 +29,10 @@ index c8abd3d70461..c381d14dea20 100644
tristate "Intel P-Unit IPC Driver"
---help---
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index c33d76577b5a..5c88172c0649 100644
index 725dedf5fbfe..705525ff99a7 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -87,6 +87,7 @@ obj-$(CONFIG_INTEL_PMC_IPC) += intel_pmc_ipc.o
@@ -86,6 +86,7 @@ obj-$(CONFIG_INTEL_PMC_IPC) += intel_pmc_ipc.o
obj-$(CONFIG_TOUCHSCREEN_DMI) += touchscreen_dmi.o
obj-$(CONFIG_SURFACE_PRO3_BUTTON) += surfacepro3_button.o
obj-$(CONFIG_SURFACE_3_BUTTON) += surface3_button.o

View file

@ -1,7 +1,7 @@
From e260eacab655d64cf9c1489dc37f89c410aa58a0 Mon Sep 17 00:00:00 2001
From 355e4cd95663638d5116d8c9c31b24cb102787eb Mon Sep 17 00:00:00 2001
From: qzed <qzed@users.noreply.github.com>
Date: Tue, 17 Sep 2019 17:21:43 +0200
Subject: [PATCH 6/9] surface-lte
Subject: [PATCH 06/10] surface-lte
---
drivers/usb/serial/qcserial.c | 1 +

View file

@ -1,7 +1,7 @@
From 2a01efb959a43a387dab97223bcccfe6be4e582f Mon Sep 17 00:00:00 2001
From 99e0d8914f8dd73d2081690a11cf1de4588b5f41 Mon Sep 17 00:00:00 2001
From: qzed <qzed@users.noreply.github.com>
Date: Wed, 18 Sep 2019 03:18:25 +0200
Subject: [PATCH 7/9] wifi
Subject: [PATCH 07/10] wifi
---
drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 3 +--

View file

@ -1,7 +1,7 @@
From cc0158b2e542fcb3c9f1102227e4b35316c25040 Mon Sep 17 00:00:00 2001
From f4e0a9417b0d2cf6c27efb3e8fc72138515c665e Mon Sep 17 00:00:00 2001
From: Dorian Stoll <dorian.stoll@tmsp.io>
Date: Mon, 16 Sep 2019 04:10:51 +0200
Subject: [PATCH 8/9] legacy-i915
Subject: [PATCH 08/10] legacy-i915
---
drivers/gpu/drm/Kconfig | 2 +-

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,110 @@
From b491181a782679a4b5ebfcf3e4101bb2eddaccd3 Mon Sep 17 00:00:00 2001
From: Tuowen Zhao <ztuowen@gmail.com>
Date: Wed, 16 Oct 2019 15:06:27 -0600
Subject: [PATCH 10/10] ioremap_uc
---
.../driver-api/driver-model/devres.rst | 1 +
arch/sparc/include/asm/io_64.h | 1 +
drivers/mfd/intel-lpss.c | 2 +-
include/linux/io.h | 2 ++
lib/devres.c | 19 +++++++++++++++++++
5 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
index a100bef54952..92628fdc2f11 100644
--- a/Documentation/driver-api/driver-model/devres.rst
+++ b/Documentation/driver-api/driver-model/devres.rst
@@ -314,6 +314,7 @@ IOMAP
devm_ioport_unmap()
devm_ioremap()
devm_ioremap_nocache()
+ devm_ioremap_uc()
devm_ioremap_wc()
devm_ioremap_resource() : checks resource, requests memory region, ioremaps
devm_iounmap()
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h
index 688911051b44..f4afa301954a 100644
--- a/arch/sparc/include/asm/io_64.h
+++ b/arch/sparc/include/asm/io_64.h
@@ -407,6 +407,7 @@ static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
}
#define ioremap_nocache(X,Y) ioremap((X),(Y))
+#define ioremap_uc(X,Y) ioremap((X),(Y))
#define ioremap_wc(X,Y) ioremap((X),(Y))
#define ioremap_wt(X,Y) ioremap((X),(Y))
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
index 277f48f1cc1c..06106c9320bb 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -395,7 +395,7 @@ int intel_lpss_probe(struct device *dev,
if (!lpss)
return -ENOMEM;
- lpss->priv = devm_ioremap(dev, info->mem->start + LPSS_PRIV_OFFSET,
+ lpss->priv = devm_ioremap_uc(dev, info->mem->start + LPSS_PRIV_OFFSET,
LPSS_PRIV_SIZE);
if (!lpss->priv)
return -ENOMEM;
diff --git a/include/linux/io.h b/include/linux/io.h
index accac822336a..a59834bc0a11 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -64,6 +64,8 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
resource_size_t size);
+void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset,
+ resource_size_t size);
void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
resource_size_t size);
void __iomem *devm_ioremap_wc(struct device *dev, resource_size_t offset,
diff --git a/lib/devres.c b/lib/devres.c
index 6a0e9bd6524a..17624d35e82d 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -9,6 +9,7 @@
enum devm_ioremap_type {
DEVM_IOREMAP = 0,
DEVM_IOREMAP_NC,
+ DEVM_IOREMAP_UC,
DEVM_IOREMAP_WC,
};
@@ -39,6 +40,9 @@ static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset,
case DEVM_IOREMAP_NC:
addr = ioremap_nocache(offset, size);
break;
+ case DEVM_IOREMAP_UC:
+ addr = ioremap_uc(offset, size);
+ break;
case DEVM_IOREMAP_WC:
addr = ioremap_wc(offset, size);
break;
@@ -68,6 +72,21 @@ void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
}
EXPORT_SYMBOL(devm_ioremap);
+/**
+ * devm_ioremap_uc - Managed ioremap_uc()
+ * @dev: Generic device to remap IO address for
+ * @offset: Resource address to map
+ * @size: Size of map
+ *
+ * Managed ioremap_uc(). Map is automatically unmapped on driver detach.
+ */
+void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset,
+ resource_size_t size)
+{
+ return __devm_ioremap(dev, offset, size, DEVM_IOREMAP_UC);
+}
+EXPORT_SYMBOL_GPL(devm_ioremap_uc);
+
/**
* devm_ioremap_nocache - Managed ioremap_nocache()
* @dev: Generic device to remap IO address for
--
2.23.0