From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] ARM: ux500: New DT:ed u8500_init_devices for one-by-one device enablement
Date: Thu, 5 Apr 2012 10:55:43 +0100 [thread overview]
Message-ID: <1333619748-16126-3-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1333619748-16126-1-git-send-email-lee.jones@linaro.org>
During Device Tree enablement it is necessary to remove
<hw_component>_add_<device> calls one at at time, as and when
particular devices are DT enabled. This patch provides a
temporary solution. Once the new *of_init_devices function
has been fully unpopulated it will be removed again.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
arch/arm/mach-ux500/board-mop500.c | 2 +-
arch/arm/mach-ux500/cpu-db8500.c | 22 ++++++++++++++++++++++
arch/arm/mach-ux500/include/mach/setup.h | 3 +++
3 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 29e0ade..4d4aeda 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -772,7 +772,7 @@ static void __init u8500_init_machine(void)
int i2c0_devs;
int i;
- parent = u8500_init_devices();
+ parent = u8500_of_init_devices();
i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 9bd8163..c19c8b8 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -206,3 +206,25 @@ struct device * __init u8500_init_devices(void)
return parent;
}
+
+// TODO: Once all pieces are DT:ed, remove completely
+struct device * __init u8500_of_init_devices(void)
+{
+ struct device *parent;
+ int i;
+
+ parent = db8500_soc_device_init();
+
+ db8500_add_rtc(parent);
+ db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
+
+ platform_device_register_data(parent,
+ "cpufreq-u8500", -1, NULL, 0);
+
+ for (i = 0; i < ARRAY_SIZE(platform_devs); i++)
+ platform_devs[i]->dev.parent = parent;
+
+ platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
+
+ return parent;
+}
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h
index 3dc00ff..a792c2a 100644
--- a/arch/arm/mach-ux500/include/mach/setup.h
+++ b/arch/arm/mach-ux500/include/mach/setup.h
@@ -21,6 +21,9 @@ extern void __init u8500_map_io(void);
extern struct device * __init u5500_init_devices(void);
extern struct device * __init u8500_init_devices(void);
+// TODO: Once all pieces are DT:ed, remove completely
+extern struct device * __init u8500_of_init_devices(void);
+
extern void __init ux500_init_irq(void);
extern void __init u5500_sdi_init(struct device *parent);
--
1.7.9.1
next prev parent reply other threads:[~2012-04-05 9:55 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
2012-04-10 11:02 ` Linus Walleij
2012-04-10 11:15 ` Lee Jones
2012-04-05 9:55 ` Lee Jones [this message]
2012-04-10 9:05 ` [PATCH 2/7] ARM: ux500: New DT:ed u8500_init_devices " 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
2012-04-05 10:25 ` [PATCH 2/7] ARM: ux500: New DT:ed u8500_init_devices " 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=1333619748-16126-3-git-send-email-lee.jones@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).