All of lore.kernel.org
 help / color / mirror / Atom feed
* Suspend/Resume support for PCI
@ 2014-06-25 15:35 AYAN KUMAR HALDER
  2014-06-26  5:04 ` Fwd: " AYAN KUMAR HALDER
  0 siblings, 1 reply; 7+ messages in thread
From: AYAN KUMAR HALDER @ 2014-06-25 15:35 UTC (permalink / raw)
  To: kernelnewbies

Hi,

I am using a ARM based custom SOC which has a power management unit to
turn off/on the various power domains. When I execute a suspend
command(echo mem > /sys/power/state), then I turn off the power of the
entire SOC except my PMU( as they are in different power domains).
When ever the PMU receives a certain wake-up interrupt, it powers up
the CPU and SOC and the CPU resumes the kernel as per the Linux power
management framework.

Now I have a PCI controller which has been configured in
"linux/arch/arm/<mach-mysoc>/pcie.c". During suspend as the PCI
power(which is part of the SOC power domain) gets turned off, so the
controller loses its register configurations. On resume, the pci
driver's resume functions get called and the system hangs up(when it
tries to read/write to pci configuration space).

As per my understanding, the pci driver has implementation of bus/
device power management. It does not reconfigure the pci controller.
So how should I make the pci controller work fine on system resume.
Is it so that I need to reconfigure the pcie controller's registers
(as it has been done in "linux/arch/arm/<mach-mysoc>/pcie.c") from the
resume function of pci driver. Or would that compromise the entire
linux pm framework.

Regards,
Ayan Kumar Halder

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Fwd: Suspend/Resume support for PCI
  2014-06-25 15:35 Suspend/Resume support for PCI AYAN KUMAR HALDER
@ 2014-06-26  5:04 ` AYAN KUMAR HALDER
  2014-06-26 15:26   ` Bjorn Helgaas
  0 siblings, 1 reply; 7+ messages in thread
From: AYAN KUMAR HALDER @ 2014-06-26  5:04 UTC (permalink / raw)
  To: Scott Murray, linux-pci

Hi,

I am using a ARM based custom SOC which has a power management unit to
turn off/on the various power domains. When I execute a suspend
command(echo mem > /sys/power/state), then I turn off the power of the
entire SOC except my PMU( as they are in different power domains).
When ever the PMU receives a certain wake-up interrupt, it powers up
the CPU and SOC and the CPU resumes the kernel as per the Linux power
management framework.

Now I have a PCI controller which has been configured in
"linux/arch/arm/<mach-mysoc>/pcie.c". During suspend as the PCI
power(which is part of the SOC power domain) gets turned off, so the
controller loses its register configurations. On resume, the pci
driver's resume functions get called and the system hangs up(when it
tries to read/write to pci configuration space).

As per my understanding, the pci driver has implementation of bus/
device power management. It does not reconfigure the pci controller.
So how should I make the pci controller work fine on system resume.
Is it so that I need to reconfigure the pcie controller's registers
(as it has been done in "linux/arch/arm/<mach-mysoc>/pcie.c") from the
resume function of pci driver. Or would that compromise the entire
linux pm framework.

Regards,
Ayan Kumar Halder

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Suspend/Resume support for PCI
  2014-06-26  5:04 ` Fwd: " AYAN KUMAR HALDER
