diff options
| author | Andrey Gostev <fga022c@motorola.com> | 2014-05-16 22:41:14 -0400 |
|---|---|---|
| committer | Andrey Gostev <fga022c@motorola.com> | 2014-05-19 15:43:34 +0000 |
| commit | 8f2a382307c62a6e140e7b26356e374954cdee7c (patch) | |
| tree | 60bce353bc67be0e36c04176647bd0d03071f00b | |
| parent | 8ed52cf68c04f91a453e75a13b49202945695e47 (diff) | |
| download | olio-linux-3.10-8f2a382307c62a6e140e7b26356e374954cdee7c.tar.xz olio-linux-3.10-8f2a382307c62a6e140e7b26356e374954cdee7c.zip | |
IKXCLOCK-1236 SERIAL: omap: configurable PM QoS
Change-Id: If21c9b6d586bb5fdeb6f8bf0230f05e5207da174
| -rw-r--r-- | Documentation/devicetree/bindings/serial/omap_serial.txt | 1 | ||||
| -rw-r--r-- | drivers/tty/serial/omap-serial.c | 7 | ||||
| -rw-r--r-- | include/linux/platform_data/serial-omap.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/serial/omap_serial.txt b/Documentation/devicetree/bindings/serial/omap_serial.txt index a44a81bfb89..b4e9c8f7286 100644 --- a/Documentation/devicetree/bindings/serial/omap_serial.txt +++ b/Documentation/devicetree/bindings/serial/omap_serial.txt @@ -9,3 +9,4 @@ Required properties: Optional properties: - clock-frequency : frequency of the clock input to the UART - flags : an integer specifying the UPF flags of the uart port +- ti,no-pm-qos: empty property that disables PM QoS for the UART diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 948a2e993c3..4c338759f05 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -156,6 +156,7 @@ struct uart_omap_port { int DTR_inverted; int DTR_active; + bool pm_qos_disabled; struct pm_qos_request pm_qos_request; u32 latency; u32 calc_latency; @@ -731,8 +732,9 @@ static void serial_omap_uart_qos_work(struct work_struct *work) { struct uart_omap_port *up = container_of(work, struct uart_omap_port, qos_work); + if (!up->pm_qos_disabled) + pm_qos_update_request(&up->pm_qos_request, up->latency); - pm_qos_update_request(&up->pm_qos_request, up->latency); if (gpio_is_valid(up->DTR_gpio)) gpio_set_value_cansleep(up->DTR_gpio, up->DTR_active != up->DTR_inverted); @@ -1394,6 +1396,8 @@ static struct omap_uart_port_info *of_get_uart_port_info(struct device *dev) &omap_up_info->uartclk); of_property_read_u32(dev->of_node, "flags", &omap_up_info->flags); + omap_up_info->pm_qos_disabled = of_property_read_bool(dev->of_node, + "ti,no-pm-qos"); return omap_up_info; } @@ -1498,6 +1502,7 @@ static int serial_omap_probe(struct platform_device *pdev) up->latency = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE; up->calc_latency = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE; + up->pm_qos_disabled = omap_up_info->pm_qos_disabled; pm_qos_add_request(&up->pm_qos_request, PM_QOS_CPU_DMA_LATENCY, up->latency); serial_omap_uart_wq = create_singlethread_workqueue(up->name); diff --git a/include/linux/platform_data/serial-omap.h b/include/linux/platform_data/serial-omap.h index c860c1b314c..9041c6d5169 100644 --- a/include/linux/platform_data/serial-omap.h +++ b/include/linux/platform_data/serial-omap.h @@ -41,6 +41,7 @@ struct omap_uart_port_info { int DTR_gpio; int DTR_inverted; int DTR_present; + bool pm_qos_disabled; int (*get_context_loss_count)(struct device *); void (*enable_wakeup)(struct device *, bool); |