X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fspi%2Flpc32xx_ssp.c;h=ce12eee65715890429258b81aaef45cbf16521fe;hb=266580612f16a4a45cced1bede7191b56ad4afd4;hp=c5b766c0dd003cc86a38c8ba041b95cfc960b3d3;hpb=ffb96d55d13759a7e4fe4ba5fc5e3eb6fac11738;p=u-boot diff --git a/drivers/spi/lpc32xx_ssp.c b/drivers/spi/lpc32xx_ssp.c index c5b766c0dd..ce12eee657 100644 --- a/drivers/spi/lpc32xx_ssp.c +++ b/drivers/spi/lpc32xx_ssp.c @@ -1,10 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * LPC32xx SSP interface (SPI mode) * * (C) Copyright 2014 DENX Software Engineering GmbH * Written-by: Albert ARIBAUD - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -66,17 +65,17 @@ struct spi_slave *spi_setup_slave(uint bus, uint cs, uint max_hz, uint mode) /* we only set up SSP0 for now, so ignore bus */ if (mode & SPI_3WIRE) { - error("3-wire mode not supported"); + pr_err("3-wire mode not supported"); return NULL; } if (mode & SPI_SLAVE) { - error("slave mode not supported\n"); + pr_err("slave mode not supported\n"); return NULL; } if (mode & SPI_PREAMBLE) { - error("preamble byte skipping not supported\n"); + pr_err("preamble byte skipping not supported\n"); return NULL; } @@ -130,7 +129,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, int status = readl(&lslave->regs->sr); if ((idx_out < bytelen) && (status & SSP_SR_TNF)) writel(((u8 *)dout)[idx_out++], &lslave->regs->data); - if ((idx_in < bytelen) && (status & status & SSP_SR_RNE)) + if ((idx_in < bytelen) && (status & SSP_SR_RNE)) ((u8 *)din)[idx_in++] = readl(&lslave->regs->data); if (get_timer(start_time) >= CONFIG_LPC32XX_SSP_TIMEOUT) return -1;