x86/init: Add option to skip using RTC
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest posting 2/21 patch 0 repliesNew
- v3 posting 1/21 patch 0 repliesSuperseded
- v21 patch 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 2 patches | 9 replies | Superseded |
Changes in v3 from the cover letter
* Rebase to latest 5.4-rc2 kernel.
* Fix a build warning reported by kbuild test robot.
Patches in v3 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | x86/init: Noop get/set wallclock when platform doesn't support RTCarch/ | +25 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/1] x86/init: Add option to skip using RTC
Hi,
We have a new Atom Airmont core based product which does not support RTC as persistent clock source.
Presently, platform ops get/set wallclock always use MC146818 RTC/CMOS device to read & set time. This causes boot failure on our SOC with no RTC. More specifically, it hangs in RTC driver's mach_get_cmos_time() when it polls RTC_FRQ_SELECT register and loops until Update-In-Progress (UIP) flag gets cleared i.e. below code snippet.
while ((CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP))
cpu_relax();
After few rounds of review cycles/feedback, we concluded that we should control it from Motorola MC146818 compatible RTC devicetree node. Please see [1].
Make RTC read/write optional by detecting platforms which does not support RTC/CMOS device through the corresponding DT node status property. If status says disabled, then noop the get/set wallclock ops.
For non DT enabled platforms or for DT enabled platforms which does not define optional status property, proceed same as before.
Patch is baselined upon Linux 5.4-rc2 at below Git tree:git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
[1] Documentation/devicetree/bindings/rtc/rtc-cmos.txt
v3:
* Rebase to latest 5.4-rc2 kernel.
* Fix a build warning reported by kbuild test robot.
v2:
* As per review feedback, do not hack RTC read/write functions directly. Instead, override get/set wallclock ops during setup_arch init sequence.
v1:
* Detect platforms with no RTC in RTC read/write functions and skip RTC read/write if not applicable.
Rahul Tanwar (1):
x86/init: Noop get/set wallclock when platform doesn't support RTC
arch/x86/kernel/x86_init.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-)
Signature · 1 line
2.11.0