Commit 6a2789b
committed
u-boot: v2026.04: helios64: add ensure_otp_data_ready() to get_variant()
get_variant() was the only public OTP accessor that read the otp struct
without first validating/loading the cache. After a transient SPI failure
during board_early_init_r(), it could return a misleading variant string
from stale/partial data instead of exercising the retry path that
set_board_info() and mac_read_from_otp() already use.
Also make var_str static const — it's a read-only lookup table that
doesn't need to be rebuilt on every call.
Suggested-by: coderabbitai[bot]1 parent fe7e77f commit 6a2789b
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
238 | 241 | | |
239 | 242 | | |
240 | | - | |
| 243 | + | |
241 | 244 | | |
242 | 245 | | |
243 | 246 | | |
| |||
0 commit comments