[PATCH] ARM: Kirkwood: Support basic hotplug for PCI-E

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Wed Nov 21 13:47:54 EST 2012


On Wed, Nov 21, 2012 at 01:35:27PM -0500, Jason Cooper wrote:
> On Wed, Nov 21, 2012 at 11:25:28AM -0700, Jason Gunthorpe wrote:
> > Unconditionally register the PCI-E bus, even if the link is currently
> > down. 
> 
> How does this affect clock gating on boards without PCI-E devices?  Will
> the SoC then power this unconditionally?

Hmm, interesting question.. This will definitely hold the clock lock
on the PCI-E ports even if they are down at boot, and they will surely
consume more power than if they were switched off.

However, if a board has no possible PCI-E devices, then it shouldn't
be calling kirkwood_pcie_init, which will let things gate.

So the only case is boards that have pluggable PCI-E devices, where no
device is in the plug? That sounds like eval cards, is this a big
deal?

I guess another way to deal with this is to make the stuff in
kirkwood/pcie.c an actual platform driver and hot attach the entire
driver rather than using just using pci/rescan, but that is a fairly
extensive change.. And I worry that powering down the interface in the
interm will require re-initializing all the registers, which linux
doesn't have the code to do at all.

How about fixing this up to have a DT binding and make it a DT
controlled option - that seems like a simple middle ground..

What do you think?

Jason



More information about the linux-arm-kernel mailing list