tty/serial/8250: Add has_sysrq to plat_serial8250_port
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().
---
It's probably better to squash this into the 8250_fsl patch. I've added Fixes tag in case the branch won't be rebased. Tested powerpc build manually with ppc64 cross-compiler.
drivers/tty/serial/8250/8250_core.c | 1 + include/linux/serial_8250.h | 1 + 2 files changed, 2 insertions(+)
drivers/tty/serial/8250/8250_core.c +1 -0
@@ -816,6 +816,7 @@ static int serial8250_probe(struct platform_device *dev) uart.port.flags = p->flags; uart.port.mapbase = p->mapbase; uart.port.hub6 = p->hub6; + uart.port.has_sysrq = p->has_sysrq; uart.port.private_data = p->private_data; uart.port.type = p->type; uart.port.serial_in = p->serial_in;
include/linux/serial_8250.h +1 -0
@@ -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 );
Signature · 1 line
2.24.1
Greg Kroah-Hartman
maintainerQuoted 15 lines · Dmitry Safonov
In contrast to 8250/8250_of,
legacy_serialon powerpc does fill (structplat_serial8250_port). The reason is likely that it's done ondevice_initcall(), not on probe. So, 8250_core is not yet probed.Propagate value from
platform_deviceon 8250 probe - in case powepc legacy driver it's initialized on initcall, in case 8250_of it will be initialized later onof_platform_serial_setup().Fixes ea2683bf546c ("tty/serial: Migrate 8250_fsl to use has_sysrq").Cc Benjamin Herrenschmidt <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Reported-by kbuild test robot <[email protected]>Signed-off-by Dmitry Safonov <[email protected]>
Quoted 4 lines
---
It's probably better to squash this into the 8250_fsl patch. I've added Fixes tag in case the branch won't be rebased. Tested powerpc build manually with ppc64 cross-compiler.
I have squashed this into that original 8250_fsl patch now, and rebased the series. Let's see what kbuild does...
thanks,
greg k-h