[COMMON] spi: s3c64xx: optimize SPI controller reigster dump routine
authorYoungmin Nam <youngmin.nam@samsung.com>
Thu, 26 May 2016 05:28:20 +0000 (14:28 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Wed, 9 May 2018 12:14:45 +0000 (21:14 +0900)
This patch decrease the number of calls of dev_err in register dump routine.

Change-Id: Ib81c94163506de3338a5f299edadc8acac113036
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
drivers/spi/spi-s3c64xx.c

index 62cc3e84b0a85eaaa9fb6cff50afdd58011c68ed..4d2053bd5a038ee2343fc3875bbfca179fae0b39 100644 (file)
@@ -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)