Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp253279pxp; Wed, 16 Mar 2022 05:13:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtwsU3eshz5HXFvXSf5EHO9+qcmbzLqag6KzTB8YswMt4BNVTpqTJ/sr0upmSttCzfefLm X-Received: by 2002:a63:5360:0:b0:380:7412:340f with SMTP id t32-20020a635360000000b003807412340fmr29189864pgl.234.1647432822023; Wed, 16 Mar 2022 05:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647432822; cv=none; d=google.com; s=arc-20160816; b=zzKNMmZdTVIWO7cnaY9WKV8/gZDQtWkKASctqzGZQIFPpM/++1rRSsOpccZ4jFgOUn yw9amsI/YzGtRVKEbaHPHj150Z4ZKYjYuVQvQ64h3ZkpfkA0SqWXFS4P2dysm0CxOmBN VUDunIHa5ptv2pE3Khsw/oVcfgdS3TbITh7FIEobcyXP8fvxWbTWY628KO9XadE1cZpq wBCwkGXO4Z5+ak5m33SOZ9SMAQfR+uCYj2Vr5J4vTsPY8ZoxeQnNDRVndLCTqD84NgP0 VCbpnxnQi06s3R1RZQA+kX6cdzLm8TqIHpgDC98gc7nhC8g50VJ3rzUaQhejWjqnlpan 2FdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Iq78d1j2Ue+2y6u1MiPwO8kxCr3UFeP2P8LyryGJ4Ic=; b=ouIuqZCRjXhZBBlGma59f48f6E9mgSglIp7AJ8bIi7GV+1A5M3Tg8wmFiSd/mI44jE TkIXj/anQz5PPUbXXqDxiPPQF67gkCE7fbvXiGxZTtHdqv5wiiXYy4k54aBgeil/7gfe LOa+Yen97XFx2K3Icz/I1dgBIZIfd8ahFYB4/udiO2GVv3+Bd+BOzR3IjxE9vUbD7KXX +3fu2c1LSetDKvdApjOmh/TB1KrTLbIZYBkDWcM9j+EAHlrR8/7ElP/RNdEws1jKO6h5 iwi+n+HaWqxsGBvlZwsoYlMd4ePrJt5eyFCSX5T4cOhCDcv4TOCVzmZp8fnGphmI7UId m66Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Dws+yd7p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z7-20020a056a00240700b004f39ab039d6si1860542pfh.47.2022.03.16.05.13.25; Wed, 16 Mar 2022 05:13:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Dws+yd7p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237689AbiCNI0A (ORCPT + 99 others); Mon, 14 Mar 2022 04:26:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231159AbiCNIZx (ORCPT ); Mon, 14 Mar 2022 04:25:53 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AF2DE092; Mon, 14 Mar 2022 01:24:43 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id q10so20668733ljc.7; Mon, 14 Mar 2022 01:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Iq78d1j2Ue+2y6u1MiPwO8kxCr3UFeP2P8LyryGJ4Ic=; b=Dws+yd7pP/4j0pJJ3NzE1FS+WEUDWo+U39fxUZEgwR/+CZjtWUFtDvpHGPP1Opi1d3 K8JgF8oICvaNNXvW3XJDL1sVNJvKBYy3Ad5urfijjOX24uX1AcF2hsAdIu5yNsuQx47c +Ze4OWmVoR7A+h9PG1l8C+dHry7A7z0elHPZDRNEHWcUUU+aAmlsdIttF7nK/HXGlb8U G1iiCd6lZ0tGbayACmVI3Yh55JwdqHQZGoL6W1grXKKE7YJc9EJnom6CwTpSr8VBBue8 13MHXJH/MeYe9AFjf9cyZLu3bGjKGHyYPfhcDfjJQ3ac75LrWPWdYE1utmyy6lZJ8rE0 BBYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Iq78d1j2Ue+2y6u1MiPwO8kxCr3UFeP2P8LyryGJ4Ic=; b=RpZUcTACimeZPYSjYSVPKbLKRQTCORkfOYRYCf56falOO8CT19QjuR6puP9DX4n91C WNR4zNFj3JLgtxVVtIp30yt+k+l3K/XTJN959yfVwpZkpkX6iBaDPb5ItPlM87jnf+AA iymns7x47Fj8sbNzzXBrtol0yy8HTzfpeB1g5B7tLzGD0vcDDT4hg7wXA4oxmHP1/HWk e5TX2pcX/J9bp6SLoKNe7A4yY4pfEKgkHF+scOrEWW3GRbMRSSYzbR1hXPxVjJzrCdRz pAal/5T+DfaIEACWp0FAd8drgEEBn3licnc6X1U7517YvT0XCw+4LrUPJC26XnnTrvsQ 7vMw== X-Gm-Message-State: AOAM531m0R6Nyaubj0Bkr5li88bq6Wve7Lg4AHYJB4rTQA7CN0gotCqs ibyIcrugTzUKK5WjA9wp9pYpb8GI+EyamfpOUzA= X-Received: by 2002:a2e:2202:0:b0:248:684:4476 with SMTP id i2-20020a2e2202000000b0024806844476mr13871061lji.64.1647246281586; Mon, 14 Mar 2022 01:24:41 -0700 (PDT) MIME-Version: 1.0 References: <20220311014245.4612-1-ctcchien@nuvoton.com> <20220311014245.4612-4-ctcchien@nuvoton.com> <1f5e1e49-4ab0-5e06-fa8f-2a11b0fd1df9@canonical.com> <143db512-0223-1553-c141-2dc24a23c430@canonical.com> In-Reply-To: <143db512-0223-1553-c141-2dc24a23c430@canonical.com> From: Medad Young Date: Mon, 14 Mar 2022 16:24:30 +0800 Message-ID: Subject: Re: [PATCH v3 3/3] EDAC: nuvoton: Add NPCM memory controller driver To: Krzysztof Kozlowski Cc: rric@kernel.org, James Morse , tony.luck@intel.com, Mauro Carvalho Chehab , Borislav Petkov , Rob Herring , Benjamin Fair , Nancy Yuen , Patrick Venture , KWLIU@nuvoton.com, YSCHU@nuvoton.com, JJLIU0@nuvoton.com, KFTING , Avi Fishman , Tomer Maimon , Tali Perry , ctcchien@nuvoton.com, linux-edac , Linux Kernel Mailing List , devicetree , OpenBMC Maillist Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Krzysztof Kozlowski =E6=96=BC 2022=E5= =B9=B43=E6=9C=8814=E6=97=A5 =E9=80=B1=E4=B8=80 =E4=B8=8B=E5=8D=883:36=E5=AF=AB=E9=81=93=EF=BC=9A > > On 14/03/2022 06:32, Medad Young wrote: > > Krzysztof Kozlowski =E6=96=BC 2022= =E5=B9=B43=E6=9C=8811=E6=97=A5 > > =E9=80=B1=E4=BA=94 =E4=B8=8B=E5=8D=885:15=E5=AF=AB=E9=81=93=EF=BC=9A > >> > >> On 11/03/2022 02:42, Medad CChien wrote: > >>> Add support for Nuvoton NPCM SoC. > >>> > >>> Signed-off-by: Medad CChien > >>> --- > >>> drivers/edac/Kconfig | 9 + > >>> drivers/edac/Makefile | 1 + > >>> drivers/edac/npcm_edac.c | 714 +++++++++++++++++++++++++++++++++++++= ++ > >>> 3 files changed, 724 insertions(+) > >>> create mode 100644 drivers/edac/npcm_edac.c > >>> > >>> diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig > >>> index 58ab63642e72..757e1d160640 100644 > >>> --- a/drivers/edac/Kconfig > >>> +++ b/drivers/edac/Kconfig > >>> @@ -539,4 +539,13 @@ config EDAC_DMC520 > >>> Support for error detection and correction on the > >>> SoCs with ARM DMC-520 DRAM controller. > >>> > >>> +config EDAC_NPCM > >>> + tristate "Nuvoton NPCM DDR Memory Controller" > >>> + depends on ARCH_NPCM > >> > >> || COMPILE_TEST > >> (and test if it compiles) > >> > >> (...) > >> > >>> + > >>> +MODULE_DEVICE_TABLE(of, npcm_edac_of_match); > >>> + > >>> +static int npcm_edac_mc_probe(struct platform_device *pdev) > >>> +{ > >>> + const struct npcm_edac_platform_data *npcm_chip; > >>> + struct device *dev =3D &pdev->dev; > >>> + struct edac_mc_layer layers[1]; > >>> + const struct of_device_id *id; > >>> + struct priv_data *priv_data; > >>> + struct mem_ctl_info *mci; > >>> + struct resource *res; > >>> + void __iomem *reg; > >>> + int ret =3D -ENODEV; > >>> + int irq; > >>> + > >>> + id =3D of_match_device(npcm_edac_of_match, &pdev->dev); > >>> + if (!id) > >>> + return -ENODEV; > >> > >> Why do you need it? How such case is even possible? > > this driver is used for two nuvoton SOCs, one is NPCM845 and the other > > is NPCM750 > > Yes and how NULL can happen for OF-only driver? Unless I missed > something and this is not an OF-only driver? Do you allow any other > matching methods? I got your point, thanks > Best regards, > Krzysztof