aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1358-amd-i2c-AMD-MP2-I2C-changed-some-debug-logs.patch
blob: 3b7ca07e3329804aa232d90b123996efc4ef6500 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
From 5dd601330a8f27d0be3aeab0c0492290139943ea Mon Sep 17 00:00:00 2001
From: Sudheesh Mavila <sudheesh.mavila@amd.com>
Date: Fri, 2 Mar 2018 11:44:19 +0530
Subject: [PATCH 1358/4131] amd-i2c : AMD-MP2-I2C changed some debug logs

Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
---
 drivers/i2c/busses/i2c-amd-mp2.c  | 9 +++------
 drivers/i2c/busses/pcie_mp2_amd.c | 8 ++++----
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/i2c/busses/i2c-amd-mp2.c b/drivers/i2c/busses/i2c-amd-mp2.c
index d995dd2..f0fbbf7 100755
--- a/drivers/i2c/busses/i2c-amd-mp2.c
+++ b/drivers/i2c/busses/i2c-amd-mp2.c
@@ -74,14 +74,13 @@ static int read_completion(union i2c_event_base event, void *dev_ctx)
 		} else {
 			memcpy(i2c_dev->msg_buf->buf,
 					(unsigned char *)dev->i2c_read_config.buf, event.r.length);
-			pr_info("%s:%s virt:%llx phy_addr:%llx\n", DRIVER_NAME, __func__,
+			pr_devel("%s:%s virt:%llx phy_addr:%llx\n", DRIVER_NAME, __func__,
 					(u64)dev->i2c_read_config.buf,
 					(u64)dev->i2c_read_config.phy_addr);
 			for (i = 0; i < ((event.r.length + 3) / 4); i++)
 				pr_devel("%s:%s readdata:%x\n", DRIVER_NAME, __func__,
 						((unsigned int *)dev->i2c_read_config.buf)[i]);
 		}
-		pr_info("%s:%s success\n", DRIVER_NAME, __func__);
 		complete(&i2c_dev->msg_complete);
 	}
 
@@ -104,7 +103,6 @@ static int write_completion(union i2c_event_base event, void *dev_ctx)
 	}
 
 	if (event.r.status == i2c_writecomplete_event) {
-		pr_info("%s:%s success\n", DRIVER_NAME, __func__);
 		complete(&i2c_dev->msg_complete);
 	}
 
@@ -127,7 +125,6 @@ static int connect_completion(union i2c_event_base event, void *dev_ctx)
 	}
 
 	if (event.r.status == i2c_busenable_complete) {
-		pr_info("%s:%s success\n", DRIVER_NAME, __func__);
 		complete(&i2c_dev->msg_complete);
 	}
 
@@ -182,12 +179,12 @@ static int amd_mp2_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 	reinit_completion(&dev->msg_complete);
 
 	if (dev->is_configured == 0) {
-		pr_err(" call the configure\n");
+		pr_devel(" call the configure\n");
 		mp2_i2c_pci_configure(dev, msgs->addr);
 		timeout = wait_for_completion_timeout(&dev->msg_complete, 50);
 		dev->is_configured = 1;
 	}
-	pr_err(" %s:%s dev:%p dev->amd_mp2=%p  dev->amd_mp2.pdev:%p\n num =%d",
+	pr_devel(" %s:%s dev:%p dev->amd_mp2=%p  dev->amd_mp2.pdev:%p\n num =%d",
 			DRIVER_NAME, __func__, dev, &dev->amd_mp2, dev->amd_mp2.pdev, num);
 
 	for (i = 0; i < num; i++) {
diff --git a/drivers/i2c/busses/pcie_mp2_amd.c b/drivers/i2c/busses/pcie_mp2_amd.c
index a14fc53..5df729b 100755
--- a/drivers/i2c/busses/pcie_mp2_amd.c
+++ b/drivers/i2c/busses/pcie_mp2_amd.c
@@ -154,13 +154,13 @@ int amd_i2c_read(struct pci_dev *dev, struct i2c_read_config i2c_read_config)
 	}
 
 	if (i2c_cmd_base.s.bus_id == I2C_BUS_1) {
-		dev_info(ndev_dev(privdata),
+		dev_dbg(ndev_dev(privdata),
 				"%s !==== writing:%x ====! at busid:%d reg:%llx len:%d\n",
 				__func__, i2c_cmd_base.ul, i2c_cmd_base.s.bus_id,
 				(u64)privdata->mmio + AMD_C2P_MSG1, i2c_cmd_base.s.length);
 		writel(i2c_cmd_base.ul, privdata->mmio + AMD_C2P_MSG1);
 	} else if (i2c_cmd_base.s.bus_id == I2C_BUS_0) {
-		dev_info(ndev_dev(privdata),
+		dev_dbg(ndev_dev(privdata),
 				"%s !==== writing:%x ====! at busid:%d reg:%llx len:%d\n",
 				__func__, i2c_cmd_base.ul, i2c_cmd_base.s.bus_id,
 				(u64)privdata->mmio + AMD_C2P_MSG0, i2c_cmd_base.s.length);
@@ -231,13 +231,13 @@ int amd_i2c_write(struct pci_dev *dev, struct i2c_write_config i2c_write_config)
 	}
 
 	if (i2c_cmd_base.s.bus_id == I2C_BUS_1) {
-		dev_info(ndev_dev(privdata),
+		dev_dbg(ndev_dev(privdata),
 				"%s <==== writing:%x ====> at busid:%d reg:%llx len:%d\n",
 				__func__, i2c_cmd_base.ul, i2c_cmd_base.s.bus_id,
 				(u64)privdata->mmio + AMD_C2P_MSG0, i2c_cmd_base.s.length);
 		writel(i2c_cmd_base.ul, privdata->mmio + AMD_C2P_MSG1);
 	} else if (i2c_cmd_base.s.bus_id == I2C_BUS_0) {
-		dev_info(ndev_dev(privdata),
+		dev_dbg(ndev_dev(privdata),
 				"%s <==== writing:%x ====> at busid:%d reg:%llx len:%d\n",
 				__func__, i2c_cmd_base.ul, i2c_cmd_base.s.bus_id,
 				(u64)privdata->mmio + AMD_C2P_MSG0, i2c_cmd_base.s.length);
-- 
2.7.4