summaryrefslogtreecommitdiff
path: root/arch/arm/mach-kirkwood/pcie.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-11-26 01:26:14 -0800
committerOlof Johansson <olof@lixom.net>2012-11-26 01:26:49 -0800
commit52cfa7e54b480661e20dfd8788a24cfcba8a0ca5 (patch)
tree1624420fb5814cb659f710967d6fb980110d40bf /arch/arm/mach-kirkwood/pcie.c
parent2a18588c0ce336933be3c99c91e74e21db56a0fe (diff)
parent4a9329a04ceec56fc1ec155b6ea4d8b50f350a7b (diff)
Merge branch 'orion/cleanup' into orion/dt
Merge in the cleanups that should have been used as the base of the DT branch instead of letting the conflicts be exposed all the way up to the toplevel merges. All of these are caused by cleanups being done both in the cleanup branch and the dt branch, resulting in remove/remove conflicts of header files. By Andrew Lunn (3) and others via Jason Cooper * orion/cleanup: ARM: Kirkwood: Use hw_pci.ops instead of hw_pci.scan ARM: Kirkwood: checkpatch cleanups ARM: Kirkwood: Fix sparse warnings. ARM: Kirkwood: Remove unused includes ARM: kirkwood: cleanup lsxl board includes Remove/remove conflicts in: arch/arm/mach-kirkwood/board-dockstar.c arch/arm/mach-kirkwood/board-goflexnet.c arch/arm/mach-kirkwood/board-lsxl.c Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-kirkwood/pcie.c')
-rw-r--r--arch/arm/mach-kirkwood/pcie.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
index ec544918b12c..1e9f90ee0f5c 100644
--- a/arch/arm/mach-kirkwood/pcie.c
+++ b/arch/arm/mach-kirkwood/pcie.c
@@ -26,7 +26,7 @@ static void kirkwood_enable_pcie_clk(const char *port)
clk = clk_get_sys("pcie", port);
if (IS_ERR(clk)) {
- printk(KERN_ERR "PCIE clock %s missing\n", port);
+ pr_err("PCIE clock %s missing\n", port);
return;
}
clk_prepare_enable(clk);
@@ -168,7 +168,7 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys)
return 0;
index = pcie_port_map[nr];
- printk(KERN_INFO "PCI: bus%d uses PCIe port %d\n", sys->busnr, index);
+ pr_info("PCI: bus%d uses PCIe port %d\n", sys->busnr, index);
pp = kzalloc(sizeof(*pp), GFP_KERNEL);
if (!pp)
@@ -186,7 +186,8 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys)
case 1:
kirkwood_enable_pcie_clk("1");
pcie1_ioresources_init(pp);
- pci_ioremap_io(SZ_64K * sys->busnr, KIRKWOOD_PCIE1_IO_PHYS_BASE);
+ pci_ioremap_io(SZ_64K * sys->busnr,
+ KIRKWOOD_PCIE1_IO_PHYS_BASE);
break;
default:
panic("PCIe setup: invalid controller %d", index);
@@ -224,22 +225,6 @@ static void __devinit rc_pci_fixup(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
-static struct pci_bus __init *
-kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys)
-{
- struct pci_bus *bus;
-
- if (nr < num_pcie_ports) {
- bus = pci_scan_root_bus(NULL, sys->busnr, &pcie_ops, sys,
- &sys->resources);
- } else {
- bus = NULL;
- BUG();
- }
-
- return bus;
-}
-
static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot,
u8 pin)
{
@@ -251,19 +236,19 @@ static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot,
static struct hw_pci kirkwood_pci __initdata = {
.setup = kirkwood_pcie_setup,
- .scan = kirkwood_pcie_scan_bus,
.map_irq = kirkwood_pcie_map_irq,
+ .ops = &pcie_ops,
};
static void __init add_pcie_port(int index, void __iomem *base)
{
- printk(KERN_INFO "Kirkwood PCIe port %d: ", index);
+ pr_info("Kirkwood PCIe port %d: ", index);
if (orion_pcie_link_up(base)) {
- printk(KERN_INFO "link up\n");
+ pr_info("link up\n");
pcie_port_map[num_pcie_ports++] = index;
} else
- printk(KERN_INFO "link down, ignoring\n");
+ pr_info("link down, ignoring\n");
}
void __init kirkwood_pcie_init(unsigned int portmask)