Commit 4dae3c1
committed
u-boot: v2026.04: helios64: retry OTP read on transient SPI failure
The previous commit preserved has_been_read = 0 on SPI I/O failure so a
later call could retry. But in the actual boot flow no retry happens:
board_early_init_r() ignores the return of read_otp_data(), and the
later consumers (set_board_info, mac_read_from_otp) bail out early with
'if (!is_data_valid()) return;' — so a single transient SPI failure
leaves board_rev / serial# / ethaddr unset for the whole boot.
Add an ensure_otp_data_ready() helper that re-invokes read_otp_data()
when the cached data is not yet valid, and use it in both consumers.
Valid/invalid-data behavior is unchanged; only the retry path is now
actually exercised.
Addresses a CodeRabbit review comment on PR armbian#9675.1 parent 560ee3b commit 4dae3c1
1 file changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
46 | 61 | | |
47 | 62 | | |
48 | 63 | | |
| |||
231 | 246 | | |
232 | 247 | | |
233 | 248 | | |
234 | | - | |
| 249 | + | |
235 | 250 | | |
236 | 251 | | |
237 | 252 | | |
| |||
246 | 261 | | |
247 | 262 | | |
248 | 263 | | |
249 | | - | |
| 264 | + | |
250 | 265 | | |
251 | 266 | | |
252 | 267 | | |
| |||
0 commit comments