lkml.org 
[lkml]   [2009]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PCI PM: Restore standard config registers of all devices early


On Mon, 2 Feb 2009, Benjamin Herrenschmidt wrote:
>
> I don't know how x86 does but I'm sure there must be some kind ACPI
> thingy that must be called too before you can touch a device, in case it
> got powered off by more than just the standard D states (ie, clock
> stopped on the bus or whole power plane switched off).

It gets called later in that case.

> I'll try to reproduce and think about it more, but it looks to me that
> this patch might not be quite the right approach yet.

I think you'll need to move the clock gating thing to be a sysdev
suspend/resume event, which gets done really early along with things like
core timekeeping etc. We kind of hit that already with the USB driver,
where CONFIG_PPC does all kinds of wrong things:

#ifdef CONFIG_PPC_PMAC
if (retval == 0) {
/* Disable ASIC clocks for USB */
if (machine_is(powermac)) {
struct device_node *of_node;

of_node = pci_device_to_OF_node(dev);
if (of_node)
pmac_call_feature(PMAC_FTR_USB_ENABLE,
of_node, 0, 0);
}
}
#endif

inside the hcd-pci.c driver. If that whole thing was a sysdev feature, you
wouldn't need that kind of insane "do my own arch-specific thing in a
generic driver" thing. AND waking it up would work too.

I'm assuming this is exactly the kind of thing that is now biting you?

Linus


\
 
 \ /
  Last update: 2009-02-02 18:09    [W:0.106 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site