1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-06-30 21:52:36 +02:00

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>
This commit is contained in:
Stefan Tauner
2011-09-18 22:42:18 +00:00
parent e3185c0599
commit 8c35745fcf
14 changed files with 58 additions and 58 deletions

14
flash.h
View File

@ -108,9 +108,9 @@ struct flashchip {
uint32_t model_id;
/* Total chip size in kilobytes */
unsigned int total_size;
int total_size;
/* Chip page size in bytes */
unsigned int page_size;
int page_size;
int feature_bits;
/*
@ -122,7 +122,7 @@ struct flashchip {
int (*probe) (struct flashchip *flash);
/* Delay after "enter/exit ID mode" commands in microseconds. */
unsigned int probe_timing;
int probe_timing;
/*
* Erase blocks and associated erase function. Any chip erase function
@ -143,8 +143,8 @@ struct flashchip {
int (*printlock) (struct flashchip *flash);
int (*unlock) (struct flashchip *flash);
int (*write) (struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len);
int (*read) (struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len);
int (*write) (struct flashchip *flash, uint8_t *buf, int start, int len);
int (*read) (struct flashchip *flash, uint8_t *buf, int start, int len);
struct {
uint16_t min;
uint16_t max;
@ -202,7 +202,7 @@ extern int verbose;
extern const char flashrom_version[];
extern char *chip_to_probe;
void map_flash_registers(struct flashchip *flash);
int read_memmapped(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len);
int read_memmapped(struct flashchip *flash, uint8_t *buf, int start, int len);
int erase_flash(struct flashchip *flash);
int probe_flash(int startchip, struct flashchip *fill_flash, int force);
int read_flash_to_file(struct flashchip *flash, const char *filename);
@ -210,7 +210,7 @@ int min(int a, int b);
int max(int a, int b);
void tolower_string(char *str);
char *extract_param(char **haystack, const char *needle, const char *delim);
int verify_range(struct flashchip *flash, uint8_t *cmpbuf, unsigned int start, unsigned int len, const char *message);
int verify_range(struct flashchip *flash, uint8_t *cmpbuf, int start, int len, const char *message);
int need_erase(uint8_t *have, uint8_t *want, int len, enum write_granularity gran);
char *strcat_realloc(char *dest, const char *src);
void print_version(void);