mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 23:42:43 +00:00
9d878d8422
Signed-off-by: Jan Hoffmann <jan@3e8.eu> [fix warnings, switch to tag tarball, update patches] Signed-off-by: Andre Heider <a.heider@gmail.com>
25 lines
828 B
Diff
25 lines
828 B
Diff
--- 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>
|
|
@@ -97,8 +98,13 @@ IFX_int32_t IFXOS_Phy2VirtMap(
|
|
}
|
|
|
|
/* 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,
|