Commit 26d072e3 authored by Robert Jarzmik's avatar Robert Jarzmik Committed by Brian Norris

mtd: nand: pxa3xx_nand: add register access debug

Add verbose debug for register accesses. This enables easier debugging
by following where and how hardware is stimulated, and how it answers.
Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Acked-by: default avatarEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 02c3b0bd
......@@ -132,10 +132,22 @@
/* macros for registers read/write */
#define nand_writel(info, off, val) \
writel_relaxed((val), (info)->mmio_base + (off))
do { \
dev_vdbg(&info->pdev->dev, \
"%s():%d nand_writel(0x%x, 0x%04x)\n", \
__func__, __LINE__, (val), (off)); \
writel_relaxed((val), (info)->mmio_base + (off)); \
} while (0)
#define nand_readl(info, off) \
readl_relaxed((info)->mmio_base + (off))
({ \
unsigned int _v; \
_v = readl_relaxed((info)->mmio_base + (off)); \
dev_vdbg(&info->pdev->dev, \
"%s():%d nand_readl(0x%04x) = 0x%x\n", \
__func__, __LINE__, (off), _v); \
_v; \
})
/* error code and state */
enum {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment