]> git.sur5r.net Git - u-boot/blobdiff - drivers/spi/mxc_spi.c
spi: xilinx: Move timeout calculation out of the loop
[u-boot] / drivers / spi / mxc_spi.c
index 9c68d7d29ffe32b08936d8316175cdd1158876b6..95dd03f7b3ff5ab43d33a37a2a8c1f495e2ae82a 100644 (file)
@@ -1,21 +1,7 @@
 /*
  * Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de>
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -269,8 +255,8 @@ int spi_xchg_single(struct spi_slave *slave, unsigned int bitlen,
                        } else {
                                data = *(u32 *)dout;
                                data = cpu_to_be32(data);
+                               dout += 4;
                        }
-                       dout += 4;
                }
                debug("Sending SPI 0x%x\n", data);
                reg_write(&regs->txdata, data);