spi: sh_qspi: Replace data types with short ones
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Tue, 10 Apr 2018 14:47:38 +0000 (16:47 +0200)
committerMarek Vasut <marex@denx.de>
Wed, 11 Apr 2018 21:19:50 +0000 (23:19 +0200)
Just replace unsigned {char,short,long} with u{8,16,32},
no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
drivers/spi/sh_qspi.c

index 75999c812d5152ddf070f0a3756c90c2dcee44e3..fc0e1fc336f0c24e4a17c84953cd25a0c90db19e 100644 (file)
 
 /* SH QSPI register set */
 struct sh_qspi_regs {
-       unsigned char spcr;
-       unsigned char sslp;
-       unsigned char sppcr;
-       unsigned char spsr;
-       unsigned long spdr;
-       unsigned char spscr;
-       unsigned char spssr;
-       unsigned char spbr;
-       unsigned char spdcr;
-       unsigned char spckd;
-       unsigned char sslnd;
-       unsigned char spnd;
-       unsigned char dummy0;
-       unsigned short spcmd0;
-       unsigned short spcmd1;
-       unsigned short spcmd2;
-       unsigned short spcmd3;
-       unsigned char spbfcr;
-       unsigned char dummy1;
-       unsigned short spbdcr;
-       unsigned long spbmul0;
-       unsigned long spbmul1;
-       unsigned long spbmul2;
-       unsigned long spbmul3;
+       u8      spcr;
+       u8      sslp;
+       u8      sppcr;
+       u8      spsr;
+       u32     spdr;
+       u8      spscr;
+       u8      spssr;
+       u8      spbr;
+       u8      spdcr;
+       u8      spckd;
+       u8      sslnd;
+       u8      spnd;
+       u8      dummy0;
+       u16     spcmd0;
+       u16     spcmd1;
+       u16     spcmd2;
+       u16     spcmd3;
+       u8      spbfcr;
+       u8      dummy1;
+       u16     spbdcr;
+       u32     spbmul0;
+       u32     spbmul1;
+       u32     spbmul2;
+       u32     spbmul3;
 };
 
 struct sh_qspi_slave {
@@ -200,11 +200,11 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
             void *din, unsigned long flags)
 {
        struct sh_qspi_slave *ss = to_sh_qspi(slave);
-       unsigned long nbyte;
+       u32 nbyte;
        int ret = 0;
-       unsigned char dtdata = 0, drdata;
-       unsigned char *tdata = &dtdata, *rdata = &drdata;
-       unsigned long *spbmul0 = &ss->regs->spbmul0;
+       u8 dtdata = 0, drdata;
+       u8 *tdata = &dtdata, *rdata = &drdata;
+       u32 *spbmul0 = &ss->regs->spbmul0;
 
        if (dout == NULL && din == NULL) {
                if (flags & SPI_XFER_END)
@@ -230,7 +230,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
                writel(nbyte, spbmul0);
 
        if (dout != NULL)
-               tdata = (unsigned char *)dout;
+               tdata = (u8 *)dout;
 
        if (din != NULL)
                rdata = din;
@@ -244,7 +244,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
                        udelay(10);
                }
 
-               writeb(*tdata, (unsigned char *)(&ss->regs->spdr));
+               writeb(*tdata, (u8 *)(&ss->regs->spdr));
 
                while ((readw(&ss->regs->spbdcr) != SPBDCR_RXBC0)) {
                        if (ctrlc()) {
@@ -262,7 +262,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
                        udelay(10);
                }
 
-               *rdata = readb((unsigned char *)(&ss->regs->spdr));
+               *rdata = readb((u8 *)(&ss->regs->spdr));
 
                if (dout != NULL)
                        tdata++;