diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2012-08-05 09:05:31 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-09-01 14:58:17 +0200 |
commit | 9c471142bc6c5aa01532ba85ead8509bbf2eb153 (patch) | |
tree | 31f9e67e6c63a7abf63997bb9542fbd3075a61da /drivers/spi | |
parent | ddcf13b15231ee2dca99285349b143c365ce5173 (diff) | |
download | u-boot-imx-9c471142bc6c5aa01532ba85ead8509bbf2eb153.zip u-boot-imx-9c471142bc6c5aa01532ba85ead8509bbf2eb153.tar.gz u-boot-imx-9c471142bc6c5aa01532ba85ead8509bbf2eb153.tar.bz2 |
mxs: prefix register structs with 'mxs' prefix
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/mxs_spi.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c index 4ff8474..bd834fb 100644 --- a/drivers/spi/mxs_spi.c +++ b/drivers/spi/mxs_spi.c @@ -55,7 +55,7 @@ struct mxs_spi_slave { struct spi_slave slave; uint32_t max_khz; uint32_t mode; - struct mx28_ssp_regs *regs; + struct mxs_ssp_regs *regs; struct mxs_dma_desc *desc; }; @@ -82,7 +82,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, { struct mxs_spi_slave *mxs_slave; uint32_t addr; - struct mx28_ssp_regs *ssp_regs; + struct mxs_ssp_regs *ssp_regs; int reg; struct mxs_dma_desc *desc; @@ -108,7 +108,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, mxs_slave->slave.cs = cs; mxs_slave->max_khz = max_hz / 1000; mxs_slave->mode = mode; - mxs_slave->regs = (struct mx28_ssp_regs *)addr; + mxs_slave->regs = (struct mxs_ssp_regs *)addr; mxs_slave->desc = desc; ssp_regs = mxs_slave->regs; @@ -136,7 +136,7 @@ void spi_free_slave(struct spi_slave *slave) int spi_claim_bus(struct spi_slave *slave) { struct mxs_spi_slave *mxs_slave = to_mxs_slave(slave); - struct mx28_ssp_regs *ssp_regs = mxs_slave->regs; + struct mxs_ssp_regs *ssp_regs = mxs_slave->regs; uint32_t reg = 0; mx28_reset_block(&ssp_regs->hw_ssp_ctrl0_reg); @@ -159,13 +159,13 @@ void spi_release_bus(struct spi_slave *slave) { } -static void mxs_spi_start_xfer(struct mx28_ssp_regs *ssp_regs) +static void mxs_spi_start_xfer(struct mxs_ssp_regs *ssp_regs) { writel(SSP_CTRL0_LOCK_CS, &ssp_regs->hw_ssp_ctrl0_set); writel(SSP_CTRL0_IGNORE_CRC, &ssp_regs->hw_ssp_ctrl0_clr); } -static void mxs_spi_end_xfer(struct mx28_ssp_regs *ssp_regs) +static void mxs_spi_end_xfer(struct mxs_ssp_regs *ssp_regs) { writel(SSP_CTRL0_LOCK_CS, &ssp_regs->hw_ssp_ctrl0_clr); writel(SSP_CTRL0_IGNORE_CRC, &ssp_regs->hw_ssp_ctrl0_set); @@ -174,7 +174,7 @@ static void mxs_spi_end_xfer(struct mx28_ssp_regs *ssp_regs) static int mxs_spi_xfer_pio(struct mxs_spi_slave *slave, char *data, int length, int write, unsigned long flags) { - struct mx28_ssp_regs *ssp_regs = slave->regs; + struct mxs_ssp_regs *ssp_regs = slave->regs; if (flags & SPI_XFER_BEGIN) mxs_spi_start_xfer(ssp_regs); @@ -223,14 +223,13 @@ static int mxs_spi_xfer_pio(struct mxs_spi_slave *slave, } return 0; - } static int mxs_spi_xfer_dma(struct mxs_spi_slave *slave, char *data, int length, int write, unsigned long flags) { struct mxs_dma_desc *desc = slave->desc; - struct mx28_ssp_regs *ssp_regs = slave->regs; + struct mxs_ssp_regs *ssp_regs = slave->regs; uint32_t ctrl0 = SSP_CTRL0_DATA_XFER; uint32_t cache_data_count; int dmach; @@ -289,7 +288,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, void *din, unsigned long flags) { struct mxs_spi_slave *mxs_slave = to_mxs_slave(slave); - struct mx28_ssp_regs *ssp_regs = mxs_slave->regs; + struct mxs_ssp_regs *ssp_regs = mxs_slave->regs; int len = bitlen / 8; char dummy; int write = 0; |