Skip to content

Commit 02fbb39

Browse files
committed
drivers/flash: STM32: use clk dt definitions in h7 flash driver
This commit replaces driver hard coded clk bus and enr definitions with definitions from device tree. Signed-off-by: Thomas Stranger <[email protected]>
1 parent 77d05a6 commit 02fbb39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/flash/flash_stm32h7x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,8 @@ void flash_stm32_page_layout(const struct device *dev,
605605

606606
static struct flash_stm32_priv flash_data = {
607607
.regs = (FLASH_TypeDef *) DT_INST_REG_ADDR(0),
608-
.pclken = { .bus = STM32_CLOCK_BUS_AHB3,
609-
.enr = LL_AHB3_GRP1_PERIPH_FLASH },
608+
.pclken = { .bus = DT_INST_CLOCKS_CELL(0, bus),
609+
.enr = DT_INST_CLOCKS_CELL(0, bits)},
610610
};
611611

612612
static const struct flash_driver_api flash_stm32h7_api = {

0 commit comments

Comments
 (0)