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
102
|
From 9c48970ade244bfc401412e2f21b21ac98b8c158 Mon Sep 17 00:00:00 2001
From: Sudheesh Mavila <sudheesh.mavila@amd.com>
Date: Fri, 1 Jun 2018 10:12:20 +0530
Subject: [PATCH 3454/4131] Revert "amd-i2c : AMD-MP2-I2C changed some debug
logs"
This reverts commit 3b5f67a5d5b073515cdb5fb0ca00f592760f0297.
---
drivers/i2c/busses/i2c-amd-mp2.c | 9 ++++++---
drivers/i2c/busses/pcie_mp2_amd.c | 8 ++++----
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-amd-mp2.c b/drivers/i2c/busses/i2c-amd-mp2.c
index f0fbbf7..d995dd2 100755
--- a/drivers/i2c/busses/i2c-amd-mp2.c
+++ b/drivers/i2c/busses/i2c-amd-mp2.c
@@ -74,13 +74,14 @@ 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_devel("%s:%s virt:%llx phy_addr:%llx\n", DRIVER_NAME, __func__,
+ pr_info("%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);
}
@@ -103,6 +104,7 @@ 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);
}
@@ -125,6 +127,7 @@ 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);
}
@@ -179,12 +182,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_devel(" call the configure\n");
+ pr_err(" 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_devel(" %s:%s dev:%p dev->amd_mp2=%p dev->amd_mp2.pdev:%p\n num =%d",
+ pr_err(" %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 5df729b..a14fc53 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_dbg(ndev_dev(privdata),
+ dev_info(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_dbg(ndev_dev(privdata),
+ dev_info(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_dbg(ndev_dev(privdata),
+ dev_info(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_dbg(ndev_dev(privdata),
+ dev_info(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
|