summaryrefslogtreecommitdiffstats
path: root/programmer.h
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-11-23 09:13:48 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-11-23 09:13:48 +0000
commitc69c9c84e0341b701d9966fea8ce54d4e017bbb7 (patch)
tree2ea0b12abf9dd3483246423752239b88c6d7942e /programmer.h
parent8ca4255d7968dbf6301367074cc7267d22a25658 (diff)
downloadast2050-flashrom-c69c9c84e0341b701d9966fea8ce54d4e017bbb7.zip
ast2050-flashrom-c69c9c84e0341b701d9966fea8ce54d4e017bbb7.tar.gz
Unsignify lengths and addresses in chip functions and structs
Push those changes forward where needed to prevent new sign conversion warnings where possible. Corresponding to flashrom svn r1470. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'programmer.h')
-rw-r--r--programmer.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/programmer.h b/programmer.h
index b16e4f8..8f55912 100644
--- a/programmer.h
+++ b/programmer.h
@@ -563,23 +563,23 @@ extern const int spi_programmer_count;
#define MAX_DATA_WRITE_UNLIMITED 256
struct spi_programmer {
enum spi_controller type;
- int max_data_read;
- int max_data_write;
+ unsigned int max_data_read;
+ unsigned int max_data_write;
int (*command)(unsigned int writecnt, unsigned int readcnt,
const unsigned char *writearr, unsigned char *readarr);
int (*multicommand)(struct spi_command *cmds);
/* Optimized functions for this programmer */
- int (*read)(struct flashchip *flash, uint8_t *buf, int start, int len);
- int (*write_256)(struct flashchip *flash, uint8_t *buf, int start, int len);
+ int (*read)(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len);
+ int (*write_256)(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len);
};
extern const struct spi_programmer *spi_programmer;
int default_spi_send_command(unsigned int writecnt, unsigned int readcnt,
const unsigned char *writearr, unsigned char *readarr);
int default_spi_send_multicommand(struct spi_command *cmds);
-int default_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len);
-int default_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int len);
+int default_spi_read(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len);
+int default_spi_write_256(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len);
void register_spi_programmer(const struct spi_programmer *programmer);
/* ichspi.c */
@@ -625,8 +625,8 @@ struct opaque_programmer {
int max_data_write;
/* Specific functions for this programmer */
int (*probe) (struct flashchip *flash);
- int (*read) (struct flashchip *flash, uint8_t *buf, int start, int len);
- int (*write) (struct flashchip *flash, uint8_t *buf, int start, int len);
+ int (*read) (struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len);
+ int (*write) (struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len);
int (*erase) (struct flashchip *flash, unsigned int blockaddr, unsigned int blocklen);
};
extern const struct opaque_programmer *opaque_programmer;
OpenPOWER on IntegriCloud