Alexander Filippov | 035d659 | 2019-07-22 14:30:50 +0300 | [diff] [blame] | 1 | From c10401d8c349610ea9cd29d28f87dd630c907aeb Mon Sep 17 00:00:00 2001 |
Brad Bishop | c9ed720 | 2019-06-14 12:33:18 -0400 | [diff] [blame] | 2 | From: Alexander Filippov <a.filippov@yadro.com> |
| 3 | Date: Wed, 28 Mar 2018 17:46:28 +0300 |
| 4 | Subject: [PATCH] vesnin: remap aspeed-uart |
| 5 | |
| 6 | Remaps UART2 <-> UART3 |
| 7 | |
| 8 | Signed-off-by: Alexander Filippov <a.filippov@yadro.com> |
| 9 | --- |
Alexander Filippov | 035d659 | 2019-07-22 14:30:50 +0300 | [diff] [blame] | 10 | drivers/soc/aspeed/aspeed-lpc-ctrl.c | 8 ++++++++ |
Brad Bishop | c9ed720 | 2019-06-14 12:33:18 -0400 | [diff] [blame] | 11 | 1 file changed, 8 insertions(+) |
| 12 | |
Alexander Filippov | 035d659 | 2019-07-22 14:30:50 +0300 | [diff] [blame] | 13 | diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c |
| 14 | index 01ed21e8bfee..cbdca53a8805 100644 |
| 15 | --- a/drivers/soc/aspeed/aspeed-lpc-ctrl.c |
| 16 | +++ b/drivers/soc/aspeed/aspeed-lpc-ctrl.c |
| 17 | @@ -23,6 +23,7 @@ |
Brad Bishop | c9ed720 | 2019-06-14 12:33:18 -0400 | [diff] [blame] | 18 | |
| 19 | #define HICR7 0x8 |
| 20 | #define HICR8 0xc |
| 21 | +#define HICRA 0x1c |
| 22 | |
| 23 | struct aspeed_lpc_ctrl { |
| 24 | struct miscdevice miscdev; |
Alexander Filippov | 035d659 | 2019-07-22 14:30:50 +0300 | [diff] [blame] | 25 | @@ -271,6 +272,13 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev) |
Brad Bishop | c9ed720 | 2019-06-14 12:33:18 -0400 | [diff] [blame] | 26 | goto err; |
| 27 | } |
| 28 | |
| 29 | + /* Switch UART2 to IO3 and UART3 to IO2 */ |
| 30 | + rc = regmap_write(lpc_ctrl->regmap, HICRA, 0x00C80108); |
| 31 | + if (rc) { |
| 32 | + dev_err(dev, "Unable to switch UART 2<->3\n"); |
| 33 | + goto err; |
| 34 | + } |
| 35 | + |
| 36 | return 0; |
| 37 | |
| 38 | err: |
| 39 | -- |
| 40 | 2.20.1 |
| 41 | |