Skip to content

Commit

Permalink
drivers: flash: stm32h7: do not unlock CR at the end of init
Browse files Browse the repository at this point in the history
Do not unlock CR at the end of initialization.

The lock mechanism is to protect unwanted registers modifications due to
software bugs. There is no point in leaving the registers unlock once
the driver is initialized.

(cherry picked from commit 8aa4aa7)

Original-Signed-off-by: Dawid Niedzwiecki <[email protected]>
GitOrigin-RevId: 8aa4aa7
Cr-Build-Id: 8726453333733413585
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8726453333733413585
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: Id8f1c8c33fe694ee04f88d5e270876942270e742
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6150711
Tested-by: ChromeOS Prod (Robot) <[email protected]>
Bot-Commit: ChromeOS Prod (Robot) <[email protected]>
Commit-Queue: ChromeOS Prod (Robot) <[email protected]>
  • Loading branch information
Dawid Niedzwiecki authored and Chromeos LUCI committed Jan 7, 2025
1 parent cb3ee95 commit 1d863fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/flash/flash_stm32h7x.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ static int stm32h7_flash_init(const struct device *dev)
}
#endif

return flash_stm32h7_write_protection(dev, false);
return 0;
}

DEVICE_DT_INST_DEFINE(0, stm32h7_flash_init, NULL, &flash_data, NULL, POST_KERNEL,
Expand Down

0 comments on commit 1d863fb

Please sign in to comment.