diff mbox

[02/17] arm: ux500: add ccu9540 board support

Message ID 1346839153-6465-3-git-send-email-loic.pallardy-ext@stericsson.com (mailing list archive)
State New, archived
Headers show

Commit Message

Loic Pallardy Sept. 5, 2012, 9:58 a.m. UTC
Upgrade existing mop500 definition to support new ccu9540
board.

Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-ux500/board-mop500-sdi.c | 12 ++++++++++++
 arch/arm/mach-ux500/board-mop500.c     | 35 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-ux500/board-mop500.h     |  1 +
 3 files changed, 48 insertions(+)

Comments

Arnd Bergmann Sept. 5, 2012, 10:42 a.m. UTC | #1
On Wednesday 05 September 2012, Loic Pallardy wrote:
> +MACHINE_START(U9540, "ST-Ericsson 9540 platform")
> +       .atag_offset    = 0x100,
> +       .map_io         = u8500_map_io,
> +       .nr_irqs        = UX500_NR_IRQS,
> +       .init_irq       = ux500_init_irq,
> +       .timer          = &ux500_timer,
> +       .handle_irq     = gic_handle_irq,
> +       .init_machine   = u9540_init_machine,
> +       .init_late      = ux500_init_late,
> +MACHINE_END
> +

Please don't add another ATAG based board definition to ux500. We're closing in
on having full support for DT booting with this platform, so your patch is just
making it harder for us to complete this. 

	Arnd
Loic PALLARDY Sept. 5, 2012, 11:38 a.m. UTC | #2
On 09/05/2012 12:42 PM, Arnd Bergmann wrote:
> On Wednesday 05 September 2012, Loic Pallardy wrote:
>> +MACHINE_START(U9540, "ST-Ericsson 9540 platform")
>> +       .atag_offset    = 0x100,
>> +       .map_io         = u8500_map_io,
>> +       .nr_irqs        = UX500_NR_IRQS,
>> +       .init_irq       = ux500_init_irq,
>> +       .timer          =&ux500_timer,
>> +       .handle_irq     = gic_handle_irq,
>> +       .init_machine   = u9540_init_machine,
>> +       .init_late      = ux500_init_late,
>> +MACHINE_END
>> +
>
> Please don't add another ATAG based board definition to ux500. We're closing in
> on having full support for DT booting with this platform, so your patch is just
> making it harder for us to complete this.
>
> 	Arnd
Yes I know and agree.
Please consider this patch as a temporary one waiting for 9540 support 
from Lee.

Regards,
Loic
Linus Walleij Sept. 5, 2012, 12:08 p.m. UTC | #3
On Wed, Sep 5, 2012 at 1:38 PM, Loic PALLARDY <loic.pallardy@st.com> wrote:
> On 09/05/2012 12:42 PM, Arnd Bergmann wrote:
>> On Wednesday 05 September 2012, Loic Pallardy wrote:
>>> +MACHINE_START(U9540, "ST-Ericsson 9540 platform")
>>> +       .atag_offset    = 0x100,
>>> +       .map_io         = u8500_map_io,
>>> +       .nr_irqs        = UX500_NR_IRQS,
>>> +       .init_irq       = ux500_init_irq,
>>> +       .timer          =&ux500_timer,
>>> +       .handle_irq     = gic_handle_irq,
>>> +       .init_machine   = u9540_init_machine,
>>> +       .init_late      = ux500_init_late,
>>> +MACHINE_END
>>
>> Please don't add another ATAG based board definition to ux500. We're closing in
>> on having full support for DT booting with this platform, so your patch is just
>> making it harder for us to complete this.
>>
>>       Arnd
> Yes I know and agree.
> Please consider this patch as a temporary one waiting for 9540 support
> from Lee.

It seems it would still be possible to create a patch series containing
just the PRCMU refactorings (which are really nice) and necessary
modifications to the MOP500 series so we could get this ground work
into the 3.7 merge window (if Sam is happy with it).

Actually it'd be nice to have a patch series containing that *and*
Lee's recent patches for e.g. IRQ domain on the PRCMU in one
big series, that would prepare the ground very nicely, then only
the DT board stuff would be missing for a successful U9540 DT
boot.

Is this possible?

Yours,
Linus Walleij
Arnd Bergmann Sept. 5, 2012, 12:11 p.m. UTC | #4
On Wednesday 05 September 2012, Loic PALLARDY wrote:
> 
> On 09/05/2012 12:42 PM, Arnd Bergmann wrote:
> > On Wednesday 05 September 2012, Loic Pallardy wrote:
> >> +MACHINE_START(U9540, "ST-Ericsson 9540 platform")
> >> +       .atag_offset    = 0x100,
> >> +       .map_io         = u8500_map_io,
> >> +       .nr_irqs        = UX500_NR_IRQS,
> >> +       .init_irq       = ux500_init_irq,
> >> +       .timer          =&ux500_timer,
> >> +       .handle_irq     = gic_handle_irq,
> >> +       .init_machine   = u9540_init_machine,
> >> +       .init_late      = ux500_init_late,
> >> +MACHINE_END
> >> +
> >
> > Please don't add another ATAG based board definition to ux500. We're closing in
> > on having full support for DT booting with this platform, so your patch is just
> > making it harder for us to complete this.
> >
> >       Arnd
> Yes I know and agree.
> Please consider this patch as a temporary one waiting for 9540 support 
> from Lee.

