android_kernel_oneplus_msm8998/drivers/tty/hvc
Stewart Smith c48557366d hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common()
[ Upstream commit 447808bf500a7cc92173266a59f8a494e132b122 ]

time_init() will set up tb_ticks_per_usec based on reality.
time_init() is called *after* udbg_init_opal_common() during boot.

from arch/powerpc/kernel/time.c:
  unsigned long tb_ticks_per_usec = 100; /* sane default */

Currently, all powernv systems have a timebase frequency of 512mhz
(512000000/1000000 == 0x200) - although there's nothing written
down anywhere that I can find saying that we couldn't make that
different based on the requirements in the ISA.

So, we've been (accidentally) thwacking the (currently) correct
(for powernv at least) value for tb_ticks_per_usec earlier than
we otherwise would have.

The "sane default" seems to be adequate for our purposes between
udbg_init_opal_common() and time_init() being called, and if it isn't,
then we should probably be setting it somewhere that isn't hvc_opal.c!

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-06 16:24:31 +02:00
..
hvc_bfin_jtag.c
hvc_console.c tty: Remove tty_wait_until_sent_from_close() 2015-10-17 21:11:29 -07:00
hvc_console.h
hvc_dcc.c hvc_dcc: don't ignore errors during initialization 2015-10-04 17:49:27 +01:00
hvc_irq.c
hvc_iucv.c s390/iucv: do not use arrays as argument 2015-09-21 16:03:04 -07:00
hvc_opal.c hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common() 2018-08-06 16:24:31 +02:00
hvc_rtas.c
hvc_tile.c drivers/tty/hvc/hvc_tile.c: properly return -EAGAIN 2015-05-11 11:22:20 -04:00
hvc_udbg.c
hvc_vio.c powerpc: Remove powerpc specific cmd_line 2014-10-02 17:33:55 +10:00
hvc_xen.c tty: hvc_xen: hide xen_console_remove when unused 2018-02-25 11:03:46 +01:00
hvcs.c tty: Remove tty_wait_until_sent_from_close() 2015-10-17 21:11:29 -07:00
hvsi.c powerpc/hvsi: Fix endianness issues in the HVSI driver 2015-08-20 18:19:08 +10:00
hvsi_lib.c tty-hvsi_lib: Deletion of an unnecessary check before the function call "tty_kref_put" 2014-11-26 19:35:49 -08:00
Kconfig ARM64: TTY: hvc_dcc: Add support for ARM64 dcc 2015-10-04 17:49:27 +01:00
Makefile tty/hvc: remove celleb-only beat driver 2015-05-10 19:19:06 +02:00