@ 2014-06-26 15:26   ` Bjorn Helgaas
  0 siblings, 0 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2014-06-26 15:26 UTC (permalink / raw)
  To: AYAN KUMAR HALDER
  Cc: Scott Murray, linux-pci, Rafael J. Wysocki, Linux PM list

[+cc Rafael, linux-pm]

On Wed, Jun 25, 2014 at 11:04 PM, AYAN KUMAR HALDER
<ayankumarh@gmail.com> wrote:
> Hi,
>
> I am using a ARM based custom SOC which has a power management unit to
> turn off/on the various power domains. When I execute a suspend
> command(echo mem > /sys/power/state), then I turn off the power of the
> entire SOC except my PMU( as they are in different power domains).
> When ever the PMU receives a certain wake-up interrupt, it powers up
> the CPU and SOC and the CPU resumes the kernel as per the Linux power
> management framework.
>
> Now I have a PCI controller which has been configured in
> "linux/arch/arm/<mach-mysoc>/pcie.c". During suspend as the PCI
> power(which is part of the SOC power domain) gets turned off, so the
> controller loses its register configurations. On resume, the pci
> driver's resume functions get called and the system hangs up(when it
> tries to read/write to pci configuration space).
>
> As per my understanding, the pci driver has implementation of bus/
> device power management. It does not reconfigure the pci controller.
> So how should I make the pci controller work fine on system resume.
> Is it so that I need to reconfigure the pcie controller's registers
> (as it has been done in "linux/arch/arm/<mach-mysoc>/pcie.c") from the
> resume function of pci driver. Or would that compromise the entire
> linux pm framework.
>
> Regards,
> Ayan Kumar Halder
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Suspend/Resume support for PCI
  2014-06-26  5:54 ` AYAN KUMAR HALDER
@ 2014-06-26  6:00   ` Viresh Kumar
  -1 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2014-06-26  6:00 UTC (permalink / raw)
  To: AYAN KUMAR HALDER, Arnd Bergmann, Ulf Hansson
  Cc: Lists linaro-kernel, linux-arm-kernel, linux-pm

Cc'd Arnd/Ulf.

On 26 June 2014 11:24, AYAN KUMAR HALDER <ayankumarh@gmail.com> wrote:
> Hi,
>
> I am using a ARM based custom SOC which has a power management unit to
> turn off/on the various power domains. When I execute a suspend
> command(echo mem > /sys/power/state), then I turn off the power of the
> entire SOC except my PMU( as they are in different power domains).
>
> When ever the PMU receives a certain wake-up interrupt, it powers up
> the CPU and SOC and the CPU resumes the kernel as per the Linux power
> management framework.
>
> Now I have a PCI controller which has been configured in
> "linux/arch/arm/<mach-mysoc>/pcie.c". During suspend as the PCI
> power(which is part of the SOC power domain) gets turned off, so the
> controller loses its register configurations. On resume, the pci
> driver's resume functions get called and the system hangs up(when it
> tries to read/write to pci configuration space).
>
> As per my understanding, the pci driver has implementation of bus/
> device power management. It does not reconfigure the pci controller.
> So how should I make the pci controller work fine on system resume.
> Is it so that I need to reconfigure the pcie controller's registers
> (as it has been done in "linux/arch/arm/<mach-mysoc>/pcie.c") from the
> resume function of pci driver. Or would that compromise the entire
> linux pm framework.

AFAIR, you need to do a save/restore of registers for all peripherals
you care about from the suspend/resume callbacks..

There must be many examples of this, like: drivers/gpio/gpio-pl061.c

I was involved in doing this long back and am not aware of latest
happenings around this.

People cc'd must be able to tell you better answers probably :)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Suspend/Resume support for PCI
@ 2014-06-26  6:00   ` Viresh Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2014-06-26  6:00 UTC (permalink / raw)
  To: linux-arm-kernel

Cc'd Arnd/Ulf.

On 26 June 2014 11:24, AYAN KUMAR HALDER <ayankumarh@gmail.com> wrote:
> Hi,
>
> I am using a ARM based custom SOC which has a power management unit to
> turn off/on the various power domains. When I execute a suspend
> command(echo mem > /sys/power/state), then I turn off the power of the
> entire SOC except my PMU( as they are in different power domains).
>
> When ever the PMU receives a certain wake-up interrupt, it powers up
> the CPU and SOC and the CPU resumes the kernel as per the Linux power
> management framework.
>
> Now I have a PCI controller which has been configured in
> "linux/arch/arm/<mach-mysoc>/pcie.c". During suspend as the PCI
> power(which is part of the SOC power domain) gets turned off, so the
> controller loses its register configurations. On resume, the pci
> driver's resume functions get called and the system hangs up(when it
> tries to read/write to pci configuration space).
>
> As per my understanding, the pci driver has implementation of bus/
> device power management. It does not reconfigure the pci controller.
> So how should I make the pci controller work fine on system resume.
> Is it so that I need to reconfigure the pcie controller's registers
> (as it has been done in "linux/arch/arm/<mach-mysoc>/pcie.c") from the
> resume function of pci driver. Or would that compromise the entire
> linux pm framework.

