Hi,
>
> No need for the #ifdef here.
>
i will fix this globally in the patch
>> +void __devinit pci_load_OF_ranges(struct pci_controller *hose,
>> + struct device_node *node)
>> +{
>
> s/load_OF/load_of/
ok, some other arch did _OF_ so i blindly copied it.
>> + const __be32 *ranges;
>> + int rlen;
>> + int pna = of_n_addr_cells(node);
>> + int np = pna + 5;
>> +
>> + pr_info("PCI host bridge %s ranges:\n", node->full_name);
>> + ranges = of_get_property(node, "ranges",&rlen);
>> + if (ranges == NULL)
>> + return;
>> + hose->of_node = node;
>> +
>> + while ((rlen -= np * 4)>= 0) {
>> + u32 pci_space;
>> + struct resource *res = 0;
>> + unsigned long long addr, size;
>> +
>> + pci_space = ranges[0];
>> + addr = of_translate_address(node, ranges + 3);
>> + size = of_read_number(ranges + pna + 3, 2);
>
> All of this should be able to be replaced with of_get_address();
>
> There is a bunch of of/pci related infrastructure. Can any of it be
> leveraged?
i look at it when i made the patch 3 months ago. the pci ranges are
mapped very differently to normal reg= <addr len>; properties. You can
find some info about this at the bottom of this link
http://devicetree.org/Device_Tree_Usage
|