Create include/linux/timer.h and include/linux/workqueue.h with stub definitions for kernel timer and workqueue support. U-Boot doesn't use these subsystems. timer.h: - struct timer_list - setup_timer(), del_timer(), del_timer_sync() - timer_setup(), mod_timer(), timer_pending() workqueue.h: - struct work_struct, struct delayed_work - INIT_WORK(), schedule_work() - queue_work(), cancel_work_sync() - alloc_workqueue(), destroy_workqueue() Update compat.h to include these headers and remove duplicate definitions. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
31 lines
876 B
C
31 lines
876 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Stub definitions for Linux kernel timer support.
|
|
* U-Boot doesn't use kernel timers.
|
|
*/
|
|
#ifndef _LINUX_TIMER_H
|
|
#define _LINUX_TIMER_H
|
|
|
|
struct timer_list {
|
|
unsigned long expires;
|
|
void (*function)(struct timer_list *);
|
|
unsigned long data;
|
|
};
|
|
|
|
#define DEFINE_TIMER(name, func) \
|
|
struct timer_list name = { .function = func }
|
|
|
|
#define setup_timer(timer, func, data) do { } while (0)
|
|
#define timer_setup(timer, func, flags) do { } while (0)
|
|
#define init_timer(timer) do { } while (0)
|
|
#define add_timer(timer) do { } while (0)
|
|
#define del_timer(timer) 0
|
|
#define del_timer_sync(timer) do { } while (0)
|
|
#define mod_timer(timer, expires) 0
|
|
#define timer_pending(timer) 0
|
|
|
|
#define from_timer(var, callback_timer, timer_fieldname) \
|
|
container_of(callback_timer, typeof(*var), timer_fieldname)
|
|
|
|
#endif /* _LINUX_TIMER_H */
|