Skip to content

Commit

Permalink
ARM: Kirkwood: Support basic hotplug for PCI-E
Browse files Browse the repository at this point in the history
Unconditionally register the PCI-E bus, even if the link is currently
down. When the link is brought up the bus can be scanned through
/sys/bus/pci/rescan or otherwise. Since the HW has no interrupt for
link up, userspace will have to take care of the timing.

An earlier version of this was contingent on CONFIG_HOTPLUG, but
that is being removed from the kernel.

This also fixes printing the link up/down message to be displayed
on one line (structured logging broke this?)

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
  • Loading branch information
Jason Gunthorpe authored and Jason Cooper committed Jan 30, 2013
1 parent 183cadc commit b73690c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions arch/arm/mach-kirkwood/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,9 @@ static struct hw_pci kirkwood_pci __initdata = {

static void __init add_pcie_port(int index, void __iomem *base)
{
pr_info("Kirkwood PCIe port %d: ", index);

if (orion_pcie_link_up(base)) {
pr_info("link up\n");
pcie_port_map[num_pcie_ports++] = index;
} else
pr_info("link down, ignoring\n");
pcie_port_map[num_pcie_ports++] = index;
pr_info("Kirkwood PCIe port %d: link %s\n", index,
orion_pcie_link_up(base) ? "up" : "down");
}

void __init kirkwood_pcie_init(unsigned int portmask)
Expand Down

0 comments on commit b73690c

Please sign in to comment.