All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loc Ho <lho-qTEPVZfXA3Y@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Doug Thompson
	<dougthompson-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
	Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>,
	Mauro Carvalho Chehab
	<mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Feng Kan <fkan-qTEPVZfXA3Y@public.gmane.org>,
	"jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"patches-qTEPVZfXA3Y@public.gmane.org"
	<patches-qTEPVZfXA3Y@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	linux-edac-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v6 3/5] Documentation: Add documentation for the APM X-Gene SoC EDAC DTS binding
Date: Thu, 23 Apr 2015 17:15:04 -0700	[thread overview]
Message-ID: <CAPw-ZTma9C6QhaCseWEOPn5nmym=TSU=GgBigSL2uc3xMUeUPQ@mail.gmail.com> (raw)
In-Reply-To: <CAL_JsqLyoEOw-Xzr2_QC-qbVW50CBEintD4hAtiY=_xwR5EBgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Rob,

>> This patch adds documentation for the APM X-Gene SoC EDAC DTS binding.
>>
>> Signed-off-by: Feng Kan <fkan-qTEPVZfXA3Y@public.gmane.org>
>> Signed-off-by: Loc Ho <lho-qTEPVZfXA3Y@public.gmane.org>
>> ---
>>  .../devicetree/bindings/edac/apm-xgene-edac.txt    |   82 ++++++++++++++++++++
>>  1 files changed, 82 insertions(+), 0 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
>>
>> diff --git a/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt b/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
>> new file mode 100644
>> index 0000000..db8c1c4
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
>> @@ -0,0 +1,82 @@
>> +* APM X-Gene SoC EDAC nodes
>> +
>> +EDAC nodes are defined to describe on-chip error detection and correction.
>> +There are four types of EDAC:
>> +
>> +  memory controller    - Memory controller
>> +  PMD (L1/L2)          - Processor module unit (PMD) L1/L2 cache
>> +  L3                   - CPU L3 cache
>> +  SoC                  - SoC IP such as SATA, Ethernet, and etc
>> +
>> +The following section describes the memory controller DT node binding.
>> +
>> +Required properties:
>> +- compatible           : Shall be "apm,xgene-edac-mc".
>> +- reg                  : First resource shall be the PCP resource.
>> +                         Second resource shall be the CSW resource.
>> +                         Third resource shall be the MCB-A resource.
>> +                         Fourth resource shall be the MCB-B resource.
>> +                         Fifth resource shall be the MCU resource.
>> +- interrupts            : Interrupt-specifier for MCU error IRQ(s).
>> +
>> +The following section describes the L1/L2 DT node binding.
>> +
>> +- compatible           : Shall be "apm,xgene-edac-pmd".
>> +- reg                  : First resource shall be the PCP resource.
>> +                         Second resource shall be the PMD resource.
>> +                         Third resource shall be the PMD efuse resource.
>> +- interrupts            : Interrupt-specifier for PMD error IRQ(s).
>> +
>> +The following section describes the L3 DT node binding.
>> +
>> +- compatible           : Shall be "apm,xgene-edac-l3".
>> +- reg                  : First resource shall be the PCP resource.
>> +                         Second resource shall be the L3 resource.
>> +- interrupts            : Interrupt-specifier for L3 error IRQ(s).
>> +
>> +The following section describes the SoC DT node binding.
>> +
>> +- compatible           : Shall be "apm,xgene-edac-soc"".
>> +- reg                  : First resource shall be the PCP resource.
>> +                         Second resource shall be the SoC resource.
>> +                         Third resource shall be the register bus resource.
>> +- interrupts           : Interrupt-specifier for SoC error IRQ(s).
>> +
>> +Example:
>> +       edacmc0: edacmc0@7e800000 {
>> +               compatible = "apm,xgene-edac-mc";
>> +               reg = <0x0 0x78800000 0x0 0x1000>,
>> +                     <0x0 0x7e200000 0x0 0x1000>,
>> +                     <0x0 0x7e700000 0x0 0x1000>,
>> +                     <0x0 0x7e720000 0x0 0x1000>,
>> +                     <0x0 0x7e800000 0x0 0x1000>;
>> +               interrupts = <0x0 0x20 0x4>,
>> +                            <0x0 0x21 0x4>;
>> +       };
>> +
>> +       edacl3: edacl3@7e600000 {
>> +               compatible = "apm,xgene-edac-l3";
>> +               reg = <0x0 0x78800000 0x0 0x1000>,
>
> You are defining overlapping resources. Don't do that.
>
> It looks to me like you are creating nodes based on driver functions,
> not h/w blocks. I would expect to see a memory controller node which
> contains ECC related registers. If you have blocks with multiple
> unrelated functions, then you should be using syscon to divide up the
> functions to different subsystems like EDAC.
>

How about these bindings:

efuse: efuse@1054a000 {
        compatible = "syscon";
        reg = <0x0 0x1054a000 0x0 0x20>;
};

pcperror: pcperror@78800000 {
        compatible = "syscon";
        reg = <0x0 0x78800000 0x0 0x100>;
};

csw: csw@7e200000 {
        compatible = "syscon";
        reg = <0x0 0x7e200000 0x0 0x1000>;
};

mcba: mcba@7e700000 {
        compatible = "syscon";
        reg = <0x0 0x7e700000 0x0 0x1000>;
}

mcbb: mcbb@7e720000 {
        compatible = "syscon";
        reg = <0x0 0x7e720000 0x0 0x1000>;
}

edacmc0: edacmc0@7e800000 {
        compatible = "apm,xgene-edac-mc";
        pcpmap = <&pcperror>;
        cswmap = <&csw>;
        mcbamap = <&mcba>;
        mcbbmap = <&mcbb>;
        reg = <0x0 0x7e800000 0x0 0x1000>;
        interrupts = <0x0 0x20 0x4>,
                         <0x0 0x21 0x4>;
};

edacpmd0: edacpmd0@7c000000 {
        compatible = "apm,xgene-edac-pmd";
        regmap = <&pcperror>;
        efusemap = <&efuse>;
        reg = <0x0 0x7c000000 0x0 0x200000>;
        interrupts = <0x0 0x20 0x4>,
                         <0x0 0x21 0x4>;
};

edacl3: edacl3@7e600000 {
        compatible = "apm,xgene-edac-l3";
        pcpmap = <&pcperror>;
        reg = <0x0 0x7e600000 0x0 0x1000>;
        interrupts = <0x0 0x20 0x4>,
                         <0x0 0x21 0x4>;
};

edacsoc: edacsoc@7e930000 {
        compatible = "apm,xgene-edac-soc";
        pcpmap = <&pcperror>;
        reg = <0x0 0x7e930000 0x0 0x1000>,
                 <0x0 0x7e000000 0x0 0x1000>;
        interrupts = <0x0 0x20 0x4>,
                         <0x0 0x21 0x4>,
                         <0x0 0x27 0x4>;
};

-Loc
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: lho@apm.com (Loc Ho)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 3/5] Documentation: Add documentation for the APM X-Gene SoC EDAC DTS binding
Date: Thu, 23 Apr 2015 17:15:04 -0700	[thread overview]
Message-ID: <CAPw-ZTma9C6QhaCseWEOPn5nmym=TSU=GgBigSL2uc3xMUeUPQ@mail.gmail.com> (raw)
In-Reply-To: <CAL_JsqLyoEOw-Xzr2_QC-qbVW50CBEintD4hAtiY=_xwR5EBgw@mail.gmail.com>

