[PATCH linux dev-4.7 4/8] mtd: spi-nor: aspeed: add some logging

Cédric Le Goater clg at kaod.org
Sat Nov 5 04:00:43 AEDT 2016


Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 drivers/mtd/spi-nor/aspeed-smc.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/spi-nor/aspeed-smc.c b/drivers/mtd/spi-nor/aspeed-smc.c
index a26fed33c4b4..ca213f67c486 100644
--- a/drivers/mtd/spi-nor/aspeed-smc.c
+++ b/drivers/mtd/spi-nor/aspeed-smc.c
@@ -748,8 +748,6 @@ static void aspeed_smc_chip_enable_write(struct aspeed_smc_chip *chip)
 	u32 reg;
 
 	reg = readl(controller->regs + CONFIG_REG);
-	dev_dbg(controller->dev, "config reg @%p: 0x%08x\n",
-		controller->regs + CONFIG_REG, reg);
 
 	reg |= aspeed_smc_chip_write_bit(chip);
 	writel(reg, controller->regs + CONFIG_REG);
@@ -761,8 +759,6 @@ static void aspeed_smc_chip_set_type(struct aspeed_smc_chip *chip, int type)
 	u32 reg;
 
 	reg = readl(controller->regs + CONFIG_REG);
-	dev_dbg(controller->dev, "config reg @%p: 0x%08x\n",
-		controller->regs + CONFIG_REG, reg);
 
 	chip->type = type;
 
@@ -856,6 +852,8 @@ static int aspeed_smc_chip_setup_init(struct aspeed_smc_chip *chip,
 		chip->ctl_val[smc_read] = chip->ctl_val[smc_base] |
 			CONTROL_SPI_COMMAND_MODE_NORMAL;
 
+	dev_dbg(controller->dev, "default control register: %08x\n",
+		 chip->ctl_val[smc_read]);
 	return 0;
 }
 
@@ -868,6 +866,9 @@ static void aspeed_smc_chip_setup_finish(struct aspeed_smc_chip *chip)
 		spi_control_fill_opcode(chip->nor.program_opcode) |
 		CONTROL_SPI_COMMAND_MODE_WRITE;
 
+	dev_dbg(controller->dev, "write control register: %08x\n",
+		 chip->ctl_val[smc_write]);
+
 	/*
 	 * XXX TODO
 	 * Enable fast read mode as required here.
-- 
2.7.4



More information about the openbmc mailing list