Linux ACPI
 help / color / mirror / Atom feed
* [PATCH] ACPI / LPSS: fix UART Auto Flow Control
@ 2013-10-09  6:49 Heikki Krogerus
  2013-10-09 13:51 ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Heikki Krogerus @ 2013-10-09  6:49 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: chiau.ee.chew, linux-acpi

There is an additional bit in the GENERAL register on newer
silicon that needs to be set or UART's RTS pin fails to
reflect the flow control settings in the Modem Control
Register.

This will fix an issue where the RTS pin of the UART stays
always at 1.8V, regardless of the register settings.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/acpi/acpi_lpss.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index fb78bb9..d396101 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -30,6 +30,7 @@ ACPI_MODULE_NAME("acpi_lpss");
 /* Offsets relative to LPSS_PRIVATE_OFFSET */
 #define LPSS_GENERAL			0x08
 #define LPSS_GENERAL_LTR_MODE_SW	BIT(2)
+#define LPSS_GENERAL_UART_RTS_OVRD	BIT(3)
 #define LPSS_SW_LTR			0x10
 #define LPSS_AUTO_LTR			0x14
 #define LPSS_TX_INT			0x20
@@ -68,11 +69,16 @@ struct lpss_private_data {
 
 static void lpss_uart_setup(struct lpss_private_data *pdata)
 {
-	unsigned int tx_int_offset = pdata->dev_desc->prv_offset + LPSS_TX_INT;
+	unsigned int offset;
 	u32 reg;
 
-	reg = readl(pdata->mmio_base + tx_int_offset);
-	writel(reg | LPSS_TX_INT_MASK, pdata->mmio_base + tx_int_offset);
+	offset = pdata->dev_desc->prv_offset + LPSS_TX_INT;
+	reg = readl(pdata->mmio_base + offset);
+	writel(reg | LPSS_TX_INT_MASK, pdata->mmio_base + offset);
+
+	offset = pdata->dev_desc->prv_offset + LPSS_GENERAL;
+	reg = readl(pdata->mmio_base + offset);
+	writel(reg | LPSS_GENERAL_UART_RTS_OVRD, pdata->mmio_base + offset);
 }
 
 static struct lpss_device_desc lpt_dev_desc = {
-- 
1.8.4.rc3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ACPI / LPSS: fix UART Auto Flow Control
  2013-10-09  6:49 [PATCH] ACPI / LPSS: fix UART Auto Flow Control Heikki Krogerus
@ 2013-10-09 13:51 ` Rafael J. Wysocki
  2013-10-10  6:31   ` Heikki Krogerus
  0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2013-10-09 13:51 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: chiau.ee.chew, linux-acpi, Mika Westerberg

On Wednesday, October 09, 2013 09:49:20 AM Heikki Krogerus wrote:
> There is an additional bit in the GENERAL register on newer
> silicon that needs to be set or UART's RTS pin fails to
> reflect the flow control settings in the Modem Control
> Register.
> 
> This will fix an issue where the RTS pin of the UART stays
> always at 1.8V, regardless of the register settings.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

OK, is this urgent?

Rafael


> ---
>  drivers/acpi/acpi_lpss.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index fb78bb9..d396101 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -30,6 +30,7 @@ ACPI_MODULE_NAME("acpi_lpss");
>  /* Offsets relative to LPSS_PRIVATE_OFFSET */
>  #define LPSS_GENERAL			0x08
>  #define LPSS_GENERAL_LTR_MODE_SW	BIT(2)
> +#define LPSS_GENERAL_UART_RTS_OVRD	BIT(3)
>  #define LPSS_SW_LTR			0x10
>  #define LPSS_AUTO_LTR			0x14
>  #define LPSS_TX_INT			0x20
> @@ -68,11 +69,16 @@ struct lpss_private_data {
>  
>  static void lpss_uart_setup(struct lpss_private_data *pdata)
>  {
> -	unsigned int tx_int_offset = pdata->dev_desc->prv_offset + LPSS_TX_INT;
> +	unsigned int offset;
>  	u32 reg;
>  
> -	reg = readl(pdata->mmio_base + tx_int_offset);
> -	writel(reg | LPSS_TX_INT_MASK, pdata->mmio_base + tx_int_offset);
> +	offset = pdata->dev_desc->prv_offset + LPSS_TX_INT;
> +	reg = readl(pdata->mmio_base + offset);
> +	writel(reg | LPSS_TX_INT_MASK, pdata->mmio_base + offset);
> +
> +	offset = pdata->dev_desc->prv_offset + LPSS_GENERAL;
> +	reg = readl(pdata->mmio_base + offset);
> +	writel(reg | LPSS_GENERAL_UART_RTS_OVRD, pdata->mmio_base + offset);
>  }
>  
>  static struct lpss_device_desc lpt_dev_desc = {
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ACPI / LPSS: fix UART Auto Flow Control
  2013-10-09 13:51 ` Rafael J. Wysocki
@ 2013-10-10  6:31   ` Heikki Krogerus
  2013-10-10 13:04     ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Heikki Krogerus @ 2013-10-10  6:31 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: chiau.ee.chew, linux-acpi, Mika Westerberg

On Wed, Oct 09, 2013 at 03:51:44PM +0200, Rafael J. Wysocki wrote:
> On Wednesday, October 09, 2013 09:49:20 AM Heikki Krogerus wrote:
> > There is an additional bit in the GENERAL register on newer
> > silicon that needs to be set or UART's RTS pin fails to
> > reflect the flow control settings in the Modem Control
> > Register.
> > 
> > This will fix an issue where the RTS pin of the UART stays
> > always at 1.8V, regardless of the register settings.
> > 
> > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> 
> OK, is this urgent?

No, we can wait for v3.13 if that is what you mean.

> Rafael
> 
> 

-- 
heikki

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ACPI / LPSS: fix UART Auto Flow Control
  2013-10-10  6:31   ` Heikki Krogerus
@ 2013-10-10 13:04     ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2013-10-10 13:04 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: chiau.ee.chew, linux-acpi, Mika Westerberg

On Thursday, October 10, 2013 09:31:16 AM Heikki Krogerus wrote:
> On Wed, Oct 09, 2013 at 03:51:44PM +0200, Rafael J. Wysocki wrote:
> > On Wednesday, October 09, 2013 09:49:20 AM Heikki Krogerus wrote:
> > > There is an additional bit in the GENERAL register on newer
> > > silicon that needs to be set or UART's RTS pin fails to
> > > reflect the flow control settings in the Modem Control
> > > Register.
> > > 
> > > This will fix an issue where the RTS pin of the UART stays
> > > always at 1.8V, regardless of the register settings.
> > > 
> > > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > 
> > OK, is this urgent?
> 
> No, we can wait for v3.13 if that is what you mean.

OK


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-10 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-09  6:49 [PATCH] ACPI / LPSS: fix UART Auto Flow Control Heikki Krogerus
2013-10-09 13:51 ` Rafael J. Wysocki
2013-10-10  6:31   ` Heikki Krogerus
2013-10-10 13:04     ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox