BMAC Ethernet Driver

Nathan Whitehorn nathanw at uchicago.edu
Wed Apr 9 02:53:33 UTC 2008


While I'm on the subject of style/architectural questions --

Apple PMU and SMU devices, probably among others, use macio gpio lines 
for interrupts instead of the IRQs listed in the OF interrupts property. 
These lines aren't children of the devices, and so their interrupts are 
not associated with them by the regular probes.

Is the correct way to handle this:
a) Reaching out across the OF tree for the GPU line, looking up its 
interrupt, then having the device assign it to itself in 
device_attach()? In the case of SMU (and the onboard audio in G5-era 
machines), we actually need to use GPIO pins for data transfer, and we 
should probably have a generic mechanism for this. Without knowledge in 
a generic GPIO driver that some interrupts belong to other devices, 
however, they will then be bound here and unavailable to PMU/SMU by 
other methods.

b) Having a macgpio device like NetBSD has that collects these and 
forwards them to the appropriate handlers? This would involve the gpio 
device and remote interrupt handler knowing about one another.

c) Remapping the interrupts in the bus probe with a quirks table like 
the way SCC interrupts are collated? SMU, unlike PMU, is not a child of 
macio, so we would need several versions of this quirk. This sounds like 
the worst choice.
-Nathan


More information about the freebsd-ppc mailing list