diff options
| -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);  |