2015-07-07 13:43:54 +00:00
|
|
|
--- a/src/linux/ifxos_linux_memory_map_drv.c
|
|
|
|
+++ b/src/linux/ifxos_linux_memory_map_drv.c
|
|
|
|
@@ -25,6 +25,7 @@
|
|
|
|
IFX Linux adaptation - Global Includes - Kernel
|
|
|
|
========================================================================= */
|
|
|
|
|
|
|
|
+#include <linux/version.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#ifdef MODULE
|
|
|
|
#include <linux/module.h>
|
2021-10-28 16:56:13 +00:00
|
|
|
@@ -97,8 +98,13 @@ IFX_int32_t IFXOS_Phy2VirtMap(
|
|
|
|
}
|
2015-07-07 13:43:54 +00:00
|
|
|
|
|
|
|
/* remap memory (not cache able): physical --> virtual */
|
2020-12-27 11:26:28 +00:00
|
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
2015-07-07 13:43:54 +00:00
|
|
|
pVirtAddr = (IFX_uint8_t *)ioremap_nocache( physicalAddr,
|
2020-12-27 11:26:28 +00:00
|
|
|
addrRangeSize_byte );
|
|
|
|
+#else
|
|
|
|
+ pVirtAddr = (IFX_uint8_t *)ioremap(physicalAddr, addrRangeSize_byte);
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
if (pVirtAddr == IFX_NULL)
|
|
|
|
{
|
2021-10-28 16:56:13 +00:00
|
|
|
IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
|