x86/init: Allow DT configured systems to disable RTC at boot time
authorRahul Tanwar <rahul.tanwar@linux.intel.com>
Thu, 10 Oct 2019 09:28:56 +0000 (17:28 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 12 Nov 2019 14:46:53 +0000 (15:46 +0100)
commitc311ed6183f4fd137bb8451ef77f4011c225ddaf
treeb4a284a48faa6d24db59ede763a6814e1a20f699
parent6a181e333954a26f46596b36f82abd14743570fd
x86/init: Allow DT configured systems to disable RTC at boot time

Systems which do not support RTC run into boot problems as the kernel
assumes the availability of the RTC by default.

On device tree configured systems the availability of the RTC can be
detected by querying the corresponding device tree node.

Implement a wallclock init function to query the device tree and disable
RTC if the RTC is marked as not available in the corresponding node.

[ tglx: Rewrote changelog and comments. Added proper __init(const)
   annotations. ]

Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Rahul Tanwar <rahul.tanwar@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/b84d9152ce0c1c09896ff4987e691a0715cb02df.1570693058.git.rahul.tanwar@linux.intel.com
arch/x86/kernel/x86_init.c