linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Andrew Jeffery" <andrew@aj.id.au>
To: "Troy Lee" <troy_lee@aspeedtech.com>,
	"Stefan M Schaeckeler" <sschaeck@cisco.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Joel Stanley" <joel@jms.id.au>, "Borislav Petkov" <bp@alien8.de>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Tony Luck" <tony.luck@intel.com>,
	"James Morse" <james.morse@arm.com>,
	"Robert Richter" <rric@kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	"moderated list:ARM/ASPEED MACHINE SUPPORT" 
	<linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/ASPEED MACHINE SUPPORT" 
	<linux-aspeed@lists.ozlabs.org>,
	"open list" <linux-kernel@vger.kernel.org>,
	"open list:EDAC-CORE" <linux-edac@vger.kernel.org>
Cc: leetroy@gmail.com, "Ryan Chen" <ryan_chen@aspeedtech.com>
Subject: Re: [PATCH v3 3/3] edac: Supporting AST2400 and AST2600 edac driver
Date: Mon, 07 Dec 2020 11:32:57 +1030	[thread overview]
Message-ID: <21488758-f839-4762-93d6-0e6c3397394f@www.fastmail.com> (raw)
In-Reply-To: <20201202101218.18393-3-troy_lee@aspeedtech.com>



On Wed, 2 Dec 2020, at 20:42, Troy Lee wrote:
> Adding AST2400 and AST2600 edac driver support.
> 
> Signed-off-by: Troy Lee <troy_lee@aspeedtech.com>
> ---
> Changes since v2:
> - Remove cross dependencies export functions
> - Update Kconfig depends on ARCH_ASPEED
> - Patch create against latest Linux kernel mainline
> 
> ---
>  drivers/edac/Kconfig       |  6 +++---
>  drivers/edac/aspeed_edac.c | 15 +++++----------
>  2 files changed, 8 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
> index 7a47680d6f07..c410331e8ee8 100644
> --- a/drivers/edac/Kconfig
> +++ b/drivers/edac/Kconfig
> @@ -515,10 +515,10 @@ config EDAC_QCOM
>  	  health, you should probably say 'Y' here.
>  
>  config EDAC_ASPEED
> -	tristate "Aspeed AST 2500 SoC"
> -	depends on MACH_ASPEED_G5
> +	tristate "Aspeed AST BMC SoC"
> +	depends on ARCH_ASPEED
>  	help
> -	  Support for error detection and correction on the Aspeed AST 2500 SoC.
> +	  Support for error detection and correction on the Aspeed AST BMC SoC.
>  
>  	  First, ECC must be configured in the bootloader. Then, this driver
>  	  will expose error counters via the EDAC kernel framework.
> diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
> index fde809efc520..c9d1d8a8fcba 100644
> --- a/drivers/edac/aspeed_edac.c
> +++ b/drivers/edac/aspeed_edac.c
> @@ -239,7 +239,7 @@ static int init_csrows(struct mem_ctl_info *mci)
>  	int rc;
>  
>  	/* retrieve info about physical memory from device tree */
> -	np = of_find_node_by_path("/memory");
> +	np = of_find_node_by_name(NULL, "memory");
>  	if (!np) {
>  		dev_err(mci->pdev, "dt: missing /memory node\n");
>  		return -ENODEV;
> @@ -282,7 +282,6 @@ static int aspeed_probe(struct platform_device *pdev)
>  	struct edac_mc_layer layers[2];
>  	struct mem_ctl_info *mci;
>  	void __iomem *regs;
> -	u32 reg04;
>  	int rc;
>  
>  	regs = devm_platform_ioremap_resource(pdev, 0);
> @@ -294,13 +293,6 @@ static int aspeed_probe(struct platform_device *pdev)
>  	if (IS_ERR(aspeed_regmap))
>  		return PTR_ERR(aspeed_regmap);
>  
> -	/* bail out if ECC mode is not configured */
> -	regmap_read(aspeed_regmap, ASPEED_MCR_CONF, &reg04);
> -	if (!(reg04 & ASPEED_MCR_CONF_ECC)) {
> -		dev_err(&pdev->dev, "ECC mode is not configured in u-boot\n");
> -		return -EPERM;
> -	}
> -

It might pay to separate this out as I think it's unrelated to the supporting 
the AST2[45]00?

Other than that I think the patch is on the right track.

Thanks for the quick responses Troy!

Andrew

>  	edac_op_state = EDAC_OPSTATE_INT;
>  
>  	/* allocate & init EDAC MC data structure */
> @@ -375,10 +367,13 @@ static int aspeed_remove(struct platform_device *pdev)
>  
>  
>  static const struct of_device_id aspeed_of_match[] = {
> +	{ .compatible = "aspeed,ast2400-sdram-edac" },
>  	{ .compatible = "aspeed,ast2500-sdram-edac" },
> +	{ .compatible = "aspeed,ast2600-sdram-edac" },
>  	{},
>  };
>  
> +MODULE_DEVICE_TABLE(of, aspeed_of_match);
>  
>  static struct platform_driver aspeed_driver = {
>  	.driver		= {
> @@ -392,5 +387,5 @@ module_platform_driver(aspeed_driver);
>  
>  MODULE_LICENSE("GPL");
>  MODULE_AUTHOR("Stefan Schaeckeler <sschaeck@cisco.com>");
> -MODULE_DESCRIPTION("Aspeed AST2500 EDAC driver");
> +MODULE_DESCRIPTION("Aspeed BMC SoC EDAC driver");
>  MODULE_VERSION("1.0");
> -- 
> 2.17.1
> 
>

      reply	other threads:[~2020-12-07  1:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 10:12 [PATCH v3 1/3] dt-bindings: edac: aspeed-sdram-edac: Add ast2400/ast2600 support Troy Lee
2020-12-02 10:12 ` [PATCH v3 2/3] ARM: dts: aspeed: Add AST2600 edac into common devicetree Troy Lee
2020-12-02 10:12 ` [PATCH v3 3/3] edac: Supporting AST2400 and AST2600 edac driver Troy Lee
2020-12-07  1:02   ` Andrew Jeffery [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21488758-f839-4762-93d6-0e6c3397394f@www.fastmail.com \
    --to=andrew@aj.id.au \
    --cc=bp@alien8.de \
    --cc=devicetree@vger.kernel.org \
    --cc=james.morse@arm.com \
    --cc=joel@jms.id.au \
    --cc=leetroy@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rric@kernel.org \
    --cc=ryan_chen@aspeedtech.com \
    --cc=sschaeck@cisco.com \
    --cc=tony.luck@intel.com \
    --cc=troy_lee@aspeedtech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).