Skip to content

Commit b8bf23b

Browse files
GeorgeCGVnashif
authored andcommitted
drivers: flash: stm32 ospi: remove not required setting of writeoc
Remove dead code. The write opcode instruction is set based on dev_data a couple of lines after. This was supposed to be in the merged "memory map support for other modes" PR. Signed-off-by: Georgij Cernysiov <[email protected]>
1 parent b8bed5b commit b8bf23b

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

drivers/flash/flash_stm32_ospi.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,16 +1057,6 @@ static int stm32_ospi_set_memorymap(const struct device *dev)
10571057

10581058
/* Initialize the program command */
10591059
s_command.OperationType = HAL_OSPI_OPTYPE_WRITE_CFG;
1060-
if (dev_cfg->data_rate == OSPI_STR_TRANSFER) {
1061-
s_command.Instruction = (dev_cfg->data_mode == OSPI_SPI_MODE)
1062-
? ((stm32_ospi_hal_address_size(dev) ==
1063-
HAL_OSPI_ADDRESS_24_BITS)
1064-
? SPI_NOR_CMD_PP
1065-
: SPI_NOR_CMD_PP_4B)
1066-
: SPI_NOR_OCMD_PAGE_PRG;
1067-
} else {
1068-
s_command.Instruction = SPI_NOR_OCMD_PAGE_PRG;
1069-
}
10701060
s_command.DQSMode = HAL_OSPI_DQS_DISABLE;
10711061

10721062
s_command.Instruction = dev_data->write_opcode;

0 commit comments

Comments
 (0)