diff --git a/include/device.h b/include/device.h index c2b8b2577a4..0ca45eb6ef1 100644 --- a/include/device.h +++ b/include/device.h @@ -9,8 +9,6 @@ #define _DEVICE_H_ #include -/* for __deprecated */ -#include /** * @brief Device Driver APIs @@ -30,28 +28,11 @@ extern "C" { #endif -/* XXX the easiest way to trigger a warning on a preprocessor macro - * is to use _Pragma("GCC warning \"...\"), however it's impossible to filter - * those out of -Werror, needed for sanitycheck. So we do this nastiness - * instead. These functions get compiled but don't take up extra space in - * the binary.. - */ -static __deprecated const int _INIT_LEVEL_PRIMARY = 1; -static __deprecated const int _INIT_LEVEL_SECONDARY = 1; -static __deprecated const int _INIT_LEVEL_NANOKERNEL = 1; -static __deprecated const int _INIT_LEVEL_MICROKERNEL = 1; static const int _INIT_LEVEL_PRE_KERNEL_1 = 1; static const int _INIT_LEVEL_PRE_KERNEL_2 = 1; static const int _INIT_LEVEL_POST_KERNEL = 1; static const int _INIT_LEVEL_APPLICATION = 1; -#define _DEPRECATION_CHECK(dev_name, level) \ - static inline void _CONCAT(_deprecation_check_, dev_name)() \ - { \ - int foo = _CONCAT(_INIT_LEVEL_, level); \ - (void)foo; \ - } - /** * @def DEVICE_INIT * @@ -123,7 +104,6 @@ static const int _INIT_LEVEL_APPLICATION = 1; .name = drv_name, .init = (init_fn), \ .config_info = (cfg_info) \ }; \ - _DEPRECATION_CHECK(dev_name, level) \ static struct device _CONCAT(__device_, dev_name) __used \ __attribute__((__section__(".init_" #level STRINGIFY(prio)))) = { \ .config = &_CONCAT(__config_, dev_name), \ @@ -157,7 +137,6 @@ static const int _INIT_LEVEL_APPLICATION = 1; .device_pm_control = (pm_control_fn), \ .config_info = (cfg_info) \ }; \ - _DEPRECATION_CHECK(dev_name, level) \ static struct device _CONCAT(__device_, dev_name) __used \ __attribute__((__section__(".init_" #level STRINGIFY(prio)))) = { \ .config = &_CONCAT(__config_, dev_name), \ diff --git a/include/init.h b/include/init.h index 8eb89c3b3d3..337d1b5f251 100644 --- a/include/init.h +++ b/include/init.h @@ -19,9 +19,6 @@ extern "C" { * System initialization levels. The PRE_KERNEL_1 and PRE_KERNEL_2 levels are * executed in the kernel's initialization context, which uses the interrupt * stack. The remaining levels are executed in the kernel's main task. - * - * PRIMARY, SECONDARY, NANOKERNEL, MICROKERNEL levels are currently deprecated - * and will be removed in the future. */ #define _SYS_INIT_LEVEL_PRE_KERNEL_1 0 @@ -29,12 +26,6 @@ extern "C" { #define _SYS_INIT_LEVEL_POST_KERNEL 2 #define _SYS_INIT_LEVEL_APPLICATION 3 -/* Deprecated, remove eventually */ -#define _SYS_INIT_LEVEL_PRIMARY 4 -#define _SYS_INIT_LEVEL_SECONDARY 5 -#define _SYS_INIT_LEVEL_NANOKERNEL 6 -#define _SYS_INIT_LEVEL_MICROKERNEL 7 - /* Counter use to avoid issues if two or more system devices are declared * in the same C file with the same init function diff --git a/include/linker-defs.h b/include/linker-defs.h index d620dee0d9a..418025fccac 100644 --- a/include/linker-defs.h +++ b/include/linker-defs.h @@ -83,10 +83,6 @@ DEVICE_INIT_LEVEL(PRE_KERNEL_2) \ DEVICE_INIT_LEVEL(POST_KERNEL) \ DEVICE_INIT_LEVEL(APPLICATION) \ - DEVICE_INIT_LEVEL(PRIMARY) \ - DEVICE_INIT_LEVEL(SECONDARY) \ - DEVICE_INIT_LEVEL(NANOKERNEL) \ - DEVICE_INIT_LEVEL(MICROKERNEL) \ __device_init_end = .; \ DEVICE_BUSY_BITFIELD() \ diff --git a/kernel/device.c b/kernel/device.c index b7f3611af3c..bfec736a995 100644 --- a/kernel/device.c +++ b/kernel/device.c @@ -15,13 +15,6 @@ extern struct device __device_PRE_KERNEL_1_start[]; extern struct device __device_PRE_KERNEL_2_start[]; extern struct device __device_POST_KERNEL_start[]; extern struct device __device_APPLICATION_start[]; - -/* Deprecated */ -extern struct device __device_PRIMARY_start[]; -extern struct device __device_SECONDARY_start[]; -extern struct device __device_NANOKERNEL_start[]; -extern struct device __device_MICROKERNEL_start[]; - extern struct device __device_init_end[]; static struct device *config_levels[] = { @@ -29,13 +22,6 @@ static struct device *config_levels[] = { __device_PRE_KERNEL_2_start, __device_POST_KERNEL_start, __device_APPLICATION_start, - - /* Deprecated levels */ - __device_PRIMARY_start, - __device_SECONDARY_start, - __device_NANOKERNEL_start, - __device_MICROKERNEL_start, - /* End marker */ __device_init_end, }; diff --git a/kernel/init.c b/kernel/init.c index e4c4e1e02b1..a3e20c6ce06 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -179,11 +179,6 @@ static void _main(void *unused1, void *unused2, void *unused3) _sys_device_do_config_level(_SYS_INIT_LEVEL_POST_KERNEL); - /* These 3 are deprecated */ - _sys_device_do_config_level(_SYS_INIT_LEVEL_SECONDARY); - _sys_device_do_config_level(_SYS_INIT_LEVEL_NANOKERNEL); - _sys_device_do_config_level(_SYS_INIT_LEVEL_MICROKERNEL); - /* Final init level before app starts */ _sys_device_do_config_level(_SYS_INIT_LEVEL_APPLICATION); @@ -353,9 +348,6 @@ FUNC_NORETURN void _Cstart(void) prepare_multithreading(dummy_thread); - /* Deprecated */ - _sys_device_do_config_level(_SYS_INIT_LEVEL_PRIMARY); - /* perform basic hardware initialization */ _sys_device_do_config_level(_SYS_INIT_LEVEL_PRE_KERNEL_1); _sys_device_do_config_level(_SYS_INIT_LEVEL_PRE_KERNEL_2);