Commit a3643a2
Patrice Chotard
memory: stm32-omi: Fix period_ps overflow
In both drivers hyperbus-stm32.c and stm32-ospi.c, period_ps is computed
using the following formula:
period_ps = NSEC_PER_SEC / (bus_freq / 1000)
In case bus freq < 15.259 Mhz, we got period_ps > 65535 which can't be
stored in a u16.
Convert period_ps from u16 to u32 to fix this issue.
Update stm32_omi_find_byp_cmd() and stm32_omi_dlyb_configure() prototype
accordingly.
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: If8736e6bad4c5c6f240fd01a4829a441f1edb711
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/557861
ACI: CIBUILD <MDG-smet-aci-builds@list.st.com>1 parent 8f510cb commit a3643a2
4 files changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
0 commit comments