From 77f0bed326b658fcb57f278bd5228afbe382401a Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Wed, 25 Jun 2025 15:19:18 +0200 Subject: net: extract function net_sntp_set_rtc() from sntp_handler() Extract the code that sets the RTC clock from sntp_handler() in net/sntp.c and make it a new function net_sntp_set_rtc() in net/net-common.c. This will allow re-use with NET_LWIP. According to [1] it is safe to assume that all devices have been converted to DM_RTC so drop the useless code. [1] https://lists.denx.de/pipermail/u-boot/2025-June/591376.html Signed-off-by: Jerome Forissier --- include/net-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/net-common.h b/include/net-common.h index c04f86bdfcc..d4512c3a4d1 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -574,4 +574,6 @@ extern struct wget_http_info default_wget_info; extern struct wget_http_info *wget_info; int wget_request(ulong dst_addr, char *uri, struct wget_http_info *info); +void net_sntp_set_rtc(u32 seconds); + #endif /* __NET_COMMON_H__ */ -- cgit v1.3.1