| From c10401d8c349610ea9cd29d28f87dd630c907aeb Mon Sep 17 00:00:00 2001 |
| From: Alexander Filippov <a.filippov@yadro.com> |
| Date: Wed, 28 Mar 2018 17:46:28 +0300 |
| Subject: [PATCH] vesnin: remap aspeed-uart |
| |
| Remaps UART2 <-> UART3 |
| |
| Signed-off-by: Alexander Filippov <a.filippov@yadro.com> |
| --- |
| drivers/soc/aspeed/aspeed-lpc-ctrl.c | 8 ++++++++ |
| 1 file changed, 8 insertions(+) |
| |
| diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c |
| index 01ed21e8bfee..cbdca53a8805 100644 |
| --- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c |
| +++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c |
| @@ -23,6 +23,7 @@ |
| |
| #define HICR7 0x8 |
| #define HICR8 0xc |
| +#define HICRA 0x1c |
| |
| struct aspeed_lpc_ctrl { |
| struct miscdevice miscdev; |
| @@ -271,6 +272,13 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev) |
| goto err; |
| } |
| |
| + /* Switch UART2 to IO3 and UART3 to IO2 */ |
| + rc = regmap_write(lpc_ctrl->regmap, HICRA, 0x00C80108); |
| + if (rc) { |
| + dev_err(dev, "Unable to switch UART 2<->3\n"); |
| + goto err; |
| + } |
| + |
| return 0; |
| |
| err: |
| -- |
| 2.20.1 |
| |