rtc: add driver for internal RTC on kirkwood SoC
Subsystems (3)
PATCH 1/3 rtc: add driver for internal RTC on kirkwood SoC
From: Luuk Paulussen <[email protected]>
Signed-off-by Luuk Paulussen <[email protected]>
Acked-by Chris Packham <[email protected]>
Cc Prafulla Wadaskar <[email protected]>
--- arch/arm/include/asm/arch-kirkwood/kirkwood.h | 2 + drivers/rtc/Makefile | 1 + drivers/rtc/kirkwood.c | 76 +++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 0 deletions(-) create mode 100644 drivers/rtc/kirkwood.c
arch/arm/include/asm/arch-kirkwood/kirkwood.h +2 -0
@@ -50,6 +50,8 @@#define KW_MPP_BASE (KW_REGISTER(0x10000))#define KW_GPIO0_BASE (KW_REGISTER(0x10100))#define KW_GPIO1_BASE (KW_REGISTER(0x10140)) +#define KW_RTC_TIME (KW_REGISTER(0x10300)) +#define KW_RTC_DATE (KW_REGISTER(0x10304))#define KW_NANDF_BASE (KW_REGISTER(0x10418))#define KW_SPI_BASE (KW_REGISTER(0x10600))#define KW_CPU_WIN_BASE (KW_REGISTER(0x20000))
drivers/rtc/Makefile +1 -0
@@ -43,6 +43,7 @@ COBJS-$(CONFIG_RTC_DS174x) += ds174x.o COBJS-$(CONFIG_RTC_DS3231) += ds3231.o COBJS-$(CONFIG_RTC_FTRTC010) += ftrtc010.o COBJS-$(CONFIG_RTC_ISL1208) += isl1208.o +COBJS-$(CONFIG_RTC_KIRKWOOD) += kirkwood.o COBJS-$(CONFIG_RTC_M41T11) += m41t11.o COBJS-$(CONFIG_RTC_M41T60) += m41t60.o COBJS-$(CONFIG_RTC_M41T62) += m41t62.o
drivers/rtc/kirkwood.c new file +76 -0
76 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 2/3 sntp: avoid use of uninitialized variable
From: Luuk Paulussen <[email protected]>
When we use the ntpserverip environment variable argv[1] may not be set. Printing the error message using the NetNtpServerIP variable ensures the correct output in both cases.
Signed-off-by Luuk Paulussen <[email protected]>
Acked-by Chris Packham <[email protected]>
Cc Ben Warren <[email protected]>
--- common/cmd_net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
common/cmd_net.c +1 -1
@@ -324,7 +324,7 @@ int do_sntp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])else NetTimeOffset =simple_strtol (toff,NULL ,10 );if (NetLoop (SNTP ) <0 ) { -printf ("SNTP failed: host %s not responding\n" , argv[1 ]); +printf ("SNTP failed: host %pI4 not responding\n" , &NetNtpServerIP);return 1 ; }
Signature · 1 line
1.7.4.1
PATCH 3/3 bootp: add ntpserver option to bootp request
From: Luuk Paulussen <[email protected]>
Signed-off-by Luuk Paulussen <[email protected]>
Acked-by Chris Packham <[email protected]>
Cc Ben Warren <[email protected]>
--- net/bootp.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
net/bootp.c +13 -0
@@ -228,6 +228,11 @@ static void BootpVendorFieldProcess (u8 * ext) NetOurNISDomain[size] =0 ; }break ; +#if defined(CONFIG_CMD_SNTP ) && defined(CONFIG_BOOTP_NTPSERVER ) +case 42 :/* NTP server IP */ +NetCopyIP (&NetNtpServerIP, (IPaddr_t *) (ext +2 )); +break ; +#endif /* Application layer fields */ case 43 :/* Vendor specific info - Not yet supported */ /*
@@ -278,6 +283,9 @@ static void BootpVendorProcess (u8 * ext, int size)if (NetBootFileSize)debug ("NetBootFileSize: %d\n" , NetBootFileSize); + +if (NetNtpServerIP) +debug ("NetNtpServerIP : %pI4\n" , &NetNtpServerIP); }/* * Handle a BOOTP received packet.
@@ -538,6 +546,11 @@ static int BootpExtended (u8 * e) *e++ =32 ; e +=32 ;#endif +#if defined(CONFIG_BOOTP_NTPSERVER ) + *e++ =42 ; + *e++ =4 ; + e +=4 ; +#endif *e++ =255 ;/* End of the list */
Signature · 1 line
1.7.4.1