From 666db563d3d9fffcfc019e3d1a980dac47601a71 Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Thu, 10 Dec 2015 13:07:12 -0600 Subject: EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device Originally the mpc85xx-pci-edac driver bound directly to the PCI controller node. Commit 905e75c46dba ("powerpc/fsl-pci: Unify pci/pcie initialization code") turned the PCI controller code into a platform device. Since we can't have two drivers binding to the same device, the EDAC code was changed to be called into as a library-style submodule. However, this doesn't work if the EDAC driver is built as a module. Commit 8d8fcba6d1ea ("EDAC: Rip out the edac_subsys reference counting") exposed another problem with this approach -- mpc85xx_pci_err_probe() was being called in the same early boot phase that the PCI controller is initialized, rather than in the device_initcall phase that the EDAC layer expects. This caused a crash on boot. To fix this, the PCI controller code now creates a child platform device specifically for EDAC, which the mpc85xx-pci-edac driver binds to. Reported-by: Michael Ellerman Reviewed-by: Johannes Thumshirn Signed-off-by: Scott Wood Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Daniel Axtens Cc: Doug Thompson Cc: Jia Hongtao Cc: Jiri Kosina Cc: Kim Phillips Cc: linux-edac Cc: linuxppc-dev@lists.ozlabs.org Cc: Masanari Iida Cc: Mauro Carvalho Chehab Cc: Paul Mackerras Cc: Randy Dunlap Cc: Rob Herring Link: http://lkml.kernel.org/r/1449774432-18593-1-git-send-email-scottwood@freescale.com Signed-off-by: Borislav Petkov --- include/linux/fsl/edac.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 include/linux/fsl/edac.h (limited to 'include/linux/fsl/edac.h') diff --git a/include/linux/fsl/edac.h b/include/linux/fsl/edac.h new file mode 100644 index 000000000000..90d64d4ec1a9 --- /dev/null +++ b/include/linux/fsl/edac.h @@ -0,0 +1,8 @@ +#ifndef FSL_EDAC_H +#define FSL_EDAC_H + +struct mpc85xx_edac_pci_plat_data { + struct device_node *of_node; +}; + +#endif -- cgit v1.2.3-58-ga151