From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] ARM: ux500: New DT:ed snowball_platform_devs for one-by-one device enablement
Date: Tue, 10 Apr 2012 10:26:29 +0100 [thread overview]
Message-ID: <4F83FCC5.9040103@linaro.org> (raw)
In-Reply-To: <CACRpkdYVxQjJCQO3YY9=Orv-vLJJBzs4APPhCMHjR-3AGAbshg@mail.gmail.com>
On 10/04/12 10:03, Linus Walleij wrote:
> On Thu, Apr 5, 2012 at 11:55 AM, Lee Jones<lee.jones@linaro.org> wrote:
>
>> During Device Tree enablement it is necessary to remove
>> snowball_<device>* platform_data segments one at at time,
>> as and when particular devices are DT enabled. This patch
>> provides a temporary solution. Once this new struct is
>> empty it will be removed again.
>>
>> Signed-off-by: Lee Jones<lee.jones@linaro.org>
>
> This is not exactly elegant and I cannot quite see how the pieces
> fit together.
>
>> ---
>> arch/arm/mach-ux500/board-mop500.c | 18 ++++++++++++++++--
>> 1 files changed, 16 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
>> index 77d03c1..29e0ade 100644
>> --- a/arch/arm/mach-ux500/board-mop500.c
>> +++ b/arch/arm/mach-ux500/board-mop500.c
>> @@ -609,6 +609,13 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
>> &ab8500_device,
>> };
>>
>> +static struct platform_device *snowball_of_platform_devs[] __initdata = {
>> +&snowball_led_dev,
>> +&snowball_key_dev,
>> +&snowball_sbnet_dev,
>> +&ab8500_device,
>> +};
>
> So above this array is an identical array which is going to become
> unused, then why
> not just rename the other array with _of_ or just skip the whole
> business altogether?
Eh? No, that won't help. The other array needs to be kept fully intact
for non-DT boots. The idea is that each element from the DT array will
be removed sequentially as they are DT enabled. For instance, I already
have a patch with enables the SMSC911x chip, which also removes the
&snowball_sbnet_dev entry. After that something else will be enabled and
its cohort will be subsequently removed too. Only when all these devices
have been DT enabled can the struct be removed.
>> +
>> static void __init mop500_init_machine(void)
>> {
>> struct device *parent = NULL;
>> @@ -786,8 +793,15 @@ static void __init u8500_init_machine(void)
>> mop500_sdi_init(parent);
>> } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
>> snowball_pins_init();
>> - platform_add_devices(snowball_platform_devs,
>> - ARRAY_SIZE(snowball_platform_devs));
>
> So first you remove ths use of that array...
>
>> +
>> + /* Devices to be DT:ed:
>> + snowball_led_dev = todo
>> + snowball_key_dev = todo
>> + snowball_sbnet_dev = todo
>> + ab8500_device = todo
>> + */
>
> /*
> * Comment style
> */
No problem, I'll fix that.
>> + platform_add_devices(snowball_of_platform_devs,
>> + ARRAY_SIZE(snowball_of_platform_devs));
>
> And insert an identical array?
>
> The only change is that you now have an *unused* array with all it's
> parents set and then an array with all parents set to NULL which you
> use. I don't get it ...
Nothing is unused. When DT is disabled snowball_platform_devs will be
used to add the platform devices. This is, and will remain fully
populated for non-DT boots. The DT'ed version will decrease in size
until the final element is removed along with the definition.
I have ran this past Arnd, who thought this was a good idea. It's only a
temporary solution which well aide us in enabling devices spanned over
multiple submissions, rather than attempting to enable everything in a
single patch-set - which isn't going to happen.
Kind regards,
Lee
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2012-04-10 9:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-05 9:55 [0/7] Next round of DT enablement for ux500/Snowball Lee Jones
2012-04-05 9:55 ` [PATCH 1/7] ARM: ux500: New DT:ed snowball_platform_devs for one-by-one device enablement Lee Jones
2012-04-10 9:03 ` Linus Walleij
2012-04-10 9:26 ` Lee Jones [this message]
2012-04-10 11:02 ` Linus Walleij
2012-04-10 11:15 ` Lee Jones
2012-04-05 9:55 ` [PATCH 2/7] ARM: ux500: New DT:ed u8500_init_devices " Lee Jones
2012-04-10 9:05 ` Linus Walleij
2012-04-05 9:55 ` [PATCH 3/7] drivers/gpio: gpio-nomadik: Apply Device Tree bindings Lee Jones
2012-04-10 9:14 ` Linus Walleij
2012-04-10 9:19 ` Linus Walleij
2012-04-05 9:55 ` [PATCH 4/7] drivers/gpio: gpio-nomadik: Provide documentation for " Lee Jones
2012-04-06 4:20 ` Grant Likely
2012-04-10 7:24 ` Lee Jones
2012-05-11 19:12 ` Grant Likely
2012-05-11 22:18 ` Linus Walleij
2012-05-11 22:24 ` Grant Likely
2012-05-14 8:33 ` Lee Jones
2012-04-05 9:55 ` [PATCH 5/7] ARM: ux500: Rename gpio_keys in the Device Tree file Lee Jones
2012-04-10 9:16 ` Linus Walleij
2012-04-05 9:55 ` [PATCH 6/7] MMC: mmci: Enable Device Tree support for ux500 variants Lee Jones
2012-04-05 12:36 ` Russell King - ARM Linux
2012-04-05 13:45 ` Lee Jones
2012-04-06 4:14 ` Grant Likely
2012-04-09 14:27 ` Arnd Bergmann
2012-04-09 14:41 ` Chris Ball
2012-04-05 9:55 ` [PATCH 7/7] MMC: mmci: Add required documentation for Device Tree bindings Lee Jones
2012-04-18 13:04 ` Arnd Bergmann
2012-04-18 14:25 ` Pawel Moll
2012-04-18 14:29 ` Lee Jones
2012-04-18 16:32 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2012-04-05 10:25 [PATCH 1/7] ARM: ux500: New DT:ed snowball_platform_devs for one-by-one device enablement Lee Jones
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=4F83FCC5.9040103@linaro.org \
--to=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).