Skip to contentSkip to conversation

spi: rockchip: initialize bus_num to -1

PATCH Ahmad Fatoum 1 participant 1 message Aug 27 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi,

Quoted 1 line · support

Applied, thanks!

I have no idea what this is.

Before pointing a bot that can send email at the mailing list, please start a (human) discussion about what you are think this accomplishes.

Also generally this style of mails is not acceptable. It confuses users to say you apply patches (apply where?) and the formatting is broken.

Ahmad

Quoted 46 lines

Thanks for the quick turnaround on this one. This bug class is more common than the MNT report suggests — any RK3588/RK3568 board

design with a PMIC on one SPI controller and peripherals on another (which is the standard topology for RK806-based designs,

e.g. our own boards with the PMIC on SPI2) hits the same bus_num=0 collision the moment a second controller is enabled.

So far most of these designs simply never enabled two controllers in barebox, which is probably why it stayed latent this long.

One observation on the failure mode itself: the XFM_RO while(1) hang in rockchip_spi_pio is a separate latent hazard. Even with bus routing now correct,

any future misrouted or wrong-device read can still wedge the bootloader with no timeout and no diagnostic output.

Might be worth a follow-up hardening patch — a transfer timeout in the PIO loop would turn a silent hang into a loud error at the cost of a few lines.

We're tracking this fix for our RK35xx barebox evaluation (secure boot path for industrial designs), so it's on the regression checklist for the next release.

 --Boardcon Embedded Design — Rockchip-based industrial SBCs & SoMs

https://www.boardcon.com

Signature · 4 lines
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |