Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2246987pxu; Mon, 7 Dec 2020 01:06:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcVW85mGxdP5kY9xOA7rcE6kGfYuyes9iUI+Y7q2UdDB5y8XHjP4QxoVqy9/vcLtvAsiyM X-Received: by 2002:aa7:c698:: with SMTP id n24mr18790041edq.277.1607332018187; Mon, 07 Dec 2020 01:06:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607332018; cv=none; d=google.com; s=arc-20160816; b=ASNKUX3IHiL6no4ygjAfKR0ROLrVjLzYpl2+RDcleqL8crgwl2HvcQ4fjEif3kCJTx Amvnt74Lrom4LYgfm29GfYWqZN1+f/eCuOJWJr7mG1Tbiln9skpSIxFjyRD+4lmSH0tw 3VJcR4MGOEFV1CaAHI1f5n6K56smh1BgBgPuVM2BxN3AXfNcflztS0I1xc1RsICHwdJW fqBwvJSNeJgMq8ZvCv2CjOu7bGOiialZ0f9izr08bQhaXzDb2UBh3NQpqdLhdzb4w/Uj CG/ClACKxpHn6LUl4s6FsXmrIw5ZcyT9jydfeOtcjhva+vXidhIIJkHWJ0knqvtPH46S Kj5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=7VIM+zaCwxSz2NnrMkF2akWQ/OmJ85rzmyO+WvWcBnc=; b=ozy4gWuyWJP4W8aTmRqhqC3HmPrkdt3CS1jcpNxs8yiGXCdtw9bCiDMsqCnjinN0JO WRfFlp29ye/s0j0bi9p2TsUziX3nxrSpOmVqq7qOD1jhgG1q5LdxER31DMnDNPiLd7xp 75yOl2cNiY6d9tdTmAJnzDnsh5mWZTCub5vJt+2QYAuJcZw8JqB4OmpULF3EPqxb/Q3N JJJvyqYs66KZCajhyOVZSuhk0CRgnX9wcaw3W7zALZnDygB/P4oqOAK0naIrsk0O2WQ2 X7MswpEtX04bTuisU5TK/K4vGY48IspdJq/xrq3ROAjqZjRlm43RD8mFTBXcAZ0J14Me YL3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e23si7974763edc.252.2020.12.07.01.06.35; Mon, 07 Dec 2020 01:06:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726626AbgLGJDE (ORCPT + 99 others); Mon, 7 Dec 2020 04:03:04 -0500 Received: from twspam01.aspeedtech.com ([211.20.114.71]:53881 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726574AbgLGJCz (ORCPT ); Mon, 7 Dec 2020 04:02:55 -0500 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 0B78vaST096566; Mon, 7 Dec 2020 16:57:36 +0800 (GMT-8) (envelope-from troy_lee@aspeedtech.com) Received: from TroyLee-PC.localdomain (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 7 Dec 2020 17:00:24 +0800 From: Troy Lee To: Stefan Schaeckeler , Rob Herring , Joel Stanley , Andrew Jeffery , "Borislav Petkov" , Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , "open list:EDAC-CORE" CC: , , Subject: [PATCH v4 3/3] edac: Supporting AST2400 and AST2600 edac driver Date: Mon, 7 Dec 2020 17:00:13 +0800 Message-ID: <20201207090013.14145-3-troy_lee@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201207090013.14145-1-troy_lee@aspeedtech.com> References: <20201207090013.14145-1-troy_lee@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 0B78vaST096566 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding AST2400 and AST2600 edac driver support. Signed-off-by: Troy Lee --- drivers/edac/Kconfig | 6 +++--- drivers/edac/aspeed_edac.c | 7 +++++-- 2 files changed, 8 insertions(+), 5 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..a46da56d6d54 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; @@ -375,10 +375,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 +395,5 @@ module_platform_driver(aspeed_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Stefan Schaeckeler "); -MODULE_DESCRIPTION("Aspeed AST2500 EDAC driver"); +MODULE_DESCRIPTION("Aspeed BMC SoC EDAC driver"); MODULE_VERSION("1.0"); -- 2.17.1