All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] Add option to skip using RTC
@ 2019-09-03  6:17 Rahul Tanwar
  2019-09-03  6:17 ` [PATCH v3 1/1] x86/init: Noop get/set wallclock when platform doesn't support RTC Rahul Tanwar
  0 siblings, 1 reply; 2+ messages in thread
From: Rahul Tanwar @ 2019-09-03  6:17 UTC (permalink / raw)
  To: tglx, mingo, bp, hpa, tony.luck, x86
  Cc: andriy.shevchenko, alan, linux-kernel, qi-ming.wu, chuanhua.lei,
	cheol.yong.kim, rahul.tanwar, Rahul Tanwar

Hi,

There is a new product which does not support RTC as persistent clock source.

Platform ops get/set wallclock are used to get/set timespec through kernel 
timekeeping read/update_persistent_clock64() routines. Presently, get/set
wallclock ops always use MC146818A RTC/CMOS device to read & set time.
This causes boot failure on our new SOC with no RTC.

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 machines or for DT enabled machines which does not define
optional status property, proceed same as before.

These patches are baselined upon Linux 5.3-rc6 at below Git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core

v3:
* 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(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-03  6:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-03  6:17 [PATCH v3 0/1] Add option to skip using RTC Rahul Tanwar
2019-09-03  6:17 ` [PATCH v3 1/1] x86/init: Noop get/set wallclock when platform doesn't support RTC Rahul Tanwar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.