aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorHiroshi DOYU <hdoyu@nvidia.com>2012-05-14 06:07:03 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-14 11:47:11 -0400
commit90394482b807cb0a474fb387ed020603df14cfd0 (patch)
tree7432a9448c9451b7c6050afa7b8bc094a02310e1 /drivers/memory
parent6ca045930338485a8cdef117e74372aa1678009d (diff)
memory: tegra{20,30}-mc: Use dev_err_ratelimited()
Introduce a new dev_*_ratelimited() instead of pr_*_ratelimited() for better info to print. Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/tegra20-mc.c5
-rw-r--r--drivers/memory/tegra30-mc.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/memory/tegra20-mc.c b/drivers/memory/tegra20-mc.c
index 2a437e92756c..a38d9d3de231 100644
--- a/drivers/memory/tegra20-mc.c
+++ b/drivers/memory/tegra20-mc.c
@@ -161,7 +161,8 @@ static void tegra20_mc_decode(struct tegra20_mc *mc, int n)
161 161
162 idx = n - MC_INT_ERR_SHIFT; 162 idx = n - MC_INT_ERR_SHIFT;
163 if ((idx < 0) || (idx >= ARRAY_SIZE(reg))) { 163 if ((idx < 0) || (idx >= ARRAY_SIZE(reg))) {
164 pr_err_ratelimited("Unknown interrupt status %08lx\n", BIT(n)); 164 dev_err_ratelimited(mc->dev, "Unknown interrupt status %08lx\n",
165 BIT(n));
165 return; 166 return;
166 } 167 }
167 168
@@ -172,7 +173,7 @@ static void tegra20_mc_decode(struct tegra20_mc *mc, int n)
172 173
173 addr = mc_readl(mc, reg[idx].offset + sizeof(u32)); 174 addr = mc_readl(mc, reg[idx].offset + sizeof(u32));
174 175
175 pr_err_ratelimited("%s (0x%08x): 0x%08x %s (%s %s)\n", 176 dev_err_ratelimited(mc->dev, "%s (0x%08x): 0x%08x %s (%s %s)\n",
176 reg[idx].message, req, addr, client, 177 reg[idx].message, req, addr, client,
177 (req & BIT(reg[idx].write_bit)) ? "write" : "read", 178 (req & BIT(reg[idx].write_bit)) ? "write" : "read",
178 (reg[idx].offset == MC_SECURITY_VIOLATION_STATUS) ? 179 (reg[idx].offset == MC_SECURITY_VIOLATION_STATUS) ?
diff --git a/drivers/memory/tegra30-mc.c b/drivers/memory/tegra30-mc.c
index ec9fc7894801..cb639b1cd5e9 100644
--- a/drivers/memory/tegra30-mc.c
+++ b/drivers/memory/tegra30-mc.c
@@ -220,7 +220,8 @@ static void tegra30_mc_decode(struct tegra30_mc *mc, int n)
220 220
221 idx = n - MC_INT_ERR_SHIFT; 221 idx = n - MC_INT_ERR_SHIFT;
222 if ((idx < 0) || (idx >= ARRAY_SIZE(mc_int_err)) || (idx == 1)) { 222 if ((idx < 0) || (idx >= ARRAY_SIZE(mc_int_err)) || (idx == 1)) {
223 pr_err_ratelimited("Unknown interrupt status %08lx\n", BIT(n)); 223 dev_err_ratelimited(mc->dev, "Unknown interrupt status %08lx\n",
224 BIT(n));
224 return; 225 return;
225 } 226 }
226 227
@@ -243,7 +244,7 @@ static void tegra30_mc_decode(struct tegra30_mc *mc, int n)
243 244
244 addr = readl(mc + MC_ERR_ADR); 245 addr = readl(mc + MC_ERR_ADR);
245 246
246 pr_err_ratelimited("%s (0x%08x): 0x%08x %s (%s %s %s %s)\n", 247 dev_err_ratelimited(mc->dev, "%s (0x%08x): 0x%08x %s (%s %s %s %s)\n",
247 mc_int_err[idx], err, addr, client, 248 mc_int_err[idx], err, addr, client,
248 (err & MC_ERR_SECURITY) ? "secure" : "non-secure", 249 (err & MC_ERR_SECURITY) ? "secure" : "non-secure",
249 (err & MC_ERR_RW) ? "write" : "read", 250 (err & MC_ERR_RW) ? "write" : "read",