aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2020-03-04 00:39:59 +0100
committerMathias Kresin <dev@kresin.me>2020-03-16 22:28:16 +0100
commita6698551e5bc4b2f049b3303a664ae67d6a0494e (patch)
treea04f7e740d17959b80465e24d5a83f2e3e79d85a /package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
parenta3539c82cb38366151019438ea841e8ae47cb1c2 (diff)
downloadupstream-a6698551e5bc4b2f049b3303a664ae67d6a0494e.tar.gz
upstream-a6698551e5bc4b2f049b3303a664ae67d6a0494e.tar.bz2
upstream-a6698551e5bc4b2f049b3303a664ae67d6a0494e.zip
ltq-adsl: fix compilation with Linux 5.0+
Upstream commit e4b92b108c6cd6 ("timekeeping: remove obsolete time accessors") removed do_gettimeofday(). In Linux 4.19 this was only a wrapper around ktime_get_real_ts64(). Use ktime_get_real_ts64() now that the wrapper is gone to fix compilation against Linux 5.4. Move the ifxmips_mei_interface header to the include directory, it can't be found otherwise during compilation. The reason for the changed behaviour is not yet clear, however having header files in an include directory is more straight forward. To use the of_device_id struct, the mod_devicetable header need to be included. Instead of including this header, include the of_platform header, which includes the mod_devicetable on its own. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch')
-rw-r--r--package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch27
1 files changed, 24 insertions, 3 deletions
diff --git a/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch b/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
index 431ccb6ebc..1e860010e9 100644
--- a/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
+++ b/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
@@ -82,7 +82,28 @@
if ( (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API) ||
(_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_G997) ||
(_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_PM) ||
-@@ -1058,6 +1065,7 @@ static void DSL_DRV_DebugInit(void)
+@@ -828,12 +835,19 @@ DSL_int32_t DSL_DRV_ThreadShutdown(
+
+ DSL_uint32_t DSL_DRV_SysTimeGet(DSL_uint32_t nOffset)
+ {
+- struct timeval tv;
+ DSL_uint32_t nTime = 0;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0))
++ struct timeval tv;
+
+ memset(&tv, 0, sizeof(tv));
+ do_gettimeofday(&tv);
+ nTime = (DSL_uint32_t)tv.tv_sec;
++#else
++ struct timespec64 now;
++
++ ktime_get_real_ts64(&now);
++ nTime = (DSL_uint32_t)now.tv_sec;
++#endif
+
+ if ( (nOffset == 0) || (nOffset > nTime) )
+ {
+@@ -1058,6 +1072,7 @@ static void DSL_DRV_DebugInit(void)
/* Entry point of driver */
int __init DSL_ModuleInit(void)
{
@@ -90,7 +111,7 @@
DSL_int_t i;
printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
-@@ -1104,7 +1112,8 @@ int __init DSL_ModuleInit(void)
+@@ -1104,7 +1119,8 @@ int __init DSL_ModuleInit(void)
}
DSL_DRV_DevNodeInit();
@@ -137,7 +158,7 @@
#ifdef INCLUDE_DSL_CPE_API_IFXOS_SUPPORT
/** IFXOS includes*/
--- /dev/null
-+++ b/src/ifxmips_mei_interface.h
++++ b/src/include/ifxmips_mei_interface.h
@@ -0,0 +1,702 @@
+/******************************************************************************
+