summaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-06-12 00:04:32 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-06-12 00:04:32 +0000
commit6ad6e01e9b961fd5b25cc4d69319a7d29f110684 (patch)
tree5a7b62f60b10de6a9d9f4f862fdb9f1f8f500f3d /flash.h
parenta60d408a78be0e0d34dda616977489a307cb98b6 (diff)
downloadast2050-flashrom-6ad6e01e9b961fd5b25cc4d69319a7d29f110684.zip
ast2050-flashrom-6ad6e01e9b961fd5b25cc4d69319a7d29f110684.tar.gz
Introduce helpers.c
Move some suitable functions there, add it to the Makefile, but leave the declarations in flash.h for now. Corresponding to flashrom svn r1819. 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 'flash.h')
-rw-r--r--flash.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/flash.h b/flash.h
index cf496b6..cb53ad1 100644
--- a/flash.h
+++ b/flash.h
@@ -241,6 +241,14 @@ char *flashbuses_to_text(enum chipbustype bustype);
int print_supported(void);
void print_supported_wiki(void);
+/* helpers.c */
+uint32_t address_to_bits(uint32_t addr);
+int bitcount(unsigned long a);
+int max(int a, int b);
+int min(int a, int b);
+char *strcat_realloc(char *dest, const char *src);
+void tolower_string(char *str);
+
/* flashrom.c */
extern int verbose_screen;
extern int verbose_logfile;
@@ -251,13 +259,9 @@ int read_memmapped(struct flashctx *flash, uint8_t *buf, unsigned int start, uns
int erase_flash(struct flashctx *flash);
int probe_flash(struct registered_programmer *pgm, int startchip, struct flashctx *fill_flash, int force);
int read_flash_to_file(struct flashctx *flash, const char *filename);
-int min(int a, int b);
-int max(int a, int b);
-void tolower_string(char *str);
char *extract_param(const char *const *haystack, const char *needle, const char *delim);
int verify_range(struct flashctx *flash, const uint8_t *cmpbuf, unsigned int start, unsigned int len);
int need_erase(const uint8_t *have, const uint8_t *want, unsigned int len, enum write_granularity gran);
-char *strcat_realloc(char *dest, const char *src);
void print_version(void);
void print_buildinfo(void);
void print_banner(void);
OpenPOWER on IntegriCloud