HomeFreeBSD

powerpc/powermac: Fix macgpio(4) child interrupt resource handling

Description

powerpc/powermac: Fix macgpio(4) child interrupt resource handling

The 'interrupts' property is actually 2 words, not one, on macgpio child
nodes. Open Firmware's getprop function might be returning the value
copied, not the total size of the property, but FDT's returns the total
size. Prior to this patch, this would cause the SYS_RES_IRQ resource list
to not be populated when running with the 'usefdt' loader variable set, to
convert the OFW device tree to a FDT. Since the property is always 2 words,
read both words, and ignore the second.

Tested by: Dennis Clarke (previous attempt)
MFC after: 2 weeks

Details

Provenance
jhibbitsAuthored on
Parents
rS341613: MFC r340525:
Branches
Unknown
Tags
Unknown