From patchwork Wed Oct 16 10:59:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 21070 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B844425B8B for ; Wed, 16 Oct 2013 11:00:17 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id h10sf1093438vbh.9 for ; Wed, 16 Oct 2013 04:00:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:sender:from:to:cc :subject:date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=FxF1dSKCCHM9mRicREZvmvGZ7oj/sMxRV93HD3iTuj8=; b=QDrRZTrvUamZBnwHzyszKZxA13KxoeCng3x133UG1ImXDt6FgRLwsyfOyH/xqlS1eS SYe1z1BSGui4zsHpeE+dDJEsaMmmQaLdHY2fLx1VDY/AWV0NuFC7khXro88JUrCeCgiW q12zYWX6laC8ofJwz8FTKAh9ArCdb48PMlThDXoRuGfFBKwjg2gvBgtzKPj9nvMIdyGz T3Qnk8rYpQ+P/EoOaCTh7/oVGa9EG8bYQBeffwucojFN979R9xEWcQ3InOqb/AsJ8tOv GVVs1opr6Vrisocli+i2dfx3DsBVyGoX4aS/36XJibqVFbPIOP1r2uTnJh71JdPOnu1+ EjTQ== X-Received: by 10.52.108.166 with SMTP id hl6mr673334vdb.0.1381921217613; Wed, 16 Oct 2013 04:00:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.64.38 with SMTP id l6ls449081qes.89.gmail; Wed, 16 Oct 2013 04:00:17 -0700 (PDT) X-Received: by 10.220.142.140 with SMTP id q12mr1068685vcu.21.1381921217469; Wed, 16 Oct 2013 04:00:17 -0700 (PDT) Received: from mail-vb0-x22e.google.com (mail-vb0-x22e.google.com [2607:f8b0:400c:c02::22e]) by mx.google.com with ESMTPS id pu5si5064526veb.59.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Oct 2013 04:00:17 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22e; Received: by mail-vb0-f46.google.com with SMTP id 10so207601vbe.19 for ; Wed, 16 Oct 2013 04:00:17 -0700 (PDT) X-Gm-Message-State: ALoCoQkRoF7L57i9awoTola4MitDBVJUXUs/eSHUIpkQtSOY3ER6o42pDO9UpMBZZONPRl99j1LM X-Received: by 10.58.210.66 with SMTP id ms2mr1876908vec.10.1381921217384; Wed, 16 Oct 2013 04:00:17 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp29659vcz; Wed, 16 Oct 2013 04:00:16 -0700 (PDT) X-Received: by 10.204.226.135 with SMTP id iw7mr1912174bkb.4.1381921216039; Wed, 16 Oct 2013 04:00:16 -0700 (PDT) Received: from mail-bk0-x22d.google.com (mail-bk0-x22d.google.com [2a00:1450:4008:c01::22d]) by mx.google.com with ESMTPS id cs5si11702082bkc.70.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Oct 2013 04:00:16 -0700 (PDT) Received-SPF: pass (google.com: domain of rric.net@gmail.com designates 2a00:1450:4008:c01::22d as permitted sender) client-ip=2a00:1450:4008:c01::22d; Received: by mail-bk0-f45.google.com with SMTP id mx11so202571bkb.18 for ; Wed, 16 Oct 2013 04:00:15 -0700 (PDT) X-Received: by 10.204.228.198 with SMTP id jf6mr1187868bkb.41.1381921215060; Wed, 16 Oct 2013 04:00:15 -0700 (PDT) Received: from rric.localhost (f053084124.adsl.alicedsl.de. [78.53.84.124]) by mx.google.com with ESMTPSA id kk2sm46597269bkb.10.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Oct 2013 04:00:14 -0700 (PDT) Sender: Robert Richter From: Robert Richter To: linux-edac@vger.kernel.org Cc: Rob Herring , linux-kernel@vger.kernel.org, Robert Richter , Robert Richter Subject: [PATCH 4/5] edac, highbank: Improve and unify naming Date: Wed, 16 Oct 2013 12:59:37 +0200 Message-Id: <1381921178-28511-5-git-send-email-rric@kernel.org> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1381921178-28511-1-git-send-email-rric@kernel.org> References: <1381921178-28511-1-git-send-email-rric@kernel.org> X-Original-Sender: rric.net@gmail.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gmail.com Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Robert Richter Assinging correct names of the 'hb_mc_edac' and 'hb_l2_edac' edac modules for module, controller and device. Reported values for Highbank in dmesg are now: EDAC MC0: Giving out device to module hb_mc_edac controller calxeda,hb-ddr-ctrl: DEV fff00000.memory-controller (INTERRUPT) EDAC DEVICE0: Giving out device to module hb_l2_edac controller calxeda,hb-sregs-l2-ecc: DEV fff3c200.sregs (INTERRUPT) Signed-off-by: Robert Richter Signed-off-by: Robert Richter --- drivers/edac/highbank_l2_edac.c | 17 ++++++++++------- drivers/edac/highbank_mc_edac.c | 5 +++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/edac/highbank_l2_edac.c b/drivers/edac/highbank_l2_edac.c index 10d3d29..2f19366 100644 --- a/drivers/edac/highbank_l2_edac.c +++ b/drivers/edac/highbank_l2_edac.c @@ -50,8 +50,15 @@ static irqreturn_t highbank_l2_err_handler(int irq, void *dev_id) return IRQ_HANDLED; } +static const struct of_device_id hb_l2_err_of_match[] = { + { .compatible = "calxeda,hb-sregs-l2-ecc", }, + {}, +}; +MODULE_DEVICE_TABLE(of, hb_l2_err_of_match); + static int highbank_l2_err_probe(struct platform_device *pdev) { + const struct of_device_id *id; struct edac_device_ctl_info *dci; struct hb_l2_drvdata *drvdata; struct resource *r; @@ -90,7 +97,9 @@ static int highbank_l2_err_probe(struct platform_device *pdev) goto err; } - dci->mod_name = dev_name(&pdev->dev); + id = of_match_device(hb_l2_err_of_match, &pdev->dev); + dci->mod_name = pdev->dev.driver->name; + dci->ctl_name = id ? id->compatible : "unknown"; dci->dev_name = dev_name(&pdev->dev); if (edac_device_add_device(dci)) @@ -129,12 +138,6 @@ static int highbank_l2_err_remove(struct platform_device *pdev) return 0; } -static const struct of_device_id hb_l2_err_of_match[] = { - { .compatible = "calxeda,hb-sregs-l2-ecc", }, - {}, -}; -MODULE_DEVICE_TABLE(of, hb_l2_err_of_match); - static struct platform_driver highbank_l2_edac_driver = { .probe = highbank_l2_err_probe, .remove = highbank_l2_err_remove, diff --git a/drivers/edac/highbank_mc_edac.c b/drivers/edac/highbank_mc_edac.c index 79cb872..8221191 100644 --- a/drivers/edac/highbank_mc_edac.c +++ b/drivers/edac/highbank_mc_edac.c @@ -233,9 +233,10 @@ static int highbank_mc_probe(struct platform_device *pdev) mci->mtype_cap = MEM_FLAG_DDR3; mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; mci->edac_cap = EDAC_FLAG_SECDED; - mci->mod_name = dev_name(&pdev->dev); + mci->mod_name = pdev->dev.driver->name; mci->mod_ver = "1"; - mci->ctl_name = dev_name(&pdev->dev); + mci->ctl_name = id->compatible; + mci->dev_name = dev_name(&pdev->dev); mci->scrub_mode = SCRUB_SW_SRC; /* Only a single 4GB DIMM is supported */