Why are you even posting the patches that you know won't make it then?

	Arnd
Linus Walleij Sept. 5, 2012, 12:41 p.m. UTC | #5
On Wed, Sep 5, 2012 at 2:11 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 05 September 2012, Loic PALLARDY wrote:
>>
>> On 09/05/2012 12:42 PM, Arnd Bergmann wrote:
>> > On Wednesday 05 September 2012, Loic Pallardy wrote:
>> >> +MACHINE_START(U9540, "ST-Ericsson 9540 platform")
>> >> +       .atag_offset    = 0x100,
>> >> +       .map_io         = u8500_map_io,
>> >> +       .nr_irqs        = UX500_NR_IRQS,
>> >> +       .init_irq       = ux500_init_irq,
>> >> +       .timer          =&ux500_timer,
>> >> +       .handle_irq     = gic_handle_irq,
>> >> +       .init_machine   = u9540_init_machine,
>> >> +       .init_late      = ux500_init_late,
>> >> +MACHINE_END
>> >> +
>> >
>> > Please don't add another ATAG based board definition to ux500. We're closing in
>> > on having full support for DT booting with this platform, so your patch is just
>> > making it harder for us to complete this.
>> >
>> >       Arnd
>> Yes I know and agree.
>> Please consider this patch as a temporary one waiting for 9540 support
>> from Lee.
>
> Why are you even posting the patches that you know won't make it then?

My fault! I wanted an outside look at them before we take them
too far.

I should've requested to have the "RFC" prefix attached to them.

Sorry if it annoyed you too much...

Yours,
Linus Walleij
diff mbox

Patch

diff --git a/arch/arm/mach-ux500/board-mop500-sdi.c b/arch/arm/mach-ux500/board-mop500-sdi.c
index 18ff781..4fd21fe 100644
--- a/arch/arm/mach-ux500/board-mop500-sdi.c
+++ b/arch/arm/mach-ux500/board-mop500-sdi.c
@@ -255,6 +255,18 @@  void __init mop500_sdi_init(struct device *parent)
 	 */
 }
 
+void __init ccu9540_sdi_init(struct device *parent)
+{
+	/* On-board eMMC */
+	db8500_add_sdi4(parent, &mop500_sdi4_data, U8500_SDI_V2_PERIPHID);
+
+	/*
+	 * On boards with the TC35892 GPIO expander, sdi0 will finally
+	 * be added when the TC35892 initializes and calls
+	 * mop500_sdi_tc35892_init() above.
+	 */
+}
+
 void __init snowball_sdi_init(struct device *parent)
 {
 	/* On Snowball MMC_CAP_SD_HIGHSPEED isn't supported (Hardware issue?) */
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index fe1ff85..fa75f95 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -691,6 +691,30 @@  static void __init hrefv60_init_machine(void)
 	mop500_uib_init();
 }
 
+
+static void __init u9540_init_machine(void)
+{
+	struct device *parent;
+	int i;
+
+	ccu9540_pins_init();
+
+	parent = u8500_init_devices(&ab8500_platdata);
+
+	for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
+		mop500_platform_devs[i]->dev.parent = parent;
+
+	platform_add_devices(mop500_platform_devs,
+				ARRAY_SIZE(mop500_platform_devs));
+	mop500_i2c_init(parent);
+	ccu9540_sdi_init(parent);
+	mop500_msp_init(parent);
+	mop500_uart_init(parent);
+
+	/* This board has full regulator constraints */
+	regulator_has_full_constraints();
+}
+
 MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
 	/* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
 	.atag_offset	= 0x100,
@@ -727,6 +751,17 @@  MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
 	.init_late	= ux500_init_late,
 MACHINE_END
 
+MACHINE_START(U9540, "ST-Ericsson 9540 platform")
+	.atag_offset	= 0x100,
+	.map_io		= u8500_map_io,
+	.nr_irqs	= UX500_NR_IRQS,
+	.init_irq	= ux500_init_irq,
+	.timer		= &ux500_timer,
+	.handle_irq	= gic_handle_irq,
+	.init_machine	= u9540_init_machine,
+	.init_late	= ux500_init_late,
+MACHINE_END
+
 #ifdef CONFIG_MACH_UX500_DT
 
 struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index b696ab0..e5b2d3c 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -84,6 +84,7 @@  extern struct mmci_platform_data mop500_sdi4_data;
 extern struct arm_pmu_platdata db8500_pmu_platdata;
 
 extern void mop500_sdi_init(struct device *parent);
+extern void ccu9540_sdi_init(struct device *parent);
 extern void snowball_sdi_init(struct device *parent);
 extern void hrefv60_sdi_init(struct device *parent);
 extern void mop500_sdi_tc35892_init(struct device *parent);