blob: a745a18a7c5caf55b98940a5d0b60bd8a19a1138 [file] [log] [blame]
Alexander Filippov035d6592019-07-22 14:30:50 +03001From c10401d8c349610ea9cd29d28f87dd630c907aeb Mon Sep 17 00:00:00 2001
Brad Bishopc9ed7202019-06-14 12:33:18 -04002From: Alexander Filippov <a.filippov@yadro.com>
3Date: Wed, 28 Mar 2018 17:46:28 +0300
4Subject: [PATCH] vesnin: remap aspeed-uart
5
6Remaps UART2 <-> UART3
7
8Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
9---
Alexander Filippov035d6592019-07-22 14:30:50 +030010 drivers/soc/aspeed/aspeed-lpc-ctrl.c | 8 ++++++++
Brad Bishopc9ed7202019-06-14 12:33:18 -040011 1 file changed, 8 insertions(+)
12
Alexander Filippov035d6592019-07-22 14:30:50 +030013diff --git a/drivers/soc/aspeed/aspeed-lpc-ctrl.c b/drivers/soc/aspeed/aspeed-lpc-ctrl.c
14index 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 Bishopc9ed7202019-06-14 12:33:18 -040018
19 #define HICR7 0x8
20 #define HICR8 0xc
21+#define HICRA 0x1c
22
23 struct aspeed_lpc_ctrl {
24 struct miscdevice miscdev;
Alexander Filippov035d6592019-07-22 14:30:50 +030025@@ -271,6 +272,13 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
Brad Bishopc9ed7202019-06-14 12:33:18 -040026 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--
402.20.1
41