Page MenuHomeFreeBSD

PowerPC: Add CPLD driver for AmigaOne X5000
ClosedPublic

Authored by jhibbits on Jan 11 2020, 10:59 PM.

Details

Summary

The CPLD is the communications medium between the CPU and the XMOS
"Xena" event coprocessor. It provides a mailbox communication feature,
along with dual-port RAM to be used between the CPU and XMOS. Also, it
provides basic board stats as well, such as PCIe presence, JTAG signals,
and CPU fan speed reporting (in revolutions per second). Only fan speed
is implemented, as a sysctl.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 28610
Build 26644: arc lint + arc unit

Event Timeline

jhibbits created this revision.Jan 11 2020, 10:59 PM
jhibbits updated this revision to Diff 66640.Jan 12 2020, 3:42 AM

Fix the build. Last minute splitting of the driver out to have a header before submitting, but didn't build test first.

cpld0: <AmigaOne Cyrus CPLD> mem 0x4000000002010000-0x400000000201ffff on lbc0
cpld0: Build date: 2015-05-06
cpld0: Build time: 17:17:17
cpld0: Hardware revision: 8720

sys/powerpc/amigaone/cpld_x5000.c
193

+ mda.mda_si_drv1 = sc;

jhibbits updated this revision to Diff 66947.Jan 18 2020, 1:14 AM

Stash off the softc in the cdev. It might be helpful to *not* dereference a
NULL pointer.

bdragon added inline comments.Jan 18 2020, 1:51 AM
sys/powerpc/amigaone/cpld.h
11

I think you accidentally joined in your license template, this line is twice as long as it should be in both files.

bdragon accepted this revision.Jan 18 2020, 1:58 AM

Works on my X5000, and looks good to me (other than needing to add that missing newline in the license in both cases)

cpld0: <AmigaOne Cyrus CPLD> mem 0x4000000002010000-0x400000000201ffff on lbc0
cpld0: Build date: 2015-05-06
cpld0: Build time: 17:17:17
cpld0: Hardware revision: 8720
root@:~ # sysctl dev.cpld
dev.cpld.0.cpu_fan: 2700
dev.cpld.0.%parent: lbc0
dev.cpld.0.%pnpinfo: 
dev.cpld.0.%location: 
dev.cpld.0.%driver: cpld
dev.cpld.0.%desc: AmigaOne Cyrus CPLD
dev.cpld.%parent:
This revision is now accepted and ready to land.Jan 18 2020, 1:58 AM
This revision was automatically updated to reflect the committed changes.