Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp117508imm; Tue, 28 Aug 2018 17:44:13 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYr2nHo1a6iJl0j2UIsB+0LPAVV6XqdOYBfmT19VAevw/5JkH9ii0ntkMLV1QeAmbf1tCuo X-Received: by 2002:a62:2459:: with SMTP id r86-v6mr3590912pfj.31.1535503453130; Tue, 28 Aug 2018 17:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535503453; cv=none; d=google.com; s=arc-20160816; b=dnzJHOGck7+GFvc+sJnwgR2Y0+uLLIP2dOpiCzF85xsNrHq1DuVxu1oS4Ho2iRDHCm AtGoYClf6UUJrfYeT4hEGpM6cZ2Clbz7Fu8fLE/5L77dFF+zh1mtA3/MCo6DQLj/isEN SvrN1r8n1Wq8Ag7ETCp1ApzvXZ7+9y8vzHr4hz5lQy/DMsN94eFkmIFmcI2l76qwPo/Q ok+1zLJ0ebWCvo/6xiXKR+ehzUjqAHHR5eQdtAmk5E6ZCWnORbHvsnmbFIpmAXe+iHhF /HARbQ4vv46kSHywTCDP0rwAT6O99VvTSZSZxBiPiBL7tDeRLh8j5phPwexn7EXpRuBm I/Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=DewXoxZHxyfEo2ObriBi0UsSdwYCPTEow9b4QWtEtxk=; b=MhhGyCw+59IhMwrC+Qn0bu1L48dfoI8ZYXR4Lj7EPQtgvlXQ5Kisd4yg0Bsad9JMrQ 6ABSQhH8AhN5/WeyRaTbk3hj3PquL6i5Kz07lPOt1O2oGpqZdEnzf7uiM7fJZm4W7Q+O PR7JEiX+Lz5Uzfky3YibHnUvlXS1p1rCr3BXplDpw+FBob1VyQS2XqpkQ21nt5c/VVuL V8VRpRNC8rcMvkRg+Kgk+IQT/C0nGgzqHRuqdW0dNJrtEAlhLE7MCENR/FXyyqQzF0Ce lxTRswhcI+Tqt7S+cd8y7VIi+72fBoawPtej+N9uL0JxCmrXs7r/lAuZgiVvGWzUxReO rY2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=etVh7KHd; dkim=pass header.i=@codeaurora.org header.s=default header.b=JdtOElrv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f127-v6si2382373pfb.290.2018.08.28.17.43.58; Tue, 28 Aug 2018 17:44:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=etVh7KHd; dkim=pass header.i=@codeaurora.org header.s=default header.b=JdtOElrv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727681AbeH2Egr (ORCPT + 99 others); Wed, 29 Aug 2018 00:36:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:48746 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727531AbeH2Egq (ORCPT ); Wed, 29 Aug 2018 00:36:46 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3B25D60712; Wed, 29 Aug 2018 00:42:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535503353; bh=CAZrfvh/C54OE1nhC0/JyldBOYAEvvIe27oSKO+a75A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=etVh7KHdjZ9PGJFdSqr1zwKfrI9shVhzWNS6qia/mtQ5+N+iK1kvqox+XboAHD0uB KcthwmNkDwjlk40HzCfbaRDJLQDbzlJmbE4lZm+fuCVRr/Tb7LBUaEEtOsswndA90u NknOa0Bna45MPUGikQDUGBf6zNZd4v+xftAtS1ec= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from vgutta-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vnkgutta@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id CFCA260385; Wed, 29 Aug 2018 00:42:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535503352; bh=CAZrfvh/C54OE1nhC0/JyldBOYAEvvIe27oSKO+a75A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JdtOElrvIlMz6NbAh4eTVUUNHSfeONpvWCJlvhO9tHTC76UF2jcox10+xoGQQPVrb +L9WCj26u3Wq3KfBrse4xK5JDmioWo1P47ISZtfxTZtJ25Ep1qjmPbgaTHJYGqMdEw dfHCI9u7eyQviT0uGWBSa/0TrMnsEp/u6Wt83uTY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CFCA260385 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vnkgutta@codeaurora.org From: Venkata Narendra Kumar Gutta To: evgreen@chromium.org, robh@kernel.org, mchehab@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Gross , David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, tsoni@codeaurora.org, ckadabi@codeaurora.org, rishabhb@codeaurora.org, bp@alien8.de, swboyd@chromium.org Cc: Venkata Narendra Kumar Gutta Subject: [PATCH v3 2/4] drivers: soc: Add support to register LLCC EDAC driver Date: Tue, 28 Aug 2018 17:42:25 -0700 Message-Id: <1535503347-20507-3-git-send-email-vnkgutta@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535503347-20507-1-git-send-email-vnkgutta@codeaurora.org> References: <1535503347-20507-1-git-send-email-vnkgutta@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cache error reporting controller detects and reports single and double bit errors on Last Level Cache Controller (LLCC) cache. Add required support to register LLCC EDAC driver as platform driver, from LLCC driver. Signed-off-by: Venkata Narendra Kumar Gutta --- drivers/soc/qcom/llcc-slice.c | 18 ++++++++++++++++-- include/linux/soc/qcom/llcc-qcom.h | 2 ++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/llcc-slice.c b/drivers/soc/qcom/llcc-slice.c index a63640d..09c8bb0 100644 --- a/drivers/soc/qcom/llcc-slice.c +++ b/drivers/soc/qcom/llcc-slice.c @@ -224,7 +224,7 @@ static int qcom_llcc_cfg_program(struct platform_device *pdev) u32 attr0_val; u32 max_cap_cacheline; u32 sz; - int ret; + int ret = 0; const struct llcc_slice_config *llcc_table; struct llcc_slice_desc desc; @@ -282,6 +282,7 @@ int qcom_llcc_probe(struct platform_device *pdev, struct resource *llcc_banks_res, *llcc_bcast_res; void __iomem *llcc_banks_base, *llcc_bcast_base; int ret, i; + struct platform_device *llcc_edac; drv_data = devm_kzalloc(dev, sizeof(*drv_data), GFP_KERNEL); if (!drv_data) @@ -341,6 +342,19 @@ int qcom_llcc_probe(struct platform_device *pdev, mutex_init(&drv_data->lock); platform_set_drvdata(pdev, drv_data); - return qcom_llcc_cfg_program(pdev); + ret = qcom_llcc_cfg_program(pdev); + if (ret) + return ret; + + drv_data->ecc_irq = platform_get_irq(pdev, 0); + if (drv_data->ecc_irq >= 0) { + llcc_edac = platform_device_register_data(&pdev->dev, + "qcom_llcc_edac", -1, drv_data, + sizeof(*drv_data)); + if (IS_ERR(llcc_edac)) + dev_err(dev, "Failed to register llcc edac driver\n"); + } + + return ret; } EXPORT_SYMBOL_GPL(qcom_llcc_probe); diff --git a/include/linux/soc/qcom/llcc-qcom.h b/include/linux/soc/qcom/llcc-qcom.h index c681e79..2e4b34d 100644 --- a/include/linux/soc/qcom/llcc-qcom.h +++ b/include/linux/soc/qcom/llcc-qcom.h @@ -78,6 +78,7 @@ struct llcc_slice_config { * @num_banks: Number of llcc banks * @bitmap: Bit map to track the active slice ids * @offsets: Pointer to the bank offsets array + * @ecc_irq: interrupt for llcc cache error detection and reporting */ struct llcc_drv_data { struct regmap *regmap; @@ -89,6 +90,7 @@ struct llcc_drv_data { u32 num_banks; unsigned long *bitmap; u32 *offsets; + int ecc_irq; }; #if IS_ENABLED(CONFIG_QCOM_LLCC) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project