diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2011-09-18 22:42:18 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2011-09-18 22:42:18 +0000 |
commit | 8c35745fcf3ed6eb2769beda0c8b941df07f6175 (patch) | |
tree | 2f3c43a3589edc55e7143b39d40df4a0cd039183 /spi.c | |
parent | e3185c0599d77c06b9665c9721649b96108c894f (diff) | |
download | ast2050-flashrom-8c35745fcf3ed6eb2769beda0c8b941df07f6175.zip ast2050-flashrom-8c35745fcf3ed6eb2769beda0c8b941df07f6175.tar.gz |
Revert "Unsignify lengths and addresses in chip functions and structs"
- probe_timing was changed to unsigned although we use negative values
for special cases
- some code was not changed along hence did no longer compile:
* dediprog's read and write functions
* linux_spi's read and write functions
- it introduced a number of new sign conversion warnings
(http://paste.flashrom.org/view.php?id=832)
To be safe this patch reverts all changes made in r1448, a corrected
patch will follow later.
Thanks to idwer for pointing out the problem first!
Corresponding to flashrom svn r1450.
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'spi.c')
-rw-r--r-- | spi.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -97,9 +97,9 @@ int default_spi_send_multicommand(struct spi_command *cmds) return result; } -int default_spi_read(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) +int default_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len) { - unsigned int max_data = spi_programmer->max_data_read; + int max_data = spi_programmer->max_data_read; if (max_data == MAX_DATA_UNSPECIFIED) { msg_perr("%s called, but SPI read chunk size not defined " "on this hardware. Please report a bug at " @@ -109,9 +109,9 @@ int default_spi_read(struct flashchip *flash, uint8_t *buf, unsigned int start, return spi_read_chunked(flash, buf, start, len, max_data); } -int default_spi_write_256(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) +int default_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int len) { - unsigned int max_data = spi_programmer->max_data_write; + int max_data = spi_programmer->max_data_write; if (max_data == MAX_DATA_UNSPECIFIED) { msg_perr("%s called, but SPI write chunk size not defined " "on this hardware. Please report a bug at " @@ -121,7 +121,7 @@ int default_spi_write_256(struct flashchip *flash, uint8_t *buf, unsigned int st return spi_write_chunked(flash, buf, start, len, max_data); } -int spi_chip_read(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) +int spi_chip_read(struct flashchip *flash, uint8_t *buf, int start, int len) { int addrbase = 0; if (!spi_programmer->read) { @@ -160,7 +160,7 @@ int spi_chip_read(struct flashchip *flash, uint8_t *buf, unsigned int start, uns * .write_256 = spi_chip_write_1 */ /* real chunksize is up to 256, logical chunksize is 256 */ -int spi_chip_write_256(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) +int spi_chip_write_256(struct flashchip *flash, uint8_t *buf, int start, int len) { if (!spi_programmer->write_256) { msg_perr("%s called, but SPI page write is unsupported on this " |