From 03d0d0a25e8da1bee8f300d072fcb19805a69b7b Mon Sep 17 00:00:00 2001 From: Youngmin Nam Date: Thu, 26 May 2016 14:28:20 +0900 Subject: [PATCH] [COMMON] spi: s3c64xx: optimize SPI controller reigster dump routine This patch decrease the number of calls of dev_err in register dump routine. Change-Id: Ib81c94163506de3338a5f299edadc8acac113036 Signed-off-by: Youngmin Nam --- drivers/spi/spi-s3c64xx.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 62cc3e84b0a8..4d2053bd5a03 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -233,17 +233,18 @@ static void s3c64xx_spi_dump_reg(struct s3c64xx_spi_driver_data *sdd) void __iomem *regs = sdd->regs; struct device *dev = &sdd->pdev->dev; - dev_err(dev, "Register dump for SPI\n"); - dev_err(dev, "- CH_CFG 0x%08x\n", - readl(regs + S3C64XX_SPI_CH_CFG)); - dev_err(dev, "- MODE_CFG 0x%08x\n", - readl(regs + S3C64XX_SPI_MODE_CFG)); - dev_err(dev, "- CS_REG 0x%08x\n", - readl(regs + S3C64XX_SPI_SLAVE_SEL)); - dev_err(dev, "- STATUS 0x%08x\n", - readl(regs + S3C64XX_SPI_STATUS)); - dev_err(dev, "- PACKET_CNT 0x%08x\n", - readl(regs + S3C64XX_SPI_PACKET_CNT)); + dev_err(dev, "Register dump for SPI\n" + " CH_CFG 0x%08x\n" + " MODE_CFG 0x%08x\n" + " CS_REG 0x%08x\n" + " STATUS 0x%08x\n" + " PACKET_CNT 0x%08x\n" + , readl(regs + S3C64XX_SPI_CH_CFG) + , readl(regs + S3C64XX_SPI_MODE_CFG) + , readl(regs + S3C64XX_SPI_SLAVE_SEL) + , readl(regs + S3C64XX_SPI_STATUS) + , readl(regs + S3C64XX_SPI_PACKET_CNT) + ); } static void flush_fifo(struct s3c64xx_spi_driver_data *sdd) -- 2.20.1