mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
powerpc: time-of-day fixes for 32-bit CHRP systems
This makes 32-bit CHRP systems use the RTAS time-of-day routines if available. It fixes a bug in the RTAS time-of-day routines where they were storing a 64-bit timebase value in an unsigned long by making those variables u64. Also, the direct-access time-of-day routines had the wrong convention for the month and year in the struct rtc_time. Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
6146eed1e9
commit
49e16b7bec
3 changed files with 14 additions and 6 deletions
|
@ -15,7 +15,7 @@ unsigned long __init rtas_get_boot_time(void)
|
|||
{
|
||||
int ret[8];
|
||||
int error, wait_time;
|
||||
unsigned long max_wait_tb;
|
||||
u64 max_wait_tb;
|
||||
|
||||
max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
|
||||
do {
|
||||
|
@ -45,7 +45,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm)
|
|||
{
|
||||
int ret[8];
|
||||
int error, wait_time;
|
||||
unsigned long max_wait_tb;
|
||||
u64 max_wait_tb;
|
||||
|
||||
max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
|
||||
do {
|
||||
|
@ -80,7 +80,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm)
|
|||
int rtas_set_rtc_time(struct rtc_time *tm)
|
||||
{
|
||||
int error, wait_time;
|
||||
unsigned long max_wait_tb;
|
||||
u64 max_wait_tb;
|
||||
|
||||
max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT;
|
||||
do {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue