Page MenuHomeFreeBSD

[PowerPC] Fix scc z8530 driver
ClosedPublic

Authored by bdragon on May 2 2020, 1:45 AM.
Referenced Files
F106098436: D24661.diff
Wed, Dec 25, 9:15 AM
Unknown Object (File)
Tue, Dec 17, 11:52 AM
Unknown Object (File)
Tue, Dec 10, 6:54 PM
Unknown Object (File)
Thu, Nov 28, 3:34 PM
Unknown Object (File)
Thu, Nov 28, 3:34 PM
Unknown Object (File)
Thu, Nov 28, 3:34 PM
Unknown Object (File)
Thu, Nov 28, 3:34 PM
Unknown Object (File)
Thu, Nov 28, 3:14 PM
Subscribers

Details

Summary

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
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.

sys/dev/ic/z8530.h
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.