mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
sf: Fix code cleanups
- CHECK: Alignment should match open parenthesis - trailing whitespace Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
This commit is contained in:
parent
402ba1e3a0
commit
5928b9a865
8 changed files with 16 additions and 15 deletions
|
@ -252,7 +252,7 @@ static int dataflash_write_p2(struct spi_flash *flash,
|
||||||
}
|
}
|
||||||
|
|
||||||
debug("SF: AT45: Successfully programmed %zu bytes @ 0x%x\n",
|
debug("SF: AT45: Successfully programmed %zu bytes @ 0x%x\n",
|
||||||
len, offset);
|
len, offset);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
@ -325,7 +325,7 @@ static int dataflash_write_at45(struct spi_flash *flash,
|
||||||
}
|
}
|
||||||
|
|
||||||
debug("SF: AT45: Successfully programmed %zu bytes @ 0x%x\n",
|
debug("SF: AT45: Successfully programmed %zu bytes @ 0x%x\n",
|
||||||
len, offset);
|
len, offset);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
@ -387,7 +387,7 @@ static int dataflash_erase_p2(struct spi_flash *flash, u32 offset, size_t len)
|
||||||
}
|
}
|
||||||
|
|
||||||
debug("SF: AT45: Successfully erased %zu bytes @ 0x%x\n",
|
debug("SF: AT45: Successfully erased %zu bytes @ 0x%x\n",
|
||||||
len, offset);
|
len, offset);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
@ -450,7 +450,7 @@ static int dataflash_erase_at45(struct spi_flash *flash, u32 offset, size_t len)
|
||||||
}
|
}
|
||||||
|
|
||||||
debug("SF: AT45: Successfully erased %zu bytes @ 0x%x\n",
|
debug("SF: AT45: Successfully erased %zu bytes @ 0x%x\n",
|
||||||
len, offset);
|
len, offset);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
@ -476,7 +476,7 @@ struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode)
|
||||||
|
|
||||||
if (i == ARRAY_SIZE(atmel_spi_flash_table)) {
|
if (i == ARRAY_SIZE(atmel_spi_flash_table)) {
|
||||||
debug("SF: Unsupported DataFlash ID %02x\n",
|
debug("SF: Unsupported DataFlash ID %02x\n",
|
||||||
idcode[1]);
|
idcode[1]);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ struct spi_flash *spi_flash_probe_gigadevice(struct spi_slave *spi, u8 *idcode)
|
||||||
|
|
||||||
if (i == ARRAY_SIZE(gigadevice_spi_flash_table)) {
|
if (i == ARRAY_SIZE(gigadevice_spi_flash_table)) {
|
||||||
debug("SF: Unsupported Gigadevice ID %02x%02x\n",
|
debug("SF: Unsupported Gigadevice ID %02x%02x\n",
|
||||||
idcode[1], idcode[2]);
|
idcode[1], idcode[2]);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -266,7 +266,7 @@ struct spi_flash *spi_fram_probe_ramtron(struct spi_slave *spi, u8 *idcode)
|
||||||
|
|
||||||
/* arriving here means no method has found a device we can handle */
|
/* arriving here means no method has found a device we can handle */
|
||||||
debug("SF/ramtron: unsupported device id0=%02x id1=%02x id2=%02x\n",
|
debug("SF/ramtron: unsupported device id0=%02x id1=%02x id2=%02x\n",
|
||||||
idcode[0], idcode[1], idcode[2]);
|
idcode[0], idcode[1], idcode[2]);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
found:
|
found:
|
||||||
|
|
|
@ -39,7 +39,7 @@ void spl_spi_load_image(void)
|
||||||
|
|
||||||
/* Load u-boot, mkimage header is 64 bytes. */
|
/* Load u-boot, mkimage header is 64 bytes. */
|
||||||
spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40,
|
spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40,
|
||||||
(void *) header);
|
(void *)header);
|
||||||
spl_parse_image_header(header);
|
spl_parse_image_header(header);
|
||||||
spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS,
|
spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS,
|
||||||
spl_image.size, (void *)spl_image.load_addr);
|
spl_image.size, (void *)spl_image.load_addr);
|
||||||
|
|
|
@ -113,7 +113,7 @@ sst_byte_write(struct spi_flash *flash, u32 offset, const void *buf)
|
||||||
};
|
};
|
||||||
|
|
||||||
debug("BP[%02x]: 0x%p => cmd = { 0x%02x 0x%06x }\n",
|
debug("BP[%02x]: 0x%p => cmd = { 0x%02x 0x%06x }\n",
|
||||||
spi_w8r8(flash->spi, CMD_READ_STATUS), buf, cmd[0], offset);
|
spi_w8r8(flash->spi, CMD_READ_STATUS), buf, cmd[0], offset);
|
||||||
|
|
||||||
ret = spi_flash_cmd_write_enable(flash);
|
ret = spi_flash_cmd_write_enable(flash);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -160,8 +160,8 @@ sst_write_wp(struct spi_flash *flash, u32 offset, size_t len, const void *buf)
|
||||||
|
|
||||||
for (; actual < len - 1; actual += 2) {
|
for (; actual < len - 1; actual += 2) {
|
||||||
debug("WP[%02x]: 0x%p => cmd = { 0x%02x 0x%06x }\n",
|
debug("WP[%02x]: 0x%p => cmd = { 0x%02x 0x%06x }\n",
|
||||||
spi_w8r8(flash->spi, CMD_READ_STATUS), buf + actual,
|
spi_w8r8(flash->spi, CMD_READ_STATUS), buf + actual,
|
||||||
cmd[0], offset);
|
cmd[0], offset);
|
||||||
|
|
||||||
ret = spi_flash_cmd_write(flash->spi, cmd, cmd_len,
|
ret = spi_flash_cmd_write(flash->spi, cmd, cmd_len,
|
||||||
buf + actual, 2);
|
buf + actual, 2);
|
||||||
|
|
|
@ -166,8 +166,9 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 *idcode)
|
||||||
idcode[0] = 0x20;
|
idcode[0] = 0x20;
|
||||||
idcode[1] = 0x20;
|
idcode[1] = 0x20;
|
||||||
idcode[2] = idcode[3] + 1;
|
idcode[2] = idcode[3] + 1;
|
||||||
} else
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
id = ((idcode[1] << 8) | idcode[2]);
|
id = ((idcode[1] << 8) | idcode[2]);
|
||||||
|
|
|
@ -123,7 +123,7 @@ struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode)
|
||||||
|
|
||||||
if (i == ARRAY_SIZE(winbond_spi_flash_table)) {
|
if (i == ARRAY_SIZE(winbond_spi_flash_table)) {
|
||||||
debug("SF: Unsupported Winbond ID %02x%02x\n",
|
debug("SF: Unsupported Winbond ID %02x%02x\n",
|
||||||
idcode[1], idcode[2]);
|
idcode[1], idcode[2]);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue