]>
Commit | Line | Data |
---|---|---|
a553f267 | 1 | //----------------------------------------------------------------------------- |
2 | // This code is licensed to you under the terms of the GNU GPL, version 2 or, | |
3 | // at your option, any later version. See the LICENSE.txt file for the text of | |
4 | // the license. | |
5 | //----------------------------------------------------------------------------- | |
6 | // Flashing utility functions | |
7 | //----------------------------------------------------------------------------- | |
8 | ||
b961ef03 | 9 | #ifndef __FLASH_H__ |
10 | #define __FLASH_H__ | |
11 | ||
91c38cf7 | 12 | #include <stdint.h> |
13 | ||
6e4d4ee6 | 14 | struct partition { |
7fe9b0b7 | 15 | int start; |
16 | int end; | |
17 | int precious; | |
18 | const char *name; | |
6e4d4ee6 | 19 | }; |
20 | ||
21 | void FlushPrevious(int translate); | |
22 | void GotByte(uint32_t where, uint8_t which, int start_addr, int end_addr, int translate); | |
23 | unsigned int EnterFlashState(void); | |
24 | int PrepareFlash(struct partition *p, const char *filename, unsigned int state); | |
25 | int find_next_area(const char *str, int *offset, int *length); | |
26 | ||
27 | #define PHYSICAL_FLASH_START 0x100000 | |
28 | void do_flash(char **argv); | |
b961ef03 | 29 | |
30 | #endif | |
31 |