linux/arch/powerpc/sysdev
Scott Wood 666db563d3 EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device
Originally the mpc85xx-pci-edac driver bound directly to the PCI
controller node.

Commit

  905e75c46d ("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 <mpe@ellerman.id.au>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Daniel Axtens <dja@axtens.net>
Cc: Doug Thompson <dougthompson@xmission.com>
Cc: Jia Hongtao <B38951@freescale.com>
Cc: Jiri Kosina <jkosina@suse.com>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Masanari Iida <standby24x7@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Rob Herring <robh@kernel.org>
Link: http://lkml.kernel.org/r/1449774432-18593-1-git-send-email-scottwood@freescale.com
Signed-off-by: Borislav Petkov <bp@suse.de>
2015-12-11 16:56:16 +01:00
..
ge genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
qe_lib irqdomain: Use irq_domain_get_of_node() instead of direct field access 2015-10-13 19:01:23 +02:00
xics powerpc, irq: Use access helper irq_data_get_affinity_mask() 2015-09-15 17:06:28 +02:00
6xx-suspend.S powerpc: Use CURRENT_THREAD_INFO instead of open coded assembly 2012-07-11 14:18:22 +10:00
axonram.c block: change ->make_request_fn() and users to return a queue cookie 2015-11-07 10:40:46 -07:00
cpm1.c powerpc: Mark low level irq handlers NO_THREAD 2013-06-20 16:55:08 +10:00
cpm2.c
cpm2_pic.c powerpc/cpm2: Use irq_set_handler_locked() 2015-09-16 15:43:10 +02:00
cpm2_pic.h
cpm_common.c powerpc: handle error case in cpm_muram_alloc() 2015-10-27 18:13:31 -05:00
dart.h
dart_iommu.c powerpc/iommu: Cleanup setting of DMA base/offset 2015-07-13 10:10:55 +10:00
dcr-low.S
dcr.c powerpc: Use bool function return values of true/false not 1/0 2015-03-31 14:19:47 +11:00
ehv_pic.c irqdomain: Use irq_domain_get_of_node() instead of direct field access 2015-10-13 19:01:23 +02:00
fsl_85xx_cache_ctlr.h powerpc/85xx: Fix sram_offset parameter type 2012-07-26 13:24:32 -05:00
fsl_85xx_cache_sram.c powerpc/85xx: Fix compiler error with THIS_MODULE and related 2012-03-16 14:50:25 -05:00
fsl_85xx_l2ctlr.c powerpc: sysdev: drop owner assignment from platform_drivers 2014-10-20 16:20:13 +02:00
fsl_gtm.c Merge remote-tracking branch 'grant/devicetree/next' into for-next 2013-11-07 10:34:46 -06:00
fsl_lbc.c powerpc: use subsys_initcall for Freescale Local Bus 2015-06-16 14:12:34 -04:00
fsl_mpic_err.c powerpc/mpic: FSL MPIC error interrupt support. 2012-09-12 14:57:10 -05:00
fsl_mpic_timer_wakeup.c powerpc/fsl: add MPIC timer wakeup support 2013-07-01 18:38:42 -05:00
fsl_msi.c irqdomain: Use irq_domain_get_of_node() instead of direct field access 2015-10-13 19:01:23 +02:00
fsl_msi.h powerpc/85xx: workaround for chips with MSI hardware errata 2015-03-23 19:51:18 -05:00
fsl_pci.c EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device 2015-12-11 16:56:16 +01:00
fsl_pci.h EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device 2015-12-11 16:56:16 +01:00
fsl_pmc.c powerpc: sysdev: drop owner assignment from platform_drivers 2014-10-20 16:20:13 +02:00
fsl_rio.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
fsl_rio.h powerpc/fsl-rio: add support for mapping inbound windows 2014-11-12 23:56:16 -06:00
fsl_rmu.c powerpc/rmu: Fix the error memory free parameters 2014-05-22 18:08:13 -05:00
fsl_soc.c powerpc/fsl: fsl_soc: delete unneeded test before of_node_put 2014-11-10 09:59:34 +11:00
fsl_soc.h powerpc/mpc512x: remove unnecessary #if 2013-10-30 22:56:10 +01:00
grackle.c powerpc: rename ppc_pci_*_flags to pci_*_flags 2011-07-12 09:28:04 -05:00
i8259.c irqdomain: Use irq_domain_get_of_node() instead of direct field access 2015-10-13 19:01:23 +02:00
indirect_pci.c powerpc/fsl_pci: Fix pci stack build bug with FRAME_WARN 2015-01-29 19:56:15 -06:00
ipic.c irqdomain: Use irq_domain_get_of_node() instead of direct field access 2015-10-13 19:01:23 +02:00
ipic.h irq_domain/powerpc: Use common irq_domain structure instead of irq_host 2012-02-14 14:06:50 -07:00
Kconfig powerpc: Added PCI MSI support using the HSTA module 2014-05-01 08:26:30 +10:00
Makefile powerpc/pasemi: Only the build the pasemi MSI code for PASEMI=y 2015-05-11 19:55:25 +10:00
micropatch.c powerpc/8xx: Remove empty asm/mpc8xx.h 2014-06-25 18:49:40 -05:00
mmio_nvram.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
mpc5xxx_clocks.c powerpc/mpc5xxx: Use of_get_next_parent to simplify code 2015-10-15 20:32:01 +11:00
mpc8xx_pic.c powerpc/8xx: Shorten irq_chip name for the SIU 2015-10-06 21:54:42 +11:00
mpc8xx_pic.h
mpic.c powerpc updates for 4.4 2015-11-05 23:38:43 -08:00
mpic.h powerpc/pasemi: Only the build the pasemi MSI code for PASEMI=y 2015-05-11 19:55:25 +10:00
mpic_msgr.c powerpc: sysdev: drop owner assignment from platform_drivers 2014-10-20 16:20:13 +02:00
mpic_msi.c irqdomain: Use irq_domain_get_of_node() instead of direct field access 2015-10-13 19:01:23 +02:00
mpic_timer.c powerpc/mpic_timer: fix convert ticks to time subtraction overflow 2014-01-09 17:52:14 -06:00
mpic_u3msi.c powerpc/MSI: Fix race condition in tearing down MSI interrupts 2015-09-10 17:27:08 +10:00
msi_bitmap.c powerpc/msi: Fix section mismatch warning in msi_bitmap_alloc() 2015-10-28 12:08:33 +09:00
mv64x60.h
mv64x60_dev.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00
mv64x60_pci.c POWERPC: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
mv64x60_pic.c powerpc: Constify irq_domain_ops 2015-05-11 16:58:20 +10:00
mv64x60_udbg.c dt/bindings: Remove device_type "serial" from marvell,mv64360-mpsc 2014-01-16 16:31:31 +00:00
of_rtc.c powerpc: add explicit OF includes 2013-10-09 20:04:11 -05:00
pmi.c powerpc: sysdev: drop owner assignment from platform_drivers 2014-10-20 16:20:13 +02:00
ppc4xx_cpm.c powerpc/4xx/cpm: delete unneeded test before of_node_put 2014-11-10 09:59:34 +11:00
ppc4xx_gpio.c
ppc4xx_hsta_msi.c powerpc updates for 4.3 2015-09-03 16:41:38 -07:00
ppc4xx_msi.c powerpc/MSI: Fix race condition in tearing down MSI interrupts 2015-09-10 17:27:08 +10:00
ppc4xx_ocm.c powerpc/44x: Fix ocm_block allocation 2013-12-10 11:25:04 +11:00
ppc4xx_pci.c powerpc: Remove superfluous bootmem includes 2014-11-10 09:59:26 +11:00
ppc4xx_pci.h powerpc/476fpe: Add 476fpe SoC code 2011-12-09 07:51:02 -05:00
ppc4xx_soc.c powerpc: add explicit OF includes 2013-10-09 20:04:11 -05:00
rtc_cmos_setup.c PTR_RET is now PTR_ERR_OR_ZERO(): Replace most. 2013-07-15 11:25:01 +09:30
scom.c powerpc/scom: Improve debugfs interface 2013-11-06 14:13:50 +11:00
simple_gpio.c powerpc: remove non-required uses of include <linux/module.h> 2011-10-31 19:30:44 -04:00
simple_gpio.h
tsi108_dev.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
tsi108_pci.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
udbg_memcons.c powerpc: Delete non-required instances of include <linux/init.h> 2014-01-15 13:46:44 +11:00
uic.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
xilinx_intc.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
xilinx_pci.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00