Page MenuHomeFreeBSD

[PowerPC] Fix scc z8530 driver

Authored by bdragon on May 2 2020, 1:45 AM.



Parts of the z8530 driver were still using the SUN channel spacing.

This was wildly breaking QEMU powerpc32 (it would have a constant interrupt on channel A, because the driver would read from / write to the wrong location, as QEMU only has the sun spacing for escc-legacy attachment)

Fix the channel spacing in the ic header, and document the different spacing.

With this patch, the ppc32 QEMU serial console attaches properly and does not hang. Presumably also fixes attaching on a rackmac (which I will test later)

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

in rS157351 / rS160689 the macio attachment was added, but it didn't account for the incorrect value for CHAN_A, so this driver has always been broken on macs it seems.

45 ↗(On Diff #71265)

This may be overkill, but I think it would be better to let the attachment specify the channel offsets, instead of gating it on a preprocessor directive. That way it's possible to attach to both ecc-legacy and ecc simultaneously, or allow failover in the same driver, as well as allowing the use of this chip in other attachment scenarios.

Update patch to implement jhibbits' idea.

This revision is now accepted and ready to land.Jun 13 2020, 6:52 PM
This revision was automatically updated to reflect the committed changes.