]>
Commit | Line | Data |
---|---|---|
a65d4bac GKH |
1 | From foo@baz Sat Jul 28 10:25:26 CEST 2018 |
2 | From: Stewart Smith <stewart@linux.ibm.com> | |
3 | Date: Thu, 29 Mar 2018 17:02:46 +1100 | |
4 | Subject: hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common() | |
5 | ||
6 | From: Stewart Smith <stewart@linux.ibm.com> | |
7 | ||
8 | [ Upstream commit 447808bf500a7cc92173266a59f8a494e132b122 ] | |
9 | ||
10 | time_init() will set up tb_ticks_per_usec based on reality. | |
11 | time_init() is called *after* udbg_init_opal_common() during boot. | |
12 | ||
13 | from arch/powerpc/kernel/time.c: | |
14 | unsigned long tb_ticks_per_usec = 100; /* sane default */ | |
15 | ||
16 | Currently, all powernv systems have a timebase frequency of 512mhz | |
17 | (512000000/1000000 == 0x200) - although there's nothing written | |
18 | down anywhere that I can find saying that we couldn't make that | |
19 | different based on the requirements in the ISA. | |
20 | ||
21 | So, we've been (accidentally) thwacking the (currently) correct | |
22 | (for powernv at least) value for tb_ticks_per_usec earlier than | |
23 | we otherwise would have. | |
24 | ||
25 | The "sane default" seems to be adequate for our purposes between | |
26 | udbg_init_opal_common() and time_init() being called, and if it isn't, | |
27 | then we should probably be setting it somewhere that isn't hvc_opal.c! | |
28 | ||
29 | Signed-off-by: Stewart Smith <stewart@linux.ibm.com> | |
30 | Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> | |
31 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
32 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
33 | --- | |
34 | drivers/tty/hvc/hvc_opal.c | 1 - | |
35 | 1 file changed, 1 deletion(-) | |
36 | ||
37 | --- a/drivers/tty/hvc/hvc_opal.c | |
38 | +++ b/drivers/tty/hvc/hvc_opal.c | |
39 | @@ -332,7 +332,6 @@ static void udbg_init_opal_common(void) | |
40 | udbg_putc = udbg_opal_putc; | |
41 | udbg_getc = udbg_opal_getc; | |
42 | udbg_getc_poll = udbg_opal_getc_poll; | |
43 | - tb_ticks_per_usec = 0x200; /* Make udelay not suck */ | |
44 | } | |
45 | ||
46 | void __init hvc_opal_init_early(void) |