diff options
author | Mathias Kresin <dev@kresin.me> | 2020-12-27 12:26:28 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2021-04-12 23:23:09 +0200 |
commit | 3bad9b0e87213af201208a3964c7d04ccb15b551 (patch) | |
tree | 0ceb731be8a0ccffb4fc5cb5bf3bce97ba41e242 /package/kernel/lantiq/ltq-ifxos | |
parent | e9c8c834de60a9199a41664c06430e74d15f2973 (diff) | |
download | upstream-3bad9b0e87213af201208a3964c7d04ccb15b551.tar.gz upstream-3bad9b0e87213af201208a3964c7d04ccb15b551.tar.bz2 upstream-3bad9b0e87213af201208a3964c7d04ccb15b551.zip |
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: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'package/kernel/lantiq/ltq-ifxos')
-rw-r--r-- | package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch index 80275e6b11..d9bbf8d7cc 100644 --- a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch +++ b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch @@ -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, |