Page MenuHomeFreeBSD

[PowerPC] Fix scc z8530 driver
ClosedPublic

Authored by bdragon on May 2 2020, 1:45 AM.
Referenced Files
Unknown Object (File)
Feb 3 2024, 11:58 AM
Unknown Object (File)
Dec 19 2023, 8:52 AM
Unknown Object (File)
Dec 13 2023, 3:48 AM
Unknown Object (File)
Nov 30 2023, 10:19 PM
Unknown Object (File)
Nov 21 2023, 4:20 AM
Unknown Object (File)
Nov 12 2023, 3:01 AM
Unknown Object (File)
Nov 11 2023, 11:59 AM
Unknown Object (File)
Nov 8 2023, 12:04 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.