8
8
#ifndef FLASH_H
9
9
#define FLASH_H
10
10
11
+
12
+ /* The geometry defines are placed in the sdk. The .h was factored out for reuse by eboot here.
13
+ * Beware: this means that eboot has an external dependency.
14
+ * The following .h is placed in tools/sdk/includes
15
+ */
16
+ #include <spi_flash_geometry.h>
17
+
11
18
int SPIEraseBlock (uint32_t block );
12
19
int SPIEraseSector (uint32_t sector );
13
20
int SPIRead (uint32_t addr , void * dest , size_t size );
14
21
int SPIWrite (uint32_t addr , void * src , size_t size );
15
22
int SPIEraseAreaEx (const uint32_t start , const uint32_t size );
16
23
17
- #define FLASH_SECTOR_SIZE 0x1000
18
- #define FLASH_BLOCK_SIZE 0x10000
19
- #define APP_START_OFFSET 0x1000
20
24
21
25
typedef struct {
22
26
unsigned char magic ;
@@ -25,7 +29,7 @@ typedef struct {
25
29
/* SPI Flash Interface (0 = QIO, 1 = QOUT, 2 = DIO, 0x3 = DOUT) */
26
30
unsigned char flash_mode ;
27
31
28
- /* High four bits: 0 = 512K, 1 = 256K, 2 = 1M, 3 = 2M, 4 = 4M,
32
+ /* High four bits: 0 = 512K, 1 = 256K, 2 = 1M, 3 = 2M, 4 = 4M, 8 = 8M, 9 = 16M
29
33
Low four bits: 0 = 40MHz, 1= 26MHz, 2 = 20MHz, 0xf = 80MHz */
30
34
unsigned char flash_size_freq ;
31
35
0 commit comments