[PATCH] Adjust register address to enable reading/writing data to secondary uart port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Bo Svangård <bo.svangard@xxxxxxxxxxxxxx>

Signed-off-by: Bo Svangård <bo.svangard@xxxxxxxxxxxxxx>
---
 drivers/tty/serial/sc16is7xx.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index df9a384..f5b33f8 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -495,7 +495,8 @@ static void sc16is7xx_handle_rx(struct uart_port *port, unsigned int rxlen,
 			bytes_read = 1;
 		} else {
 			regcache_cache_bypass(s->regmap, true);
-			regmap_raw_read(s->regmap, SC16IS7XX_RHR_REG,
+			regmap_raw_read(s->regmap,
+					SC16IS7XX_RHR_REG << SC16IS7XX_REG_SHIFT  | port->linux,
 					s->buf, rxlen);
 			regcache_cache_bypass(s->regmap, false);
 			bytes_read = rxlen;
@@ -578,7 +579,9 @@ static void sc16is7xx_handle_tx(struct uart_port *port)
 			xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
 		}
 		regcache_cache_bypass(s->regmap, true);
-		regmap_raw_write(s->regmap, SC16IS7XX_THR_REG, s->buf, to_send);
+		regmap_raw_write(s->regmap,
+				 SC16IS7XX_THR_REG << SC16IS7XX_REG_SHIFT | port->line,
+				 s->buf, to_send);
 		regcache_cache_bypass(s->regmap, false);
 	}
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux