Log messages about claimed sram.
Signed-off-by: Michal Suchanek <[email protected]>
---
drivers/soc/sunxi/sunxi_sram.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c
index 5b76fd1..f2bce8e 100644
--- a/drivers/soc/sunxi/sunxi_sram.c
+++ b/drivers/soc/sunxi/sunxi_sram.c
@@ -35,6 +35,8 @@ struct sunxi_sram_desc {
bool enabled;
};
+static struct device *dev;
+
#define SUNXI_SRAM_MAP(_val, _func) \
{ \
.func = _func, \
@@ -127,11 +129,13 @@ int sunxi_sram_claim(enum sunxi_sram_type type, const
char *function)
if (sram->claimed) {
spin_unlock(&sram_lock);
+ dev_warn(dev, "Sram %s already claimed.\n", sram->name
);
return -EBUSY;
}
sram->claimed = true;
spin_unlock(&sram_lock);
+ dev_dbg(dev, "Claiming sram %s for %s.\n", sram->name, function
);
for (func = sram->func; func->func; func++) {
if (strcmp(function, func->func))
@@ -164,6 +168,7 @@ int sunxi_sram_release(enum sunxi_sram_type type)
spin_lock(&sram_lock);
sram->claimed = false;
spin_unlock(&sram_lock);
+ dev_dbg(dev, "Releasing sram %s.\n", sram->name );
return 0;
}
@@ -212,6 +217,7 @@ static int sunxi_sram_probe(struct platform_device *pdev)
sram->enabled = true;
}
+ dev = &pdev->dev;
d = debugfs_create_file("sram", S_IRUGO, NULL, NULL,
&sunxi_sram_fops);
--
2.1.4
--
You received this message because you are subscribed to the Google Groups
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.