Skip to content

Commit e89b405

Browse files
lunnJason Cooper
authored andcommitted
ARM: Kirkwood: TS219: Fix crash by double PCIe instantiation
When creating the DT based boards-ts219.c the none DT ts219-setup.c was used as a template. This includes a lateinit() call to initialize the PCIe bus. The code makes use of machine_is_ts219() which is never true on DT, so a FIXME was added and the code left as is. This was unproblematic until b73690c: "ARM: Kirkwood: Support basic hotplug for PCI-E" which changes the way the PCIe bus is initialized. The non-DT ts219-setup.c now crashes during boot. The lateinit() call in the DT boards-ts219.c is being called, machine_is_ts219() is true and so the PCIe is initialized a second time. This patch removes the useless, and now clearly dangerous, code from boards-ts219.c, making ts219-setup.c work again. Signed-off-by: Andrew Lunn <[email protected]> Cc: <[email protected]> # v3.9.x Signed-off-by: Jason Cooper <[email protected]>
1 parent 489e138 commit e89b405

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

arch/arm/mach-kirkwood/board-ts219.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,3 @@ void __init qnap_dt_ts219_init(void)
4141

4242
pm_power_off = qnap_tsx1x_power_off;
4343
}
44-
45-
/* FIXME: Will not work with DT. Maybe use MPP40_GPIO? */
46-
static int __init ts219_pci_init(void)
47-
{
48-
if (machine_is_ts219())
49-
kirkwood_pcie_init(KW_PCIE0);
50-
51-
return 0;
52-
}
53-
subsys_initcall(ts219_pci_init);

0 commit comments

Comments
 (0)