Skip to content
Snippets Groups Projects
Commit 3bad9b0e authored by Mathias Kresin's avatar Mathias Kresin
Browse files

lantiq: ltq-ifxos: add kernel 5.10 compatiblity


ioremap has provided non-cached semantics by default since the Linux 2.6
days and was removed with kernel version 5.6.

Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
parent e9c8c834
No related branches found
No related tags found
No related merge requests found
......@@ -132,7 +132,7 @@
if ( check_mem_region(physicalAddr, addrRangeSize_byte) )
{
IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
@@ -98,6 +100,16 @@ IFX_int32_t IFXOS_Phy2VirtMap(
@@ -98,10 +100,25 @@ IFX_int32_t IFXOS_Phy2VirtMap(
/* can't fail */
request_mem_region(physicalAddr, addrRangeSize_byte, pName);
......@@ -148,4 +148,13 @@
+#endif
/* remap memory (not cache able): physical --> virtual */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
pVirtAddr = (IFX_uint8_t *)ioremap_nocache( physicalAddr,
addrRangeSize_byte );
+#else
+ pVirtAddr = (IFX_uint8_t *)ioremap(physicalAddr, addrRangeSize_byte);
+#endif
+
if (pVirtAddr == IFX_NULL)
{
IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment