]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
powerpc/powermac: Fix macgpio(4) child interrupt resource handling
authorjhibbits <jhibbits@FreeBSD.org>
Thu, 6 Dec 2018 04:25:12 +0000 (04:25 +0000)
committerjhibbits <jhibbits@FreeBSD.org>
Thu, 6 Dec 2018 04:25:12 +0000 (04:25 +0000)
commit52acc74d855d28003c59286c6eefee7b7436bed4
tree71f05d4e5df8cf46c905c208304401e9134030ba
parenta394bed4eed4626f7ff76671c122d3a42e2ff8c2
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
sys/powerpc/powermac/macgpio.c