linux/arch/mips
James Hogan 106eccb4d2 MIPS: Malta: Don't reinitialise RTC
On Malta, since commit a87ea88d8f ("MIPS: Malta: initialise the RTC at
boot"), the RTC is reinitialised and forced into binary coded decimal
(BCD) mode during init, even if the bootloader has already initialised
it, and may even have already put it into binary mode (as YAMON does).
This corrupts the current time, can result in the RTC seconds being an
invalid BCD (e.g. 0x1a..0x1f) for up to 6 seconds, as well as confusing
YAMON for a while after reset, enough for it to report timeouts when
attempting to load from TFTP (it actually uses the RTC in that code).

Therefore only initialise the RTC to the extent that is necessary so
that Linux avoids interfering with the bootloader setup, while also
allowing it to estimate the CPU frequency without hanging, without a
bootloader necessarily having done anything with the RTC (for example
when the kernel is loaded via EJTAG).

The divider control is configured for a 32KHZ reference clock if
necessary, and the SET bit of the RTC_CONTROL register is cleared if
necessary without changing any other bits (this bit will be set when
coming out of reset if the battery has been disconnected).

Fixes: a87ea88d8f ("MIPS: Malta: initialise the RTC at boot")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 3.14+
Patchwork: https://patchwork.linux-mips.org/patch/10739/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-08-03 09:25:07 +02:00
..
alchemy MIPS: Alchemy: Remove unneeded cast removing const 2015-06-21 21:53:46 +02:00
ar7 MIPS: AR7: Replace mac address parsing 2015-04-02 13:54:22 +02:00
ath25 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-07-01 15:19:35 -07:00
ath79 MIPS: Add basic support for the TL-WR1043ND version 1 2015-06-21 21:54:10 +02:00
bcm47xx MIPS: BCM47xx: Simplify handling SPROM revisions 2015-06-21 22:19:59 +02:00
bcm63xx This is the final removal (after several years!) of the obsolete cpus_* 2015-04-20 10:19:03 -07:00
bmips MIPS: BMIPS: Accept UHI interface for passing a dtb 2015-06-21 21:54:17 +02:00
boot MIPS: Malta: Basic DT plumbing 2015-06-21 21:54:29 +02:00
cavium-octeon Devicetree changes for v4.2 2015-07-01 19:40:18 -07:00
cobalt MIPS: Cobalt Don't use module_init in non-modular MTD registration. 2015-06-21 22:14:30 +02:00
configs MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
dec MIPS: DEC: Do not set up the FPU interrupt if no FPU 2015-04-08 01:10:46 +02:00
emma
fw MIPS: ARC: Use __noreturn / unreachable in ARC termination functions. 2015-01-13 16:04:27 +01:00
include Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-07-19 14:12:22 -07:00
jazz
jz4740 MIPS: ingenic: Initial MIPS Creator CI20 support 2015-06-21 21:53:28 +02:00
kernel MIPS: unaligned: Fix build error on big endian R6 kernels 2015-08-03 09:25:05 +02:00
kvm The bulk of the changes here is for x86. And for once it's not 2015-06-24 09:36:49 -07:00
lantiq MIPS: mark prom_free_prom_memory() everywhere with __init 2015-04-01 17:21:58 +02:00
lasat Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-04-17 15:50:54 -04:00
lib MIPS: tlb-r3k: Move CP0.Wired register initialisation to `tlb_init' 2015-06-21 21:52:41 +02:00
loongson32 MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
loongson64 MIPS, CPUFREQ: Fix spelling of Institute. 2015-07-07 20:59:42 +02:00
math-emu MIPS: Fix erroneous JR emulation for MIPS R6 2015-07-09 11:11:43 +02:00
mm MIPS: c-r4k: Extend way_string array 2015-07-10 11:02:20 +02:00
mti-malta MIPS: Malta: Don't reinitialise RTC 2015-08-03 09:25:07 +02:00
mti-sead3 of: clean-up unnecessary libfdt include paths 2015-06-04 20:16:47 -05:00
net MIPS: BPF: Introduce BPF ASM helpers 2015-06-21 21:54:25 +02:00
netlogic MIPS: netlogic: remove unnecessary MTD partition probe specification 2015-06-21 21:52:43 +02:00
oprofile MIPS: Add R16000 detection 2015-04-01 17:22:13 +02:00
paravirt mips: fix up obsolete cpu function usage. 2015-03-05 15:25:06 +10:30
pci Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-07-01 15:19:35 -07:00
pistachio MIPS: Pistachio: Support CDMM & Fast Debug Channel 2015-07-10 11:02:20 +02:00
pmcs-msp71xx kconfig: use bool instead of boolean for type definition attributes 2015-01-07 13:08:04 +01:00
pnx833x MIPS: PNX833x: Remove checks for CONFIG_I2C_PNX0105 2014-05-23 15:12:39 +02:00
power MIPS: Hibernate: flush TLB entries earlier 2015-04-10 15:41:52 +02:00
ralink Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-07-01 15:19:35 -07:00
rb532 MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
sgi-ip22 MIPS: ip22-gio: Remove legacy suspend/resume support 2015-02-20 13:30:55 +01:00
sgi-ip27 MIPS: IRQ/IP27: Move IRQ allocation API to platform code. 2015-06-21 21:54:31 +02:00
sgi-ip32 MIPS: IP32: Fix build errors in reset code in DS1685 platform hook. 2015-05-13 00:01:41 +02:00
sibyte MIPS: SB1: Remove support for Pass 1 parts. 2015-07-14 21:47:34 +02:00
sni
txx9 MIPS/IRQCHIP: Move irq_chip from arch/mips to drivers/irqchip. 2015-06-21 21:52:50 +02:00
vr41xx MIPS/IRQCHIP: Move irq_chip from arch/mips to drivers/irqchip. 2015-06-21 21:52:50 +02:00
Kbuild MIPS: net: Add BPF JIT 2014-05-30 16:10:20 +02:00
Kbuild.platforms MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
Kconfig MIPS: SB1: Remove support for Pass 1 parts. 2015-07-14 21:47:34 +02:00
Kconfig.debug MIPS: kernel: elf: Improve the overall ABI and FPU mode checks 2015-02-17 15:37:39 +00:00
Makefile MIPS: SB1: Remove support for Pass 1 parts. 2015-07-14 21:47:34 +02:00