mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
spi: spi-s3c64xx: Add missing s3c64xx_ prefix to function names
Add a s3c64xx_ prefix to remaining generic function names so it is clear the code is part of the driver when grepping or looking at debug logs. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Reviewed-by: Andi Shyti <andi@etezian.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
80aa0d746c
commit
3655d30c05
@ -188,7 +188,7 @@ struct s3c64xx_spi_driver_data {
|
|||||||
unsigned int port_id;
|
unsigned int port_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void flush_fifo(struct s3c64xx_spi_driver_data *sdd)
|
static void s3c64xx_flush_fifo(struct s3c64xx_spi_driver_data *sdd)
|
||||||
{
|
{
|
||||||
void __iomem *regs = sdd->regs;
|
void __iomem *regs = sdd->regs;
|
||||||
unsigned long loops;
|
unsigned long loops;
|
||||||
@ -348,8 +348,8 @@ static bool s3c64xx_spi_can_dma(struct spi_master *master,
|
|||||||
return xfer->len > (FIFO_LVL_MASK(sdd) >> 1) + 1;
|
return xfer->len > (FIFO_LVL_MASK(sdd) >> 1) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void enable_datapath(struct s3c64xx_spi_driver_data *sdd,
|
static void s3c64xx_enable_datapath(struct s3c64xx_spi_driver_data *sdd,
|
||||||
struct spi_transfer *xfer, int dma_mode)
|
struct spi_transfer *xfer, int dma_mode)
|
||||||
{
|
{
|
||||||
void __iomem *regs = sdd->regs;
|
void __iomem *regs = sdd->regs;
|
||||||
u32 modecfg, chcfg;
|
u32 modecfg, chcfg;
|
||||||
@ -439,8 +439,8 @@ static u32 s3c64xx_spi_wait_for_timeout(struct s3c64xx_spi_driver_data *sdd,
|
|||||||
return RX_FIFO_LVL(status, sdd);
|
return RX_FIFO_LVL(status, sdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wait_for_dma(struct s3c64xx_spi_driver_data *sdd,
|
static int s3c64xx_wait_for_dma(struct s3c64xx_spi_driver_data *sdd,
|
||||||
struct spi_transfer *xfer)
|
struct spi_transfer *xfer)
|
||||||
{
|
{
|
||||||
void __iomem *regs = sdd->regs;
|
void __iomem *regs = sdd->regs;
|
||||||
unsigned long val;
|
unsigned long val;
|
||||||
@ -482,8 +482,8 @@ static int wait_for_dma(struct s3c64xx_spi_driver_data *sdd,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wait_for_pio(struct s3c64xx_spi_driver_data *sdd,
|
static int s3c64xx_wait_for_pio(struct s3c64xx_spi_driver_data *sdd,
|
||||||
struct spi_transfer *xfer)
|
struct spi_transfer *xfer)
|
||||||
{
|
{
|
||||||
void __iomem *regs = sdd->regs;
|
void __iomem *regs = sdd->regs;
|
||||||
unsigned long val;
|
unsigned long val;
|
||||||
@ -666,7 +666,7 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
|
|||||||
sdd->state &= ~RXBUSY;
|
sdd->state &= ~RXBUSY;
|
||||||
sdd->state &= ~TXBUSY;
|
sdd->state &= ~TXBUSY;
|
||||||
|
|
||||||
enable_datapath(sdd, xfer, use_dma);
|
s3c64xx_enable_datapath(sdd, xfer, use_dma);
|
||||||
|
|
||||||
/* Start the signals */
|
/* Start the signals */
|
||||||
s3c64xx_spi_set_cs(spi, true);
|
s3c64xx_spi_set_cs(spi, true);
|
||||||
@ -674,9 +674,9 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
|
|||||||
spin_unlock_irqrestore(&sdd->lock, flags);
|
spin_unlock_irqrestore(&sdd->lock, flags);
|
||||||
|
|
||||||
if (use_dma)
|
if (use_dma)
|
||||||
status = wait_for_dma(sdd, xfer);
|
status = s3c64xx_wait_for_dma(sdd, xfer);
|
||||||
else
|
else
|
||||||
status = wait_for_pio(sdd, xfer);
|
status = s3c64xx_wait_for_pio(sdd, xfer);
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
dev_err(&spi->dev, "I/O Error: rx-%d tx-%d res:rx-%c tx-%c len-%d\n",
|
dev_err(&spi->dev, "I/O Error: rx-%d tx-%d res:rx-%c tx-%c len-%d\n",
|
||||||
@ -694,7 +694,7 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master,
|
|||||||
dmaengine_terminate_all(sdd->rx_dma.ch);
|
dmaengine_terminate_all(sdd->rx_dma.ch);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flush_fifo(sdd);
|
s3c64xx_flush_fifo(sdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -928,7 +928,7 @@ static void s3c64xx_spi_hwinit(struct s3c64xx_spi_driver_data *sdd)
|
|||||||
val |= (S3C64XX_SPI_TRAILCNT << S3C64XX_SPI_TRAILCNT_OFF);
|
val |= (S3C64XX_SPI_TRAILCNT << S3C64XX_SPI_TRAILCNT_OFF);
|
||||||
writel(val, regs + S3C64XX_SPI_MODE_CFG);
|
writel(val, regs + S3C64XX_SPI_MODE_CFG);
|
||||||
|
|
||||||
flush_fifo(sdd);
|
s3c64xx_flush_fifo(sdd);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user