From 603c3af895b0f03d792252412a2255d97791df09 Mon Sep 17 00:00:00 2001 From: George Beckstein Date: Mon, 27 Nov 2023 15:43:58 -0500 Subject: [PATCH] drivers: flash : stm32: STM32L4P5xx fix page calculation from offset This fix adds the STM32L4P5xx to the list of devices that have an offset-to-page shift calculation of 12 bits. Previously, the driver would only shift the offset by 11 bits when calculating the page to erase. This would prevent the driver from erasing the correct page. Signed-off-by: George Beckstein --- drivers/flash/flash_stm32l4x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/flash/flash_stm32l4x.c b/drivers/flash/flash_stm32l4x.c index ead57fb3df41..e82bf1db3039 100644 --- a/drivers/flash/flash_stm32l4x.c +++ b/drivers/flash/flash_stm32l4x.c @@ -23,7 +23,7 @@ LOG_MODULE_REGISTER(LOG_DOMAIN); #if !defined(STM32L4R5xx) && !defined(STM32L4R7xx) && !defined(STM32L4R9xx) && \ !defined(STM32L4S5xx) && !defined(STM32L4S7xx) && !defined(STM32L4S9xx) && \ - !defined(STM32L4Q5xx) + !defined(STM32L4Q5xx) && !defined(STM32L4P5xx) #define STM32L4X_PAGE_SHIFT 11 #else #define STM32L4X_PAGE_SHIFT 12