* [PATCH] rtc: cmos: Revert "rtc: Fix the AltCentury value on AMD/Hygon platform"
@ 2020-01-04 4:31 Alexandre Belloni
2020-01-06 11:44 ` Jinke Fan
0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Belloni @ 2020-01-04 4:31 UTC (permalink / raw)
To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni, Jinke Fan
There are multiple reports of this patch breaking RTC time setting for AMD
platforms.
This reverts commit 7ad295d5196a58c22abecef62dd4f99e2f86e831.
Cc: Jinke Fan <fanjinke@hygon.cn>
Link: https://lore.kernel.org/r/CABXGCsMLob0DC25JS8wwAYydnDoHBSoMh2_YLPfqm3TTvDE-Zw@mail.gmail.com
Fixes: 7ad295d5196a ("rtc: Fix the AltCentury value on AMD/Hygon platform")
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-mc146818-lib.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/rtc/rtc-mc146818-lib.c b/drivers/rtc/rtc-mc146818-lib.c
index df2829dd55ad..2ecd8752b088 100644
--- a/drivers/rtc/rtc-mc146818-lib.c
+++ b/drivers/rtc/rtc-mc146818-lib.c
@@ -172,20 +172,7 @@ int mc146818_set_time(struct rtc_time *time)
save_control = CMOS_READ(RTC_CONTROL);
CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
save_freq_select = CMOS_READ(RTC_FREQ_SELECT);
-
-#ifdef CONFIG_X86
- if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
- boot_cpu_data.x86 == 0x17) ||
- boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) {
- CMOS_WRITE((save_freq_select & (~RTC_DIV_RESET2)),
- RTC_FREQ_SELECT);
- save_freq_select &= ~RTC_DIV_RESET2;
- } else
- CMOS_WRITE((save_freq_select | RTC_DIV_RESET2),
- RTC_FREQ_SELECT);
-#else
- CMOS_WRITE((save_freq_select | RTC_DIV_RESET2), RTC_FREQ_SELECT);
-#endif
+ CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
#ifdef CONFIG_MACH_DECSTATION
CMOS_WRITE(real_yrs, RTC_DEC_YEAR);
--
2.24.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: cmos: Revert "rtc: Fix the AltCentury value on AMD/Hygon platform"
2020-01-04 4:31 [PATCH] rtc: cmos: Revert "rtc: Fix the AltCentury value on AMD/Hygon platform" Alexandre Belloni
@ 2020-01-06 11:44 ` Jinke Fan
0 siblings, 0 replies; 2+ messages in thread
From: Jinke Fan @ 2020-01-06 11:44 UTC (permalink / raw)
To: Alexandre Belloni, linux-rtc
Cc: linux-kernel, hwentlan, thomas.lendacky, kim.phillips
Hi Alexandre,
On 2020/1/4 12:31, Alexandre Belloni wrote:
> There are multiple reports of this patch breaking RTC time setting for AMD
> platforms.
>
After digging into this issues, we suspect it related to BIOS upgrade,
Which upgrade AM4 PI from AGESA 1.0.0.3ABBA to AM4 combo PI 1.0.0.4 patch B.
Seemed this PI upgrade makes this patch can't work as expected.
--
Best regards.
Jinke Fan
> This reverts commit 7ad295d5196a58c22abecef62dd4f99e2f86e831.
>
> Cc: Jinke Fan <fanjinke@hygon.cn>
> Link: https://lore.kernel.org/r/CABXGCsMLob0DC25JS8wwAYydnDoHBSoMh2_YLPfqm3TTvDE-Zw@mail.gmail.com
> Fixes: 7ad295d5196a ("rtc: Fix the AltCentury value on AMD/Hygon platform")
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-06 11:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-04 4:31 [PATCH] rtc: cmos: Revert "rtc: Fix the AltCentury value on AMD/Hygon platform" Alexandre Belloni
2020-01-06 11:44 ` Jinke Fan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®