diff options
author | Mario Six <mario.six@gdsys.cc> | 2019-04-29 01:58:37 +0530 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2019-06-10 17:59:48 +0530 |
commit | d93fe31020d138ca5f4fc1c8afce5acb8f724823 (patch) | |
tree | 6515b1f2b9aca43f79d0c5e920cc03fb2a9bc0fb /drivers/spi/mpc8xxx_spi.c | |
parent | d896b7baa1e393cfa9503e03aeebf8de5ffec97e (diff) |
spi: mpc8xxx: Fix comments
There are some comments on the same line as the code they document. Put
comments above the code lines they document, so the line length is not
unnecessarily increased.
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers/spi/mpc8xxx_spi.c')
-rw-r--r-- | drivers/spi/mpc8xxx_spi.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 0c77f95159..3016cfe2ca 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/spi/mpc8xxx_spi.c @@ -53,11 +53,14 @@ void spi_init(void) * some registers */ spi->mode = SPI_MODE_REV | SPI_MODE_MS | SPI_MODE_EN; - spi->mode = (spi->mode & 0xfff0ffff) | BIT(16); /* Use SYSCLK / 8 - (16.67MHz typ.) */ - spi->event = 0xffffffff; /* Clear all SPI events */ - spi->mask = 0x00000000; /* Mask all SPI interrupts */ - spi->com = 0; /* LST bit doesn't do anything, so disregard */ + /* Use SYSCLK / 8 (16.67MHz typ.) */ + spi->mode = (spi->mode & 0xfff0ffff) | BIT(16); + /* Clear all SPI events */ + spi->event = 0xffffffff; + /* Mask all SPI interrupts */ + spi->mask = 0x00000000; + /* LST bit doesn't do anything, so disregard */ + spi->com = 0; } int spi_claim_bus(struct spi_slave *slave) @@ -84,9 +87,10 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, if (flags & SPI_XFER_BEGIN) spi_cs_activate(slave); - spi->event = 0xffffffff; /* Clear all SPI events */ + /* Clear all SPI events */ + spi->event = 0xffffffff; - /* handle data in 32-bit chunks */ + /* Handle data in 32-bit chunks */ while (numBlks--) { tmpdout = 0; charSize = (bitlen >= 32 ? 32 : bitlen); @@ -120,7 +124,9 @@ int spi_xfer(struct spi_slave *slave, uint bitlen, const void *dout, void *din, spi->mode |= SPI_MODE_EN; - spi->tx = tmpdout; /* Write the data out */ + /* Write the data out */ + spi->tx = tmpdout; + debug("*** spi_xfer: ... %08x written\n", tmpdout); /* |