Skip to content

Commit

Permalink
serial: 8250_dw: Fix runtime PM handling
Browse files Browse the repository at this point in the history
When using kgdb, you get an abort when accessing the UART registers.
This is because the driver has already entered runtime PM and so turned
off the bus clock needed to access the registers.

To fix this, set the capability indicating Runtime PM is active while idle.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Phil Edworthy authored and gregkh committed May 14, 2018
1 parent 13dc04d commit d76c743
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/tty/serial/8250/8250_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,10 @@ static int dw8250_probe(struct platform_device *pdev)
if (!data->skip_autocfg)
dw8250_setup_port(p);

#ifdef CONFIG_PM
uart.capabilities |= UART_CAP_RPM;
#endif

/* If we have a valid fifosize, try hooking up DMA */
if (p->fifosize) {
data->dma.rxconf.src_maxburst = p->fifosize / 4;
Expand Down

0 comments on commit d76c743

Please sign in to comment.