Hi Rob,

>> This patch adds documentation for the APM X-Gene SoC EDAC DTS binding.
>>
>> Signed-off-by: Feng Kan <fkan@apm.com>
>> Signed-off-by: Loc Ho <lho@apm.com>
>> ---
>>  .../devicetree/bindings/edac/apm-xgene-edac.txt    |   82 ++++++++++++++++++++
>>  1 files changed, 82 insertions(+), 0 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
>>
>> diff --git a/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt b/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
>> new file mode 100644
>> index 0000000..db8c1c4
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
>> @@ -0,0 +1,82 @@
>> +* APM X-Gene SoC EDAC nodes
>> +
>> +EDAC nodes are defined to describe on-chip error detection and correction.
>> +There are four types of EDAC:
>> +
>> +  memory controller    - Memory controller
>> +  PMD (L1/L2)          - Processor module unit (PMD) L1/L2 cache
>> +  L3                   - CPU L3 cache
>> +  SoC                  - SoC IP such as SATA, Ethernet, and etc
>> +
>> +The following section describes the memory controller DT node binding.
>> +
>> +Required properties:
>> +- compatible           : Shall be "apm,xgene-edac-mc".
>> +- reg                  : First resource shall be the PCP resource.
>> +                         Second resource shall be the CSW resource.
>> +                         Third resource shall be the MCB-A resource.
>> +                         Fourth resource shall be the MCB-B resource.
>> +                         Fifth resource shall be the MCU resource.
>> +- interrupts            : Interrupt-specifier for MCU error IRQ(s).
>> +
>> +The following section describes the L1/L2 DT node binding.
>> +
>> +- compatible           : Shall be "apm,xgene-edac-pmd".
>> +- reg                  : First resource shall be the PCP resource.
>> +                         Second resource shall be the PMD resource.
>> +                         Third resource shall be the PMD efuse resource.
>> +- interrupts            : Interrupt-specifier for PMD error IRQ(s).
>> +
>> +The following section describes the L3 DT node binding.
>> +
>> +- compatible           : Shall be "apm,xgene-edac-l3".
>> +- reg                  : First resource shall be the PCP resource.
>> +                         Second resource shall be the L3 resource.
>> +- interrupts            : Interrupt-specifier for L3 error IRQ(s).
>> +
>> +The following section describes the SoC DT node binding.
>> +
>> +- compatible           : Shall be "apm,xgene-edac-soc"".
>> +- reg                  : First resource shall be the PCP resource.
>> +                         Second resource shall be the SoC resource.
>> +                         Third resource shall be the register bus resource.
>> +- interrupts           : Interrupt-specifier for SoC error IRQ(s).
>> +
>> +Example:
>> +       edacmc0: edacmc0 at 7e800000 {
>> +               compatible = "apm,xgene-edac-mc";
>> +               reg = <0x0 0x78800000 0x0 0x1000>,
>> +                     <0x0 0x7e200000 0x0 0x1000>,
>> +                     <0x0 0x7e700000 0x0 0x1000>,
>> +                     <0x0 0x7e720000 0x0 0x1000>,
>> +                     <0x0 0x7e800000 0x0 0x1000>;
>> +               interrupts = <0x0 0x20 0x4>,
>> +                            <0x0 0x21 0x4>;
>> +       };
>> +
>> +       edacl3: edacl3 at 7e600000 {
>> +               compatible = "apm,xgene-edac-l3";
>> +               reg = <0x0 0x78800000 0x0 0x1000>,
>
> You are defining overlapping resources. Don't do that.
>
> It looks to me like you are creating nodes based on driver functions,
> not h/w blocks. I would expect to see a memory controller node which
> contains ECC related registers. If you have blocks with multiple
> unrelated functions, then you should be using syscon to divide up the
> functions to different subsystems like EDAC.
>

How about these bindings:

efuse: efuse at 1054a000 {
        compatible = "syscon";
        reg = <0x0 0x1054a000 0x0 0x20>;
};

pcperror: pcperror at 78800000 {
        compatible = "syscon";
        reg = <0x0 0x78800000 0x0 0x100>;
};

csw: csw at 7e200000 {
        compatible = "syscon";
        reg = <0x0 0x7e200000 0x0 0x1000>;
};

mcba: mcba at 7e700000 {
        compatible = "syscon";
        reg = <0x0 0x7e700000 0x0 0x1000>;
}

mcbb: mcbb at 7e720000 {
        compatible = "syscon";
        reg = <0x0 0x7e720000 0x0 0x1000>;
}

edacmc0: edacmc0 at 7e800000 {
        compatible = "apm,xgene-edac-mc";
        pcpmap = <&pcperror>;
        cswmap = <&csw>;
        mcbamap = <&mcba>;
        mcbbmap = <&mcbb>;
        reg = <0x0 0x7e800000 0x0 0x1000>;
        interrupts = <0x0 0x20 0x4>,
                         <0x0 0x21 0x4>;
};

edacpmd0: edacpmd0 at 7c000000 {
        compatible = "apm,xgene-edac-pmd";
        regmap = <&pcperror>;
        efusemap = <&efuse>;
        reg = <0x0 0x7c000000 0x0 0x200000>;
        interrupts = <0x0 0x20 0x4>,
                         <0x0 0x21 0x4>;
};

edacl3: edacl3 at 7e600000 {
        compatible = "apm,xgene-edac-l3";
        pcpmap = <&pcperror>;
        reg = <0x0 0x7e600000 0x0 0x1000>;
        interrupts = <0x0 0x20 0x4>,
                         <0x0 0x21 0x4>;
};

edacsoc: edacsoc at 7e930000 {
        compatible = "apm,xgene-edac-soc";
        pcpmap = <&pcperror>;
        reg = <0x0 0x7e930000 0x0 0x1000>,
                 <0x0 0x7e000000 0x0 0x1000>;
        interrupts = <0x0 0x20 0x4>,
                         <0x0 0x21 0x4>,
                         <0x0 0x27 0x4>;
};

-Loc

  parent reply	other threads:[~2015-04-24  0:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17  6:30 [PATCH v6 0/4] edac: Add APM X-Gene SoC EDAC driver Loc Ho
2015-03-17  6:30 ` Loc Ho
2015-03-17  6:30 ` [PATCH v6 1/5] arm64: Enable EDAC on ARM64 Loc Ho
2015-03-17  6:30   ` Loc Ho
2015-03-17  6:30   ` [PATCH v6 2/5] MAINTAINERS: Add entry for APM X-Gene SoC EDAC driver Loc Ho
2015-03-17  6:30     ` Loc Ho
2015-03-17  6:30     ` [PATCH v6 3/5] Documentation: Add documentation for the APM X-Gene SoC EDAC DTS binding Loc Ho
2015-03-17  6:30       ` Loc Ho
2015-03-17  6:30       ` [PATCH v6 4/5] edac: Add APM X-Gene SoC EDAC driver Loc Ho
2015-03-17  6:30         ` Loc Ho
2015-03-17  6:30         ` [PATCH v6 5/5] arm64: Add APM X-Gene SoC EDAC DTS entries Loc Ho
2015-03-17  6:30           ` Loc Ho
     [not found]       ` <1426573821-1937-4-git-send-email-lho-qTEPVZfXA3Y@public.gmane.org>
2015-04-23 18:48         ` [PATCH v6 3/5] Documentation: Add documentation for the APM X-Gene SoC EDAC DTS binding Rob Herring
2015-04-23 18:48           ` Rob Herring
     [not found]           ` <CAL_JsqLyoEOw-Xzr2_QC-qbVW50CBEintD4hAtiY=_xwR5EBgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-24  0:15             ` Loc Ho [this message]
2015-04-24  0:15               ` Loc Ho
     [not found] ` <1426573821-1937-1-git-send-email-lho-qTEPVZfXA3Y@public.gmane.org>
2015-03-26 17:39   ` [PATCH v6 0/4] edac: Add APM X-Gene SoC EDAC driver Loc Ho
2015-03-26 17:39     ` Loc Ho
     [not found]     ` <CAPw-ZTkOOh=1GgDBQ4a9KoWVA9B7GPXddwNx=VBjVTo44wYdug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-09 17:48       ` Borislav Petkov
2015-04-09 17:48         ` Borislav Petkov
     [not found]         ` <20150409174847.GI25434-fF5Pk5pvG8Y@public.gmane.org>
2015-04-23 18:07           ` Loc Ho
2015-04-23 18:07             ` Loc Ho

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='CAPw-ZTma9C6QhaCseWEOPn5nmym=TSU=GgBigSL2uc3xMUeUPQ@mail.gmail.com' \
    --to=lho-qtepvzfxa3y@public.gmane.org \
    --cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dougthompson-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=fkan-qTEPVZfXA3Y@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-edac-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org \
    --cc=patches-qTEPVZfXA3Y@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.