AFAIR, you need to do a save/restore of registers for all peripherals
you care about from the suspend/resume callbacks..

There must be many examples of this, like: drivers/gpio/gpio-pl061.c

I was involved in doing this long back and am not aware of latest
happenings around this.

People cc'd must be able to tell you better answers probably :)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Suspend/Resume support for PCI
@ 2014-06-26  5:54 ` AYAN KUMAR HALDER
  0 siblings, 0 replies; 7+ messages in thread
From: AYAN KUMAR HALDER @ 2014-06-26  5:54 UTC (permalink / raw)
  To: linaro-kernel, linux-arm-kernel, linux-pm

Hi,

I am using a ARM based custom SOC which has a power management unit to
turn off/on the various power domains. When I execute a suspend
command(echo mem > /sys/power/state), then I turn off the power of the
entire SOC except my PMU( as they are in different power domains).

When ever the PMU receives a certain wake-up interrupt, it powers up
the CPU and SOC and the CPU resumes the kernel as per the Linux power
management framework.

Now I have a PCI controller which has been configured in
"linux/arch/arm/<mach-mysoc>/pcie.c". During suspend as the PCI
power(which is part of the SOC power domain) gets turned off, so the
controller loses its register configurations. On resume, the pci
driver's resume functions get called and the system hangs up(when it
tries to read/write to pci configuration space).

As per my understanding, the pci driver has implementation of bus/
device power management. It does not reconfigure the pci controller.
So how should I make the pci controller work fine on system resume.
Is it so that I need to reconfigure the pcie controller's registers
(as it has been done in "linux/arch/arm/<mach-mysoc>/pcie.c") from the
resume function of pci driver. Or would that compromise the entire
linux pm framework.

Regards,
Ayan Kumar Halder

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Suspend/Resume support for PCI
@ 2014-06-26  5:54 ` AYAN KUMAR HALDER
  0 siblings, 0 replies; 7+ messages in thread
From: AYAN KUMAR HALDER @ 2014-06-26  5:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I am using a ARM based custom SOC which has a power management unit to
turn off/on the various power domains. When I execute a suspend
command(echo mem > /sys/power/state), then I turn off the power of the
entire SOC except my PMU( as they are in different power domains).

When ever the PMU receives a certain wake-up interrupt, it powers up
the CPU and SOC and the CPU resumes the kernel as per the Linux power
management framework.

Now I have a PCI controller which has been configured in
"linux/arch/arm/<mach-mysoc>/pcie.c". During suspend as the PCI
power(which is part of the SOC power domain) gets turned off, so the
controller loses its register configurations. On resume, the pci
driver's resume functions get called and the system hangs up(when it
tries to read/write to pci configuration space).

As per my understanding, the pci driver has implementation of bus/
device power management. It does not reconfigure the pci controller.
So how should I make the pci controller work fine on system resume.
Is it so that I need to reconfigure the pcie controller's registers
(as it has been done in "linux/arch/arm/<mach-mysoc>/pcie.c") from the
resume function of pci driver. Or would that compromise the entire
linux pm framework.

Regards,
Ayan Kumar Halder

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-26 15:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25 15:35 Suspend/Resume support for PCI AYAN KUMAR HALDER
2014-06-26  5:04 ` Fwd: " AYAN KUMAR HALDER
2014-06-26 15:26   ` Bjorn Helgaas
2014-06-26  5:54 AYAN KUMAR HALDER
2014-06-26  5:54 ` AYAN KUMAR HALDER
2014-06-26  6:00 ` Viresh Kumar
2014-06-26  6:00   ` Viresh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.