]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/spi/spi_flash.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[karo-tx-uboot.git] / drivers / mtd / spi / spi_flash.c
index 6a6fe37e0eea92e27817f47ca6c79c618325612c..5d5055ff38698c1a88ca4279be16b64333e873ab 100644 (file)
@@ -40,12 +40,13 @@ static int spi_flash_read_write(struct spi_slave *spi,
        ret = spi_xfer(spi, cmd_len * 8, cmd, NULL, flags);
        if (ret) {
                debug("SF: Failed to send command (%zu bytes): %d\n",
-                               cmd_len, ret);
+                     cmd_len, ret);
        } else if (data_len != 0) {
-               ret = spi_xfer(spi, data_len * 8, data_out, data_in, SPI_XFER_END);
+               ret = spi_xfer(spi, data_len * 8, data_out, data_in,
+                                       SPI_XFER_END);
                if (ret)
                        debug("SF: Failed to transfer %zu bytes of data: %d\n",
-                                       data_len, ret);
+                             data_len, ret);
        }
 
        return ret;
@@ -86,7 +87,7 @@ int spi_flash_cmd_wait_ready(struct spi_flash *flash, unsigned long timeout)
        ret = spi_xfer(spi, 8, &cmd, NULL, SPI_XFER_BEGIN);
        if (ret) {
                debug("SF: fail to read %s status register\n",
-                       cmd == CMD_READ_STATUS ? "read" : "flag");
+                     cmd == CMD_READ_STATUS ? "read" : "flag");
                return ret;
        }
 
@@ -144,7 +145,7 @@ int spi_flash_write_common(struct spi_flash *flash, const u8 *cmd,
        ret = spi_flash_cmd_wait_ready(flash, timeout);
        if (ret < 0) {
                debug("SF: write %s timed out\n",
-                       timeout == SPI_FLASH_PROG_TIMEOUT ?
+                     timeout == SPI_FLASH_PROG_TIMEOUT ?
                        "program" : "page erase");
                return ret;
        }
@@ -554,12 +555,14 @@ struct spi_flash *spi_flash_probe(unsigned int bus, unsigned int cs,
                goto err_manufacturer_probe;
        }
 #endif
+#ifndef CONFIG_SPL_BUILD
        printf("SF: Detected %s with page size ", flash->name);
        print_size(flash->sector_size, ", total ");
        print_size(flash->size, "");
        if (flash->memory_map)
                printf(", mapped at %p", flash->memory_map);
        puts("\n");
+#endif
 #ifndef CONFIG_SPI_FLASH_BAR
        if (flash->size > SPI_FLASH_16MB_BOUN) {
                puts("SF: Warning - Only lower 16MiB accessible,");