public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
To: Jonas Gorski <jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
Cc: "Brian Norris"
	<computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"MTD Maling List"
	<linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
	bcm-kernel-feedback-list
	<bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	"Florian Fainelli"
	<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Rafał Miłecki" <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 6/7] mtd: brcmnand: run bcm47xxpart part parser in addition
Date: Sun, 17 May 2015 18:14:44 +0200	[thread overview]
Message-ID: <5558BE74.5020307@hauke-m.de> (raw)
In-Reply-To: <CAOiHx=kGrsxLRT_Lf7PGm=hHm8azQYu5_AQVd6q+oOh2EXawsQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 05/17/2015 06:05 PM, Jonas Gorski wrote:
> Hi Hauke,
> 
> On Sun, May 17, 2015 at 5:41 PM, Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org> wrote:
>> On the bcm53xx and bcm47xx SoC the bcm47xxpart partition parser is able
>> to parse the partitions automatically by reading some special header
>> used on these SoCs flash partition and some guessing. Without this
>> patch the default list is used, with this patch this partition parser
>> is used if the others haven't found a partition.
>>
>> Signed-off-by: Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
>> ---
>>  drivers/mtd/nand/brcmnand/brcmnand.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c
>> index 468a212..cc5dc1e 100644
>> --- a/drivers/mtd/nand/brcmnand/brcmnand.c
>> +++ b/drivers/mtd/nand/brcmnand/brcmnand.c
>> @@ -1879,6 +1879,9 @@ static int brcmnand_setup_dev(struct brcmnand_host *host)
>>         return 0;
>>  }
>>
>> +static const char * const probes[] = {"cmdlinepart", "ofpart", "bcm47xxpart",
>> +                                     NULL};
>> +
> 
> I know this is a bit more work, but how about moving the
> "linux,part-probe" parsing code from drivers/mtd/maps/physmap_of.c to
> mtd_device_parse_register?
> 
> then mtd_device_parse_register could do something like
> 
>  if (!probes && ppdata && ppdata->of_node)
>     probes = of_get_probes(ppdata->of_node);
> 
> and you could just add a linux,part-probe = "..."; property to the dts files
> 
> (It looks too easy/obvious so I guess I'm overlooking something fundamental ;P)
> 

Yes I will try to get this done in a generic way through device tree. I
was already searching for a way to provide the partition parser from
device tree and was wondering why it was not there.

I will send an independent patch which adds this feature and this patch
from this series can be dropped.

Hauke
--
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

  parent reply	other threads:[~2015-05-17 16:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-17 15:40 [PATCH 0/7] mtd: brcmnand: add support for NAND core on bcma bus Hauke Mehrtens
     [not found] ` <1431877266-28566-1-git-send-email-hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2015-05-17 15:41   ` [PATCH 1/7] mtd: brcmnand: remove double new line from print Hauke Mehrtens
     [not found]     ` <1431877266-28566-2-git-send-email-hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2015-05-18 18:09       ` Brian Norris
2015-05-17 15:41   ` [PATCH 2/7] mtd: brcmnand: do not make local variable static Hauke Mehrtens
     [not found]     ` <1431877266-28566-3-git-send-email-hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2015-05-18 18:13       ` Brian Norris
2015-05-17 15:41   ` [PATCH 3/7] mtd: brcmnand: use struct device and not platform_device Hauke Mehrtens
2015-05-17 15:41   ` [PATCH 4/7] mtd: brcmnand: add methods to register struct device Hauke Mehrtens
2015-05-17 15:41   ` [PATCH 5/7] mtd: brcmnand: add bcma driver Hauke Mehrtens
     [not found]     ` <1431877266-28566-6-git-send-email-hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2015-05-20  0:34       ` Brian Norris
2015-05-20  6:39         ` Rafał Miłecki
     [not found]           ` <CACna6rzBn3yzzER56aAmk+VPNiMh9ikA3B1YZmMesF=3DWdq+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-20 18:40             ` Brian Norris
2015-05-20 22:10               ` Hauke Mehrtens
     [not found]                 ` <555D066C.6080200-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2015-05-20 22:48                   ` Ray Jui
2015-05-21  7:51               ` Rafał Miłecki
     [not found]                 ` <CACna6rwc=Qudqw8e3N9SO7xEGZCx=LgwrBEVqzJHi9KMSjhyVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-27  0:18                   ` Brian Norris
2015-05-27 22:18                     ` Hauke Mehrtens
2015-05-17 15:41   ` [PATCH 6/7] mtd: brcmnand: run bcm47xxpart part parser in addition Hauke Mehrtens
     [not found]     ` <1431877266-28566-7-git-send-email-hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2015-05-17 16:05       ` Jonas Gorski
     [not found]         ` <CAOiHx=kGrsxLRT_Lf7PGm=hHm8azQYu5_AQVd6q+oOh2EXawsQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-17 16:14           ` Hauke Mehrtens [this message]
2015-05-17 15:41   ` [PATCH 7/7] ARM: BCM5301X: add NAND flash chip description Hauke Mehrtens

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=5558BE74.5020307@hauke-m.de \
    --to=hauke-5/s+jyg5szeelga04laivw@public.gmane.org \
    --cc=bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org \
    --cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=zajec5-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox