Make using the #address-cells property on the interrupt parent in device
tree parsing opt-out rather than opt-in. All FDT-based systems as well as PowerPC systems with real Open Firmware use the CHRP-derived binding that includes it, which makes SPARC the odd man out here. Making it opt-out avoids astonishment on new platform bring up.
This commit is contained in:
parent
002ef20ca8
commit
9f4a7eae43
@ -41,7 +41,4 @@ struct mem_region {
|
||||
vm_size_t mr_size;
|
||||
};
|
||||
|
||||
/* FDT follows ePAPR */
|
||||
#define OFW_EPAPR
|
||||
|
||||
#endif /* _MACHINE_OFW_MACHDEP_H_ */
|
||||
|
@ -361,10 +361,11 @@ ofw_bus_search_intrmap(void *intr, int intrsz, void *regs, int physsz,
|
||||
paddrsz = 0;
|
||||
while (i > 0) {
|
||||
bcopy(mptr + physsz + intrsz, &parent, sizeof(parent));
|
||||
#ifdef OFW_EPAPR
|
||||
#ifndef OFW_IMAP_NO_IPARENT_ADDR_CELLS
|
||||
/*
|
||||
* Find if we need to read the parent address data. Sparc64
|
||||
* uses a different encoding that doesn't include this data.
|
||||
* Find if we need to read the parent address data.
|
||||
* CHRP-derived OF bindings, including ePAPR-compliant FDTs,
|
||||
* use this as an optional part of the specifier.
|
||||
*/
|
||||
if (OF_getencprop(OF_node_from_xref(parent),
|
||||
"#address-cells", &paddrsz, sizeof(paddrsz)) == -1)
|
||||
|
@ -34,6 +34,9 @@
|
||||
|
||||
typedef uint64_t cell_t;
|
||||
|
||||
/* sparc64 doesn't use the interrupt parent #address-cells in interrupt maps */
|
||||
#define OFW_IMAP_NO_IPARENT_ADDR_CELLS
|
||||
|
||||
int OF_decode_addr(phandle_t, int, int *, bus_addr_t *);
|
||||
void OF_getetheraddr(device_t, u_char *);
|
||||
u_int OF_getscsinitid(device_t);
|
||||
|
Loading…
Reference in New Issue
Block a user