From: Sekhar Nori <nsekhar@ti.com>
To: "Philip, Avinash" <avinashphilip@ti.com>
Cc: "Mohammed, Afzal" <afzal@ti.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"tony@atomide.com" <tony@atomide.com>,
"artem.bityutskiy@linux.intel.com"
<artem.bityutskiy@linux.intel.com>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
"broonie@opensource.wolfsonmicro.com"
<broonie@opensource.wolfsonmicro.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Rob Herring <rob.herring@calxeda.com>,
"Hebbar, Gururaja" <gururaja.hebbar@ti.com>,
Grant Likely <grant.likely@secretlab.ca>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Rob Landley <rob@landley.net>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"rmk+kernel@arm.linux.org.uk" <rmk+kernel@arm.linux.org.uk>,
"ivan.djelic@parrot.com" <ivan.djelic@parrot.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 2/3] mtd: devices: elm: Add support for ELM error correction
Date: Wed, 12 Dec 2012 16:45:51 +0530 [thread overview]
Message-ID: <50C86767.60806@ti.com> (raw)
In-Reply-To: <518397C60809E147AF5323E0420B992E3EA1FA14@DBDE01.ent.ti.com>
On 12/10/2012 12:13 PM, Philip, Avinash wrote:
> On Fri, Dec 07, 2012 at 16:07:23, Nori, Sekhar wrote:
>> On 11/29/2012 5:16 PM, Philip, Avinash wrote:
[...]
>>> +struct device *elm_request(enum bch_ecc bch_type)
>>> +{
>>> + struct elm_info *info;
>>> +
>>> + list_for_each_entry(info, &elm_devices, list) {
>>> + if (info && info->dev) {
>>> + info->bch_type = bch_type;
>>> + elm_config(info);
>>> + return info->dev;
>>> + }
>>> + }
>>
>> This will always return the first ELM device probed since you never
>> remove the allocated device from the list.
>
> But now I realized that, there is no mechanism of freeing the requested
> resource.
Right. You essentially want to assign an ELM instance to work with a
given instance of GPMC and that could be done statically too. Just pass
phandle of ELM node in GPMC DT data?
> So I will add mechanism to request ELM module successfully only if ELM
> module is not requested already and add mechanism to free it, on NAND
> driver module unload (loadable module support). This way ELM driver
> can achieve multi instance support.
>
>> I wonder why you really need a list?
>
> The prime motivation for the list is the driver should support multi
> instances of ELM by removing global symbols.
I still think a request/free API is bit too much for something that will
turn out to be a simple 1-to-1 match anyway. Can you please look at the
phandle suggestion above? I am no DT expert, but I think that will work
for your use case.
Thanks,
Sekhar
WARNING: multiple messages have this Message-ID (diff)
From: Sekhar Nori <nsekhar@ti.com>
To: "Philip, Avinash" <avinashphilip@ti.com>
Cc: "dwmw2@infradead.org" <dwmw2@infradead.org>,
"artem.bityutskiy@linux.intel.com"
<artem.bityutskiy@linux.intel.com>,
"Mohammed, Afzal" <afzal@ti.com>,
"tony@atomide.com" <tony@atomide.com>,
"broonie@opensource.wolfsonmicro.com"
<broonie@opensource.wolfsonmicro.com>,
"rmk+kernel@arm.linux.org.uk" <rmk+kernel@arm.linux.org.uk>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Hebbar, Gururaja" <gururaja.hebbar@ti.com>,
"ivan.djelic@parrot.com" <ivan.djelic@parrot.>
Subject: Re: [PATCH v3 2/3] mtd: devices: elm: Add support for ELM error correction
Date: Wed, 12 Dec 2012 16:45:51 +0530 [thread overview]
Message-ID: <50C86767.60806@ti.com> (raw)
In-Reply-To: <518397C60809E147AF5323E0420B992E3EA1FA14@DBDE01.ent.ti.com>
On 12/10/2012 12:13 PM, Philip, Avinash wrote:
> On Fri, Dec 07, 2012 at 16:07:23, Nori, Sekhar wrote:
>> On 11/29/2012 5:16 PM, Philip, Avinash wrote:
[...]
>>> +struct device *elm_request(enum bch_ecc bch_type)
>>> +{
>>> + struct elm_info *info;
>>> +
>>> + list_for_each_entry(info, &elm_devices, list) {
>>> + if (info && info->dev) {
>>> + info->bch_type = bch_type;
>>> + elm_config(info);
>>> + return info->dev;
>>> + }
>>> + }
>>
>> This will always return the first ELM device probed since you never
>> remove the allocated device from the list.
>
> But now I realized that, there is no mechanism of freeing the requested
> resource.
Right. You essentially want to assign an ELM instance to work with a
given instance of GPMC and that could be done statically too. Just pass
phandle of ELM node in GPMC DT data?
> So I will add mechanism to request ELM module successfully only if ELM
> module is not requested already and add mechanism to free it, on NAND
> driver module unload (loadable module support). This way ELM driver
> can achieve multi instance support.
>
>> I wonder why you really need a list?
>
> The prime motivation for the list is the driver should support multi
> instances of ELM by removing global symbols.
I still think a request/free API is bit too much for something that will
turn out to be a simple 1-to-1 match anyway. Can you please look at the
phandle suggestion above? I am no DT expert, but I think that will work
for your use case.
Thanks,
Sekhar
WARNING: multiple messages have this Message-ID (diff)
From: nsekhar@ti.com (Sekhar Nori)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/3] mtd: devices: elm: Add support for ELM error correction
Date: Wed, 12 Dec 2012 16:45:51 +0530 [thread overview]
Message-ID: <50C86767.60806@ti.com> (raw)
In-Reply-To: <518397C60809E147AF5323E0420B992E3EA1FA14@DBDE01.ent.ti.com>
On 12/10/2012 12:13 PM, Philip, Avinash wrote:
> On Fri, Dec 07, 2012 at 16:07:23, Nori, Sekhar wrote:
>> On 11/29/2012 5:16 PM, Philip, Avinash wrote:
[...]
>>> +struct device *elm_request(enum bch_ecc bch_type)
>>> +{
>>> + struct elm_info *info;
>>> +
>>> + list_for_each_entry(info, &elm_devices, list) {
>>> + if (info && info->dev) {
>>> + info->bch_type = bch_type;
>>> + elm_config(info);
>>> + return info->dev;
>>> + }
>>> + }
>>
>> This will always return the first ELM device probed since you never
>> remove the allocated device from the list.
>
> But now I realized that, there is no mechanism of freeing the requested
> resource.
Right. You essentially want to assign an ELM instance to work with a
given instance of GPMC and that could be done statically too. Just pass
phandle of ELM node in GPMC DT data?
> So I will add mechanism to request ELM module successfully only if ELM
> module is not requested already and add mechanism to free it, on NAND
> driver module unload (loadable module support). This way ELM driver
> can achieve multi instance support.
>
>> I wonder why you really need a list?
>
> The prime motivation for the list is the driver should support multi
> instances of ELM by removing global symbols.
I still think a request/free API is bit too much for something that will
turn out to be a simple 1-to-1 match anyway. Can you please look at the
phandle suggestion above? I am no DT expert, but I think that will work
for your use case.
Thanks,
Sekhar
WARNING: multiple messages have this Message-ID (diff)
From: Sekhar Nori <nsekhar@ti.com>
To: "Philip, Avinash" <avinashphilip@ti.com>
Cc: "dwmw2@infradead.org" <dwmw2@infradead.org>,
"artem.bityutskiy@linux.intel.com"
<artem.bityutskiy@linux.intel.com>,
"Mohammed, Afzal" <afzal@ti.com>,
"tony@atomide.com" <tony@atomide.com>,
"broonie@opensource.wolfsonmicro.com"
<broonie@opensource.wolfsonmicro.com>,
"rmk+kernel@arm.linux.org.uk" <rmk+kernel@arm.linux.org.uk>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Hebbar, Gururaja" <gururaja.hebbar@ti.com>,
"ivan.djelic@parrot.com" <ivan.djelic@parrot.com>,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
Rob Landley <rob@landley.net>
Subject: Re: [PATCH v3 2/3] mtd: devices: elm: Add support for ELM error correction
Date: Wed, 12 Dec 2012 16:45:51 +0530 [thread overview]
Message-ID: <50C86767.60806@ti.com> (raw)
In-Reply-To: <518397C60809E147AF5323E0420B992E3EA1FA14@DBDE01.ent.ti.com>
On 12/10/2012 12:13 PM, Philip, Avinash wrote:
> On Fri, Dec 07, 2012 at 16:07:23, Nori, Sekhar wrote:
>> On 11/29/2012 5:16 PM, Philip, Avinash wrote:
[...]
>>> +struct device *elm_request(enum bch_ecc bch_type)
>>> +{
>>> + struct elm_info *info;
>>> +
>>> + list_for_each_entry(info, &elm_devices, list) {
>>> + if (info && info->dev) {
>>> + info->bch_type = bch_type;
>>> + elm_config(info);
>>> + return info->dev;
>>> + }
>>> + }
>>
>> This will always return the first ELM device probed since you never
>> remove the allocated device from the list.
>
> But now I realized that, there is no mechanism of freeing the requested
> resource.
Right. You essentially want to assign an ELM instance to work with a
given instance of GPMC and that could be done statically too. Just pass
phandle of ELM node in GPMC DT data?
> So I will add mechanism to request ELM module successfully only if ELM
> module is not requested already and add mechanism to free it, on NAND
> driver module unload (loadable module support). This way ELM driver
> can achieve multi instance support.
>
>> I wonder why you really need a list?
>
> The prime motivation for the list is the driver should support multi
> instances of ELM by removing global symbols.
I still think a request/free API is bit too much for something that will
turn out to be a simple 1-to-1 match anyway. Can you please look at the
phandle suggestion above? I am no DT expert, but I think that will work
for your use case.
Thanks,
Sekhar
next prev parent reply other threads:[~2012-12-12 11:15 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 11:46 [PATCH v3 0/3] mtd: nand: OMAP: ELM error correction support for BCH ecc Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-11-29 11:46 ` [PATCH v3 1/3] mtd: nand: omap2: Update nerrors using ecc.strength Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-12-05 12:03 ` Sekhar Nori
2012-12-05 12:03 ` Sekhar Nori
2012-12-05 12:03 ` Sekhar Nori
2012-12-05 12:03 ` Sekhar Nori
2012-12-05 12:43 ` Philip, Avinash
2012-12-05 12:43 ` Philip, Avinash
2012-12-05 12:43 ` Philip, Avinash
2012-12-05 12:43 ` Philip, Avinash
2012-12-07 10:40 ` Sekhar Nori
2012-12-07 10:40 ` Sekhar Nori
2012-12-07 10:40 ` Sekhar Nori
2012-12-07 10:40 ` Sekhar Nori
2012-12-10 6:44 ` Philip, Avinash
2012-12-10 6:44 ` Philip, Avinash
2012-12-10 6:44 ` Philip, Avinash
2012-12-10 6:44 ` Philip, Avinash
2012-11-29 11:46 ` [PATCH v3 2/3] mtd: devices: elm: Add support for ELM error correction Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-12-07 10:37 ` Sekhar Nori
2012-12-07 10:37 ` Sekhar Nori
2012-12-07 10:37 ` Sekhar Nori
2012-12-07 10:37 ` Sekhar Nori
2012-12-10 6:43 ` Philip, Avinash
2012-12-10 6:43 ` Philip, Avinash
2012-12-10 6:43 ` Philip, Avinash
2012-12-10 6:43 ` Philip, Avinash
2012-12-12 11:15 ` Sekhar Nori [this message]
2012-12-12 11:15 ` Sekhar Nori
2012-12-12 11:15 ` Sekhar Nori
2012-12-12 11:15 ` Sekhar Nori
2012-12-11 9:03 ` Grant Likely
2012-12-11 9:03 ` Grant Likely
2012-12-11 9:03 ` Grant Likely
2012-12-11 9:03 ` Grant Likely
2012-12-11 12:55 ` Philip, Avinash
2012-12-11 12:55 ` Philip, Avinash
2012-12-11 12:55 ` Philip, Avinash
2012-12-11 12:55 ` Philip, Avinash
2012-11-29 11:46 ` [PATCH v3 3/3] mtd: nand: omap2: Support for hardware BCH " Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
2012-11-29 11:46 ` Philip, Avinash
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=50C86767.60806@ti.com \
--to=nsekhar@ti.com \
--cc=afzal@ti.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=avinashphilip@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dwmw2@infradead.org \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@linuxfoundation.org \
--cc=gururaja.hebbar@ti.com \
--cc=ivan.djelic@parrot.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=tony@atomide.com \
/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.