Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81121
b: refs/heads/master
c: bc0826c
h: refs/heads/master
i:
  81119: ac6bb28
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Dec 20, 2007
1 parent 299455e commit b9b4bd2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 549beb9ba3b03345cbd8e1233825d5b197a3f9f7
refs/heads/master: bc0826cfb102b6f360f2ec3082fa794f5dbbdee7
18 changes: 14 additions & 4 deletions trunk/arch/powerpc/platforms/powermac/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ void __init pmac_pci_init(void)
#endif
}

#ifdef CONFIG_PPC32
int pmac_pci_enable_device_hook(struct pci_dev *dev)
{
struct device_node* node;
Expand Down Expand Up @@ -1106,7 +1107,6 @@ int pmac_pci_enable_device_hook(struct pci_dev *dev)
* bridge and we must not, for example, enable MWI or set the
* cache line size on them.
*/
#ifdef CONFIG_PPC32
if (updatecfg) {
u16 cmd;

Expand All @@ -1118,12 +1118,23 @@ int pmac_pci_enable_device_hook(struct pci_dev *dev)

pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
L1_CACHE_BYTES >> 2);
#endif
}

return 0;
}

void __devinit pmac_pci_fixup_ohci(struct pci_dev *dev)
{
struct device_node *node = pci_device_to_OF_node(dev);

/* We don't want to assign resources to USB controllers
* absent from the OF tree (iBook second controller)
*/
if (dev->class == PCI_CLASS_SERIAL_USB_OHCI && !node)
dev->resource[0].flags = 0;
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, PCI_ANY_ID, pmac_pci_fixup_ohci);

/* We power down some devices after they have been probed. They'll
* be powered back on later on
*/
Expand Down Expand Up @@ -1171,7 +1182,6 @@ void __init pmac_pcibios_after_init(void)
of_node_put(nd);
}

#ifdef CONFIG_PPC32
void pmac_pci_fixup_cardbus(struct pci_dev* dev)
{
if (!machine_is(powermac))
Expand Down Expand Up @@ -1259,7 +1269,7 @@ void pmac_pci_fixup_pciata(struct pci_dev* dev)
}
}
DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata);
#endif
#endif /* CONFIG_PPC32 */

/*
* Disable second function on K2-SATA, it's broken
Expand Down

0 comments on commit b9b4bd2

Please sign in to comment.