]>
Commit | Line | Data |
---|---|---|
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 | ||
9 | #ifndef __FLASH_H__ | |
10 | #define __FLASH_H__ | |
11 | ||
12 | #include <stdint.h> | |
13 | ||
14 | struct partition { | |
15 | int start; | |
16 | int end; | |
17 | int precious; | |
18 | const char *name; | |
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); | |
29 | ||
30 | #endif | |
31 |