Commit eae2f22
committed
drivers: flash: flash_stm32_xspi: Allow flash driver init in ram load
Current driver protections prevent to initialize driver when run as from
an external application running from ext flash. Aim is to avoid performing
full driver initialization of the NOR flash controller the application
is read from.
But this problem is actually only valid when application is running in XIP
mode (read in memory mapped mode at run time).
In ram load mode, since there is no direct activity from the application
on the NOR device, nothing prevents the ext flash driver to be used fully.
Hence, we should allow the controller initialization to happen, with some
adjustments. Mostly, what we need is to:
- skip the hal init
- abort memory mapping afterwards to let the jedec reading happen.
Remove conditions around `stm32_xspi_is_memorymap()` and
`stm32_xspi_abort()` which can finally be useful in various cases.
Signed-off-by: Erwan Gouriou <[email protected]>1 parent 211681d commit eae2f22
1 file changed
+19
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
997 | 997 | | |
998 | 998 | | |
999 | 999 | | |
| 1000 | + | |
1000 | 1001 | | |
1001 | 1002 | | |
1002 | 1003 | | |
| |||
1009 | 1010 | | |
1010 | 1011 | | |
1011 | 1012 | | |
1012 | | - | |
1013 | 1013 | | |
1014 | | - | |
1015 | | - | |
1016 | 1014 | | |
1017 | 1015 | | |
1018 | 1016 | | |
1019 | 1017 | | |
1020 | 1018 | | |
1021 | 1019 | | |
1022 | 1020 | | |
1023 | | - | |
1024 | 1021 | | |
1025 | 1022 | | |
1026 | 1023 | | |
| |||
1218 | 1215 | | |
1219 | 1216 | | |
1220 | 1217 | | |
1221 | | - | |
| 1218 | + | |
1222 | 1219 | | |
1223 | 1220 | | |
1224 | 1221 | | |
| |||
2093 | 2090 | | |
2094 | 2091 | | |
2095 | 2092 | | |
2096 | | - | |
| 2093 | + | |
2097 | 2094 | | |
2098 | 2095 | | |
2099 | 2096 | | |
| |||
2195 | 2192 | | |
2196 | 2193 | | |
2197 | 2194 | | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
2198 | 2201 | | |
2199 | 2202 | | |
2200 | 2203 | | |
2201 | 2204 | | |
2202 | 2205 | | |
2203 | 2206 | | |
2204 | 2207 | | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
2205 | 2218 | | |
2206 | 2219 | | |
2207 | 2220 | | |
| |||
0 commit comments