]> git.baikalelectronics.ru Git - kernel.git/commit
hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common()
authorStewart Smith <stewart@linux.ibm.com>
Thu, 29 Mar 2018 06:02:46 +0000 (17:02 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Jun 2018 10:43:34 +0000 (20:43 +1000)
commitca3036d98380f46134edf2760de0e823f0d8ff5c
treeabf0a41fadf368c1f1d935c71ae87f623d18748b
parentfa11810c96fc1bc04d313ed46592ffc58e289b28
hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common()

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>
drivers/tty/hvc/hvc_opal.c