Skip to content
Commit deabfa3c authored by Dominik Ermel's avatar Dominik Ermel Committed by Anas Nashif
Browse files

drivers/flash/spi_nor: Fix and rework spi_nor_set_address_mode



The commit removes unneeded check for enter_4byte_addr_exist in
the function, as the utility function is supposed to set the address
by parsing enter_4byte_addr parameter, while the enter_4byte_addr_exist
used to exist only for DTS entries that directly set enter-4byte-addr
parameters for a flash node.

The change also moves LOG_DBG reporting enter_4byte_addr before
it is processed, to allow logging what actually function will be working
with, before it does so.

The enter_4byte_addr_exist is removed as it is no longer used anywhere.

Setting of data->flag_access_32bit has been moved in the same code block
as call to the spi_nor_cmd_write, as it can be only consequence of
successful call to that function.

Signed-off-by: default avatarDominik Ermel <dominik.ermel@nordicsemi.no>
parent 18c73de9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment