Commit 44ad4700 authored by Stefan Richter's avatar Stefan Richter Committed by Chris Wright

[PATCH] ieee1394: ohci1394: add PPC_PMAC platform code to driver probe

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7431
iBook G3 threw a machine check exception and put the display backlight
to full brightness after ohci1394 was unloaded and reloaded.
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
[dsd@gentoo.org: also added missing if condition, commit
 63cca59e]
Signed-off-by: default avatarDaniel Drake <dsd@gentoo.org>
Acked-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 250c26f6
...@@ -3218,6 +3218,19 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, ...@@ -3218,6 +3218,19 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
struct ti_ohci *ohci; /* shortcut to currently handled device */ struct ti_ohci *ohci; /* shortcut to currently handled device */
resource_size_t ohci_base; resource_size_t ohci_base;
#ifdef CONFIG_PPC_PMAC
/* Necessary on some machines if ohci1394 was loaded/ unloaded before */
if (machine_is(powermac)) {
struct device_node *of_node = pci_device_to_OF_node(dev);
if (of_node) {
pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, of_node,
0, 1);
pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 1);
}
}
#endif /* CONFIG_PPC_PMAC */
if (pci_enable_device(dev)) if (pci_enable_device(dev))
FAIL(-ENXIO, "Failed to enable OHCI hardware"); FAIL(-ENXIO, "Failed to enable OHCI hardware");
pci_set_master(dev); pci_set_master(dev);
...@@ -3506,11 +3519,9 @@ static void ohci1394_pci_remove(struct pci_dev *pdev) ...@@ -3506,11 +3519,9 @@ static void ohci1394_pci_remove(struct pci_dev *pdev)
#endif #endif
#ifdef CONFIG_PPC_PMAC #ifdef CONFIG_PPC_PMAC
/* On UniNorth, power down the cable and turn off the chip /* On UniNorth, power down the cable and turn off the chip clock
* clock when the module is removed to save power on * to save power on laptops */
* laptops. Turning it back ON is done by the arch code when if (machine_is(powermac)) {
* pci_enable_device() is called */
{
struct device_node* of_node; struct device_node* of_node;
of_node = pci_device_to_OF_node(ohci->dev); of_node = pci_device_to_OF_node(ohci->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment