X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fspi%2Fmpc8xxx_spi.c;h=8d6d86d2b0a1728aaf832b321b9e2352b4d72b5f;hb=6189f76ae8fb3549349443d1d702d3d652d1244b;hp=348361a7fd078d1cbcc5f1a0f926faa2a7173c03;hpb=0daa1f698593fface63eacae7897fabe42cfd28e;p=u-boot diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 348361a7fd..8d6d86d2b0 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/spi/mpc8xxx_spi.c @@ -1,8 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (c) 2006 Ben Warren, Qstreams Networks Inc. * With help from the common/soft_spi and arch/powerpc/cpu/mpc8260 drivers - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -55,7 +54,7 @@ void spi_init(void) * some registers */ spi->mode = SPI_MODE_REV | SPI_MODE_MS | SPI_MODE_EN; - spi->mode = (spi->mode & 0xfff0ffff) | (1 << 16); /* Use SYSCLK / 8 + 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 */ @@ -110,10 +109,10 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, if (bitlen <= 16) { if (bitlen <= 4) spi->mode = (spi->mode & 0xff0fffff) | - (3 << 20); + (3 << 20); else spi->mode = (spi->mode & 0xff0fffff) | - ((bitlen - 1) << 20); + ((bitlen - 1) << 20); } else { spi->mode = (spi->mode & 0xff0fffff); /* Set up the next iteration if sending > 32 bits */