diff options
author | Linus Torvalds | 2016-01-11 20:36:20 -0800 |
---|---|---|
committer | Linus Torvalds | 2016-01-11 20:36:20 -0800 |
commit | d870a9d5e31ea69a1ceb7555d0d79364c442c5c0 (patch) | |
tree | ec20ff8bae64ceb35e86f44b1f30155b5d418693 /arch/powerpc | |
parent | 2634bf2550f4dd7d2d4373725dbe4c4d2a6499fd (diff) | |
parent | 1cac5503fbf751f121d0c9f96e69d1fdd3eb1471 (diff) |
Merge tag 'edac_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Pull EDAC updates from Borislav Petkov:
- hide EDAC workqueue from users (Borislav Petkov)
- edac_subsys init/teardown cleanup (Borislav Petkov)
- make mpc85xx-pci-edac a platform device (Scott Wood)
- sb_edac KNL gen2 support (Jim Snow)
- other small cleanups all over the place
* tag 'edac_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
EDAC, i5100: Use to_delayed_work()
MAINTAINERS: Fix EDAC repo URLs format
EDAC, sb_edac: Set fixed DIMM width on Xeon Knights Landing
EDAC: Rework workqueue handling
EDAC: Make edac_device workqueue setup/teardown functions static
EDAC: Remove edac_get_sysfs_subsys() error handling
EDAC: Unexport and make edac_subsys static
EDAC: Rip out the edac_subsys reference counting
EDAC: Robustify workqueues destruction
EDAC, mc_sysfs: Fix freeing bus' name
EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device
EDAC, sb_edac: Add Knights Landing (Xeon Phi gen 2) support
EDAC, sb_edac: Add support for duplicate device IDs
EDAC, sb_edac: Virtualize several hard-coded functions
EDAC, mv64x60: Use platform_register/unregister_drivers()
EDAC, mpc85xx: Use platform_register/unregister_drivers()
EDAC: Add DDR4 flag
EDAC: Remove references to bluesmoke.sourceforge.net
EDAC, pci: Remove old disabled code
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/sysdev/fsl_pci.c | 28 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_pci.h | 9 |
2 files changed, 27 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 610f472f91d1..a1ac80b3041a 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -21,10 +21,12 @@ #include <linux/pci.h> #include <linux/delay.h> #include <linux/string.h> +#include <linux/fsl/edac.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/memblock.h> #include <linux/log2.h> +#include <linux/platform_device.h> #include <linux/slab.h> #include <linux/suspend.h> #include <linux/syscore_ops.h> @@ -1255,6 +1257,25 @@ void fsl_pcibios_fixup_phb(struct pci_controller *phb) #endif } +static int add_err_dev(struct platform_device *pdev) +{ + struct platform_device *errdev; + struct mpc85xx_edac_pci_plat_data pd = { + .of_node = pdev->dev.of_node + }; + + errdev = platform_device_register_resndata(&pdev->dev, + "mpc85xx-pci-edac", + PLATFORM_DEVID_AUTO, + pdev->resource, + pdev->num_resources, + &pd, sizeof(pd)); + if (IS_ERR(errdev)) + return PTR_ERR(errdev); + + return 0; +} + static int fsl_pci_probe(struct platform_device *pdev) { struct device_node *node; @@ -1262,8 +1283,13 @@ static int fsl_pci_probe(struct platform_device *pdev) node = pdev->dev.of_node; ret = fsl_add_bridge(pdev, fsl_pci_primary == node); + if (ret) + return ret; - mpc85xx_pci_err_probe(pdev); + ret = add_err_dev(pdev); + if (ret) + dev_err(&pdev->dev, "couldn't register error device: %d\n", + ret); return 0; } diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h index c1cec771d5ea..151588530b06 100644 --- a/arch/powerpc/sysdev/fsl_pci.h +++ b/arch/powerpc/sysdev/fsl_pci.h @@ -130,15 +130,6 @@ void fsl_pci_assign_primary(void); static inline void fsl_pci_assign_primary(void) {} #endif -#ifdef CONFIG_EDAC_MPC85XX -int mpc85xx_pci_err_probe(struct platform_device *op); -#else -static inline int mpc85xx_pci_err_probe(struct platform_device *op) -{ - return -ENOTSUPP; -} -#endif - #ifdef CONFIG_FSL_PCI extern int fsl_pci_mcheck_exception(struct pt_regs *); #else |