From: Florian Vaussard <florian.vaussard@epfl.ch>
To: Javier Martinez Canillas <javier@dowhile0.org>
Cc: Benoit Cousson <b-cousson@ti.com>,
Tony Lindgren <tony@atomide.com>,
devicetree-discuss@lists.ozlabs.org,
Daniel Mack <zonque@gmail.com>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] ARM: dts: OMAP3: Add GPMC controller
Date: Tue, 05 Feb 2013 18:23:15 +0100 [thread overview]
Message-ID: <51114003.9070405@epfl.ch> (raw)
In-Reply-To: <CABxcv==7KiBbkTyr7VLVw82F=9vVWRftpbyZWub_CVp3pQW0tQ@mail.gmail.com>
Hi Javier,
On 02/04/2013 12:57 PM, Javier Martinez Canillas wrote:
[...]
>
> Yes, I saw on the list that Tony asked you too extend the GPMC DT
> support. Flash support is on my TODO list too but I don't know if I'm
> going to have time to work on this in the next few weeks.
>
> Since you are thinking to change the binding, there is something I
> want to discuss with you.
>
> We have two different version for each IGEP board, one that uses NAND
> memory and another that has OneNAND.
>
> With board files this is easy because the flash memory type is
> hardcoded (in hardware) using sysboot pins [3]. So we check the
> sysboot value and call board_nand_init() or board_onenand_init()
> accordingly and pass the same static struct mtd_partition
> igep_flash_partitions[] in both cases.
>
> But with DT this is a little bit trickier since you have to define
> either a nand@0 or onenand@0 child node for the gpmc device node. So,
> we will have to create lots of dts and dtsi to handle each combination
> (IGEPv2 + NAND, IGEPv2 + OneNAND, IGEP COM + NAND, etc).
>
> I wonder if we could just have a generic gpmc-flash binding and maybe
> use a "gpmc, flash_type" property or something like that to decide if
> gpmc_onenand_init() or gpmc_nand_init() has to be called.
>
This boils down to the problem where you have an "if" statement in
your board file, and I think no general solution exists.
In your suggestion, having a property will force you anyway to write
distinct DT files to account for the two versions, so it won't really
help if I understand correctly. We would need conditional
section inside device trees, at least to test for simple parameters.
Or a way to generate several DT blobs based on a single DT source file.
Another hackish solution would be to write a meta component, whose
probe section would do your test. But this is just a stripped down version
of the board file, far from being generic...
I will think on it during my holidays :)
Regards,
Florian
WARNING: multiple messages have this Message-ID (diff)
From: florian.vaussard@epfl.ch (Florian Vaussard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: dts: OMAP3: Add GPMC controller
Date: Tue, 05 Feb 2013 18:23:15 +0100 [thread overview]
Message-ID: <51114003.9070405@epfl.ch> (raw)
In-Reply-To: <CABxcv==7KiBbkTyr7VLVw82F=9vVWRftpbyZWub_CVp3pQW0tQ@mail.gmail.com>
Hi Javier,
On 02/04/2013 12:57 PM, Javier Martinez Canillas wrote:
[...]
>
> Yes, I saw on the list that Tony asked you too extend the GPMC DT
> support. Flash support is on my TODO list too but I don't know if I'm
> going to have time to work on this in the next few weeks.
>
> Since you are thinking to change the binding, there is something I
> want to discuss with you.
>
> We have two different version for each IGEP board, one that uses NAND
> memory and another that has OneNAND.
>
> With board files this is easy because the flash memory type is
> hardcoded (in hardware) using sysboot pins [3]. So we check the
> sysboot value and call board_nand_init() or board_onenand_init()
> accordingly and pass the same static struct mtd_partition
> igep_flash_partitions[] in both cases.
>
> But with DT this is a little bit trickier since you have to define
> either a nand at 0 or onenand at 0 child node for the gpmc device node. So,
> we will have to create lots of dts and dtsi to handle each combination
> (IGEPv2 + NAND, IGEPv2 + OneNAND, IGEP COM + NAND, etc).
>
> I wonder if we could just have a generic gpmc-flash binding and maybe
> use a "gpmc, flash_type" property or something like that to decide if
> gpmc_onenand_init() or gpmc_nand_init() has to be called.
>
This boils down to the problem where you have an "if" statement in
your board file, and I think no general solution exists.
In your suggestion, having a property will force you anyway to write
distinct DT files to account for the two versions, so it won't really
help if I understand correctly. We would need conditional
section inside device trees, at least to test for simple parameters.
Or a way to generate several DT blobs based on a single DT source file.
Another hackish solution would be to write a meta component, whose
probe section would do your test. But this is just a stripped down version
of the board file, far from being generic...
I will think on it during my holidays :)
Regards,
Florian
next prev parent reply other threads:[~2013-02-05 17:23 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-28 17:54 [PATCH 0/2] ARM: dts: OMAP3: Add GPMC controller and NAND memory to Overo Florian Vaussard
2013-01-28 17:54 ` Florian Vaussard
2013-01-28 17:54 ` [PATCH 1/2] ARM: dts: OMAP3: Add GPMC controller Florian Vaussard
2013-01-28 17:54 ` Florian Vaussard
2013-02-04 9:27 ` Javier Martinez Canillas
2013-02-04 9:27 ` Javier Martinez Canillas
2013-02-04 10:36 ` Florian Vaussard
2013-02-04 10:36 ` Florian Vaussard
[not found] ` <510F8F49.9020800-p8DiymsW2f8@public.gmane.org>
2013-02-04 11:57 ` Javier Martinez Canillas
2013-02-04 11:57 ` Javier Martinez Canillas
2013-02-04 17:32 ` Tony Lindgren
2013-02-04 17:32 ` Tony Lindgren
2013-02-04 18:15 ` Javier Martinez Canillas
2013-02-04 18:15 ` Javier Martinez Canillas
2013-02-05 17:23 ` Florian Vaussard [this message]
2013-02-05 17:23 ` Florian Vaussard
2013-02-05 19:40 ` Javier Martinez Canillas
2013-02-05 19:40 ` Javier Martinez Canillas
2013-02-16 13:09 ` Anil Kumar
2013-02-16 13:09 ` Anil Kumar
2013-02-16 16:44 ` Javier Martinez Canillas
2013-02-16 16:44 ` Javier Martinez Canillas
2013-02-18 12:26 ` Cousson, Benoit
2013-02-18 12:26 ` Cousson, Benoit
2013-02-19 1:00 ` Jon Hunter
2013-02-19 1:00 ` Jon Hunter
2013-03-14 16:01 ` Benoit Cousson
2013-03-14 16:01 ` Benoit Cousson
2013-01-28 17:54 ` [PATCH 2/2] ARM: dts: OMAP3: Add NAND memory for Overo products Florian Vaussard
2013-01-28 17:54 ` Florian Vaussard
2013-02-01 22:16 ` [PATCH 0/2] ARM: dts: OMAP3: Add GPMC controller and NAND memory to Overo Tony Lindgren
2013-02-01 22:16 ` Tony Lindgren
2013-02-04 8:58 ` Florian Vaussard
2013-02-04 8:58 ` Florian Vaussard
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=51114003.9070405@epfl.ch \
--to=florian.vaussard@epfl.ch \
--cc=b-cousson@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=javier@dowhile0.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=zonque@gmail.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.