Skip to content

Commit

Permalink
[PATCH] powerpc: Remove device_node addrs/n_addr
Browse files Browse the repository at this point in the history
The pre-parsed addrs/n_addrs fields in struct device_node are finally
gone. Remove the dodgy heuristics that did that parsing at boot and
remove the fields themselves since we now have a good replacement with
the new OF parsing code. This patch also fixes a bunch of drivers to use
the new code instead, so that at least pmac32, pseries, iseries and g5
defconfigs build.

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
  • Loading branch information
ozbenh authored and paulusmack committed Jan 9, 2006
1 parent 9cf84d7 commit cc5d018
Show file tree
Hide file tree
Showing 31 changed files with 793 additions and 1,106 deletions.
2 changes: 0 additions & 2 deletions arch/powerpc/kernel/btext.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ int __init btext_find_display(int allow_nonstdout)
struct device_node *np = NULL;
int rc = -ENODEV;

printk("trying to initialize btext ...\n");

name = (char *)get_property(of_chosen, "linux,stdout-path", NULL);
if (name != NULL) {
np = of_find_node_by_path(name);
Expand Down
24 changes: 22 additions & 2 deletions arch/powerpc/kernel/pci_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,25 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
unsigned long phb_io_base_phys,
void __iomem * phb_io_base_virt)
{
/* Remove these asap */

struct pci_address {
u32 a_hi;
u32 a_mid;
u32 a_lo;
};

struct isa_address {
u32 a_hi;
u32 a_lo;
};

struct isa_range {
struct isa_address isa_addr;
struct pci_address pci_addr;
unsigned int size;
};

struct isa_range *range;
unsigned long pci_addr;
unsigned int isa_addr;
Expand Down Expand Up @@ -1330,8 +1349,9 @@ unsigned int pci_address_to_pio(phys_addr_t address)
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
if (address >= hose->io_base_phys &&
address < (hose->io_base_phys + hose->pci_io_size))
return (unsigned int)hose->io_base_virt +
(address - hose->io_base_phys);
return (unsigned int)
((unsigned long)hose->io_base_virt +
(address - hose->io_base_phys));
}
return (unsigned int)-1;
}
Expand Down
Loading

0 comments on commit cc5d018

Please sign in to comment.