Skip to content

Commit

Permalink
Use rom_data_lookup_inline in flash_devinfo_ptr
Browse files Browse the repository at this point in the history
Fixes bug introduced by raspberrypi#2082 where flash_devinfo_get_cs_size would use rom_data_lookup from flash during a __no_inline_not_in_flash_func
  • Loading branch information
will-v-pi committed Nov 29, 2024
1 parent 57a4983 commit fc3d66e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rp2_common/hardware_flash/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void flash_get_unique_id(uint8_t *id_out) {
// device, so fields must have getters/setters.
static io_rw_16 * flash_devinfo_ptr(void) {
// Note the lookup returns a pointer to a 32-bit pointer literal in the ROM
io_rw_16 **p = (io_rw_16 **) rom_data_lookup(ROM_DATA_FLASH_DEVINFO16_PTR);
io_rw_16 **p = (io_rw_16 **) rom_data_lookup_inline(ROM_DATA_FLASH_DEVINFO16_PTR);
assert(p);
return *p;
}
Expand Down

0 comments on commit fc3d66e

Please sign in to comment.