File tree Expand file tree Collapse file tree 3 files changed +4
-11
lines changed Expand file tree Collapse file tree 3 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 1
1
#include "drivers/memory/spiflash.h"
2
- #include "qspi.h"
2
+ #include "drivers/bus/ qspi.h"
3
3
4
4
// This configuration is needed for mboot to be able to write to the external QSPI flash
5
+ extern const mp_qspi_proto_t qspi_proto ;
5
6
6
- const mp_spiflash_config_t spiflash_config = {
7
- .bus_kind = MP_SPIFLASH_BUS_QSPI ,
8
- .bus .u_qspi .data = NULL ,
9
- .bus .u_qspi .proto = & qspi_proto ,
10
- .cache = NULL ,
7
+ mp_spiflash_t spiflash_instance = {
8
+ .qspi_proto = & qspi_proto
11
9
};
12
10
13
- mp_spiflash_t spiflash_instance ;
14
-
15
11
// This init function is needed to memory map the QSPI flash early in the boot process
16
12
17
13
void board_early_init (void ) {
Original file line number Diff line number Diff line change @@ -205,5 +205,4 @@ extern struct _mp_spiflash_t spiflash_instance;
205
205
#define MBOOT_SPIFLASH_BYTE_SIZE (512 * 128 * 1024)
206
206
#define MBOOT_SPIFLASH_LAYOUT "/0x90000000/512*128Kg"
207
207
#define MBOOT_SPIFLASH_ERASE_BLOCKS_PER_PAGE (128 / 4) // 128k page, 4k erase block
208
- #define MBOOT_SPIFLASH_CONFIG (&spiflash_config)
209
208
#define MBOOT_SPIFLASH_SPIFLASH (&spiflash_instance)
Original file line number Diff line number Diff line change @@ -1485,12 +1485,10 @@ void stm32_main(int initial_r0) {
1485
1485
#endif
1486
1486
1487
1487
#if defined(MBOOT_SPIFLASH_ADDR )
1488
- MBOOT_SPIFLASH_SPIFLASH -> config = MBOOT_SPIFLASH_CONFIG ;
1489
1488
mp_spiflash_init (MBOOT_SPIFLASH_SPIFLASH );
1490
1489
#endif
1491
1490
1492
1491
#if defined(MBOOT_SPIFLASH2_ADDR )
1493
- MBOOT_SPIFLASH2_SPIFLASH -> config = MBOOT_SPIFLASH2_CONFIG ;
1494
1492
mp_spiflash_init (MBOOT_SPIFLASH2_SPIFLASH );
1495
1493
#endif
1496
1494
You can’t perform that action at this time.
0 commit comments