mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 08:50:53 +07:00
ARM: OMAP2+: UART: Avoid uart idling on suspend for no_console_suspend usecase
If no_console_suspend is used we have prevent uart idling during suspend to provide debug prints. Power domain hooks can idle uarts if left enabled during system wide suspend so re-use the omap_device_disable_idle_on_suspend API's to ensure console_uart is not idled during suspend. omap_device_disable_idle_on_suspend API was used on all uarts since the uart driver was not runtime adapted, now with runtime adaptation we can re-use this API only for no_console_suspend use cases. Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
This commit is contained in:
parent
8612bd22f3
commit
08f86b3eab
@ -64,6 +64,7 @@ struct omap_uart_state {
|
||||
static LIST_HEAD(uart_list);
|
||||
static u8 num_uarts;
|
||||
static u8 console_uart_id = -1;
|
||||
static u8 no_console_suspend;
|
||||
|
||||
#define DEFAULT_RXDMA_POLLRATE 1 /* RX DMA polling rate (us) */
|
||||
#define DEFAULT_RXDMA_BUFSIZE 4096 /* RX DMA buffer size */
|
||||
@ -298,6 +299,10 @@ static int __init omap_serial_early_init(void)
|
||||
|
||||
if (cmdline_find_option(uart_name)) {
|
||||
console_uart_id = uart->num;
|
||||
|
||||
if (cmdline_find_option("no_console_suspend"))
|
||||
no_console_suspend = true;
|
||||
|
||||
/*
|
||||
* omap-uart can be used for earlyprintk logs
|
||||
* So if omap-uart is used as console then prevent
|
||||
@ -385,7 +390,9 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
|
||||
WARN(IS_ERR(pdev), "Could not build omap_device for %s: %s.\n",
|
||||
name, oh->name);
|
||||
|
||||
omap_device_disable_idle_on_suspend(pdev);
|
||||
if ((console_uart_id == bdata->id) && no_console_suspend)
|
||||
omap_device_disable_idle_on_suspend(pdev);
|
||||
|
||||
oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
|
||||
|
||||
uart->pdev = pdev;
|
||||
|
Loading…
Reference in New Issue
Block a user