Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 328ca7ae authored by Thor Thayer's avatar Thor Thayer Committed by Borislav Petkov
Browse files

EDAC, altera: Remove platform device from check_deps()



In preparation for the Arria10 peripheral ECCs, remove the platform
device parameter from the check_deps() functions because it is not
needed and makes the Arria10 check_deps() cleaner.

Signed-off-by: default avatarThor Thayer <tthayer@opensource.altera.com>
Cc: devicetree@vger.kernel.org
Cc: dinguyen@opensource.altera.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux@arm.linux.org.uk
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1458576106-24505-4-git-send-email-tthayer@opensource.altera.com


Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
parent 05b088b6
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -746,7 +746,7 @@ static int altr_edac_device_probe(struct platform_device *pdev)


	/* Check specific dependencies for the module */
	/* Check specific dependencies for the module */
	if (drvdata->data->setup) {
	if (drvdata->data->setup) {
		res = drvdata->data->setup(pdev, drvdata->base);
		res = drvdata->data->setup(drvdata);
		if (res)
		if (res)
			goto fail1;
			goto fail1;
	}
	}
@@ -856,9 +856,9 @@ static void ocram_free_mem(void *p, size_t size, void *other)
 *	Can't turn on ECC here because accessing un-initialized
 *	Can't turn on ECC here because accessing un-initialized
 *	memory will cause CE/UE errors possibly causing an ABORT.
 *	memory will cause CE/UE errors possibly causing an ABORT.
 */
 */
static int altr_ocram_check_deps(struct platform_device *pdev,
static int altr_ocram_check_deps(struct altr_edac_device_dev *device)
				 void __iomem *base)
{
{
	void __iomem  *base = device->base;
	if (readl(base) & ALTR_OCR_ECC_EN)
	if (readl(base) & ALTR_OCR_ECC_EN)
		return 0;
		return 0;


@@ -923,9 +923,9 @@ static void l2_free_mem(void *p, size_t size, void *other)
 *	Bail if ECC is not enabled.
 *	Bail if ECC is not enabled.
 *	Note that L2 Cache Enable is forced at build time.
 *	Note that L2 Cache Enable is forced at build time.
 */
 */
static int altr_l2_check_deps(struct platform_device *pdev,
static int altr_l2_check_deps(struct altr_edac_device_dev *device)
			      void __iomem *base)
{
{
	void __iomem *base = device->base;
	if (readl(base) & ALTR_L2_ECC_EN)
	if (readl(base) & ALTR_L2_ECC_EN)
		return 0;
		return 0;


+3 −1
Original line number Original line Diff line number Diff line
@@ -217,8 +217,10 @@ struct altr_sdram_mc_data {
#define ALTR_L2_ECC_INJS                BIT(1)
#define ALTR_L2_ECC_INJS                BIT(1)
#define ALTR_L2_ECC_INJD                BIT(2)
#define ALTR_L2_ECC_INJD                BIT(2)


struct altr_edac_device_dev;

struct edac_device_prv_data {
struct edac_device_prv_data {
	int (*setup)(struct platform_device *pdev, void __iomem *base);
	int (*setup)(struct altr_edac_device_dev *device);
	int ce_clear_mask;
	int ce_clear_mask;
	int ue_clear_mask;
	int ue_clear_mask;
	char dbgfs_name[20];
	char dbgfs_name[20];