mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
tty/serial: Migrate 8250_fsl to use has_sysrq
The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. In contrast to 8250/8250_of, legacy_serial on powerpc does fill (struct plat_serial8250_port). The reason is likely that it's done on device_initcall(), not on probe. So, 8250_core is not yet probed. Propagate value from platform_device on 8250 probe - in case powepc legacy driver it's initialized on initcall, in case 8250_of it will be initialized later on of_platform_serial_setup(). Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Dmitry Safonov <dima@arista.com> Link: https://lore.kernel.org/r/20191213000657.931618-6-dima@arista.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c3a4e55273
commit
d68fefdd5b
5 changed files with 8 additions and 6 deletions
|
@ -25,6 +25,7 @@ struct plat_serial8250_port {
|
|||
unsigned char regshift; /* register shift */
|
||||
unsigned char iotype; /* UPIO_* */
|
||||
unsigned char hub6;
|
||||
unsigned char has_sysrq; /* supports magic SysRq */
|
||||
upf_t flags; /* UPF_* flags */
|
||||
unsigned int type; /* If UPF_FIXED_TYPE */
|
||||
unsigned int (*serial_in)(struct uart_port *, int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue