All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loc Ho <lho-qTEPVZfXA3Y@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
Cc: "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Jon Masters <jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Mauro Carvalho Chehab
	<mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
	"patches-qTEPVZfXA3Y@public.gmane.org"
	<patches-qTEPVZfXA3Y@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Doug Thompson
	<dougthompson-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
	linux-edac-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v8 0/4] edac: Add APM X-Gene SoC memory controller EDAC driver
Date: Mon, 11 May 2015 15:29:10 -0700	[thread overview]
Message-ID: <CAPw-ZT=ubrjAvgTHBthzYQC7faSbaOvyFgX81=vcaiWKA8+bug@mail.gmail.com> (raw)
In-Reply-To: <2154265.kZOTsisCx2@wuerfel>

Hi,

>>
>> On Wed, May 6, 2015 at 11:29 AM, Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org> wrote:
>> > On Wed, May 06, 2015 at 11:12:20AM -0700, Loc Ho wrote:
>> >> 1. Whether to have an single driver for APM EDAC or multiple instance
>> >> of 4 different drivers. With single driver, it does not scale in the
>> >> future when we add/remove memory controllers and CPU domains. This is
>> >
>> > Why doesn't it scale? Please explain this to me more verbosely.
>>
>> Let me explain a bit more. We have four memory controller today.
>> Therefore, I would like to have 4 DTS node and the same driver probe
>> function called 4 times. If there is only one driver for the entire
>> APM EDAC, I would have to merge all the resource registers into an
>> single DTS node and its probe function called one time. In this one
>> driver design, what would I do in future chip or variant of the chip
>> in which it remove or add an addition memory controller? I would have
>> to change the driver as well as the DTS node. In the four instance
>> probe design, all I need is to add an additional DTS node.
>
> There are lots of possible representations in DT that would solve this.
>
> First of all, a device node can be turned into a platform_device but
> does not have to, so you you could have one DT node for the common
> parts (the pcp), and then subnodes underneath it, and have the driver
> attach to the main device but parse the subnodes manually to see
> what registers are there. There is no magic involved here, and this
> would address the concerns that Boris and I have.
>
> Another option would be to have multiple drivers: have one driver
> that handles the common parts here, and make that export a shared
> interface to which the other drivers can register, then create
> five drivers that each do one thing. In my opinion that would work
> just as well, and be a nice abstraction, but I suspect that Boris
> would prefer doing it the other way.

Thanks all for the comment. I will follow the design as with
gpio-dwapb driver. This would take care of Borislav concern as
mentioned by Arnd.

-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 v8 0/4] edac: Add APM X-Gene SoC memory controller EDAC driver
Date: Mon, 11 May 2015 15:29:10 -0700	[thread overview]
Message-ID: <CAPw-ZT=ubrjAvgTHBthzYQC7faSbaOvyFgX81=vcaiWKA8+bug@mail.gmail.com> (raw)
In-Reply-To: <2154265.kZOTsisCx2@wuerfel>

Hi,

>>
>> On Wed, May 6, 2015 at 11:29 AM, Borislav Petkov <bp@alien8.de> wrote:
>> > On Wed, May 06, 2015 at 11:12:20AM -0700, Loc Ho wrote:
>> >> 1. Whether to have an single driver for APM EDAC or multiple instance
>> >> of 4 different drivers. With single driver, it does not scale in the
>> >> future when we add/remove memory controllers and CPU domains. This is
>> >
>> > Why doesn't it scale? Please explain this to me more verbosely.
>>
>> Let me explain a bit more. We have four memory controller today.
>> Therefore, I would like to have 4 DTS node and the same driver probe
>> function called 4 times. If there is only one driver for the entire
>> APM EDAC, I would have to merge all the resource registers into an
>> single DTS node and its probe function called one time. In this one
>> driver design, what would I do in future chip or variant of the chip
>> in which it remove or add an addition memory controller? I would have
>> to change the driver as well as the DTS node. In the four instance
>> probe design, all I need is to add an additional DTS node.
>
> There are lots of possible representations in DT that would solve this.
>
> First of all, a device node can be turned into a platform_device but
> does not have to, so you you could have one DT node for the common
> parts (the pcp), and then subnodes underneath it, and have the driver
> attach to the main device but parse the subnodes manually to see
> what registers are there. There is no magic involved here, and this
> would address the concerns that Boris and I have.
>
> Another option would be to have multiple drivers: have one driver
> that handles the common parts here, and make that export a shared
> interface to which the other drivers can register, then create
> five drivers that each do one thing. In my opinion that would work
> just as well, and be a nice abstraction, but I suspect that Boris
> would prefer doing it the other way.

Thanks all for the comment. I will follow the design as with
gpio-dwapb driver. This would take care of Borislav concern as
mentioned by Arnd.

-Loc

  reply	other threads:[~2015-05-11 22:29 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06  4:02 [PATCH v8 0/4] edac: Add APM X-Gene SoC memory controller EDAC driver Loc Ho
2015-05-06  4:02 ` Loc Ho
     [not found] ` <1430884947-16787-1-git-send-email-lho-qTEPVZfXA3Y@public.gmane.org>
2015-05-06  4:02   ` [PATCH v8 1/5] arm64: Enable EDAC on ARM64 Loc Ho
2015-05-06  4:02     ` Loc Ho
     [not found]     ` <1430884947-16787-2-git-send-email-lho-qTEPVZfXA3Y@public.gmane.org>
2015-05-06  4:02       ` [PATCH v8 2/5] MAINTAINERS: Add entry for APM X-Gene SoC EDAC driver Loc Ho
2015-05-06  4:02         ` Loc Ho
     [not found]         ` <1430884947-16787-3-git-send-email-lho-qTEPVZfXA3Y@public.gmane.org>
2015-05-06  4:02           ` [PATCH v8 3/5] Documentation: Add documentation for the APM X-Gene SoC EDAC DTS binding Loc Ho
2015-05-06  4:02             ` Loc Ho
     [not found]             ` <1430884947-16787-4-git-send-email-lho-qTEPVZfXA3Y@public.gmane.org>
2015-05-06  4:02               ` [PATCH v8 4/5] edac: Add APM X-Gene SoC memory controller EDAC driver Loc Ho
2015-05-06  4:02                 ` Loc Ho
     [not found]                 ` <1430884947-16787-5-git-send-email-lho-qTEPVZfXA3Y@public.gmane.org>
2015-05-06  4:02                   ` [PATCH v8 5/5] arm64: Add APM X-Gene SoC memory controller EDAC DTS entries Loc Ho
2015-05-06  4:02                     ` Loc Ho
2015-05-06  4:10     ` [PATCH v8 1/5] arm64: Enable EDAC on ARM64 Jon Masters
2015-05-06  4:10       ` Jon Masters
2015-05-06  8:41   ` [PATCH v8 0/4] edac: Add APM X-Gene SoC memory controller EDAC driver Borislav Petkov
2015-05-06  8:41     ` Borislav Petkov
2015-05-06 17:00     ` Loc Ho
     [not found]       ` <CAPw-ZT=LepJr2Smjy81yhcTANdMRw99x1vR9rMoYsnHW_P3HPg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-06 17:12         ` Borislav Petkov
2015-05-06 17:12           ` Borislav Petkov
     [not found]           ` <20150506171242.GG22949-fF5Pk5pvG8Y@public.gmane.org>
2015-05-06 18:17             ` Loc Ho
2015-05-06 18:17               ` Loc Ho
2015-05-06  8:52   ` Arnd Bergmann
2015-05-06  8:52     ` Arnd Bergmann
2015-05-06 18:12     ` Loc Ho
2015-05-06 18:12       ` Loc Ho
     [not found]       ` <CAPw-ZTkuZWNM9D_wJRfQq009KeL1coyYKXhqhWV+FWW6C=xRiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-06 18:29         ` Borislav Petkov
2015-05-06 18:29           ` Borislav Petkov
     [not found]           ` <20150506182900.GI22949-fF5Pk5pvG8Y@public.gmane.org>
2015-05-06 18:43             ` Loc Ho
2015-05-06 18:43               ` Loc Ho
     [not found]               ` <CAPw-ZTmJ8C3KmujZJN1z21S3LFQ-TRouUeAjN0Y02HOTKAG1_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-06 19:50                 ` Arnd Bergmann
2015-05-06 19:50                   ` Arnd Bergmann
2015-05-11 22:29                   ` Loc Ho [this message]
2015-05-11 22:29                     ` 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-ZT=ubrjAvgTHBthzYQC7faSbaOvyFgX81=vcaiWKA8+bug@mail.gmail.com' \
    --to=lho-qtepvzfxa3y@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dougthompson-aS9lmoZGLiVWk0Htik3J/w@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 \
    /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.