drivers/flash: stm32f3/stm32f1: define flash registers as volatile

On STM32F3 devices, a trick was required for normal use of registers.
This was actually an issue in flash registers defintions which should
be defined as volatile.
Fix this and additionaly, fix definition for STM32F1 which was also
lacking the volatile instruction.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2019-03-07 09:53:14 +01:00 committed by Kumar Gala
commit f3832a399e
4 changed files with 18 additions and 28 deletions

View file

@ -41,15 +41,15 @@ union ef_acr {
/* 3.3.3 Embedded flash registers */
struct stm32f3x_flash {
union ef_acr acr;
u32_t keyr;
u32_t optkeyr;
u32_t sr;
u32_t cr;
u32_t ar;
u32_t rsvd;
u32_t obr;
u32_t wrpr;
volatile union ef_acr acr;
volatile u32_t keyr;
volatile u32_t optkeyr;
volatile u32_t sr;
volatile u32_t cr;
volatile u32_t ar;
volatile u32_t rsvd;
volatile u32_t obr;
volatile u32_t wrpr;
};
/* list of device commands */