Skip to content

Commit

Permalink
drivers: flash: spi_nor: correct log message
Browse files Browse the repository at this point in the history
Flash size is specified in bits by SFDP and devicetree, but the stored
flash size is in bytes.  Correct the divisor.

Signed-off-by: Peter Bigot <[email protected]>
  • Loading branch information
pabigot authored and MaureenHelm committed Jan 6, 2021
1 parent db5270b commit b34d055
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/flash/spi_nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ static int spi_nor_process_bfp(const struct device *dev,
struct jesd216_erase_type *etp = data->erase_types;
const size_t flash_size = jesd216_bfp_density(bfp) / 8U;

LOG_INF("%s: %u MiBy flash", dev->name, (uint32_t)(flash_size >> 23));
LOG_INF("%s: %u MiBy flash", dev->name, (uint32_t)(flash_size >> 20));

/* Copy over the erase types, preserving their order. (The
* Sector Map Parameter table references them by index.)
Expand Down

0 comments on commit b34d055

Please sign in to comment.