diff mbox

[5/5] ARM: ux500: Do not supply DMA platform data when booting u8540 platform

Message ID 1363966065-2478-5-git-send-email-lee.jones@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Lee Jones March 22, 2013, 3:27 p.m. UTC
The u8540 platform DMA settings are not currently supported. In this
patch we ensure they are not passed to the serial driver during boot.
This allows us to reach a terminal when booting with Device Tree
enabled.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/mach-ux500/cpu-db8500.c |   26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

Comments

Arnd Bergmann March 22, 2013, 3:43 p.m. UTC | #1
On Friday 22 March 2013, Lee Jones wrote:
>         /* automatically probe child nodes of db8500 device */
>         of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent);
> +
> +       if (of_machine_is_compatible("st-ericsson,u8540"))
> +               of_platform_populate(NULL, u8500_local_bus_nodes,
> +                                    u8540_auxdata_uart_lookup, parent);
> +       else
> +               of_platform_populate(NULL, u8500_local_bus_nodes,
> +                                    u8500_auxdata_uart_lookup, parent);
>  }
>  

Does this still work on u8500? I did not think you could call 
of_platform_populate twice on the root node and still get the result
you want.

	Arnd
Lee Jones March 22, 2013, 5:14 p.m. UTC | #2
On Fri, 22 Mar 2013, Arnd Bergmann wrote:

> On Friday 22 March 2013, Lee Jones wrote:
> >         /* automatically probe child nodes of db8500 device */
> >         of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent);
> > +
> > +       if (of_machine_is_compatible("st-ericsson,u8540"))
> > +               of_platform_populate(NULL, u8500_local_bus_nodes,
> > +                                    u8540_auxdata_uart_lookup, parent);
> > +       else
> > +               of_platform_populate(NULL, u8500_local_bus_nodes,
> > +                                    u8500_auxdata_uart_lookup, parent);
> >  }
> >  
> 
> Does this still work on u8500? I did not think you could call 
> of_platform_populate twice on the root node and still get the result
> you want.

I haven't checked.

I'll look into the inner workings of of_platform_populate() on Monday.

Thanks for the pointer.
diff mbox

Patch

diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 19235cf..da425f7 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -257,9 +257,6 @@  static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
 	/* Requires call-back bindings. */
 	OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
 	/* Requires DMA bindings. */
-	OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
-	OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat),
-	OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat),
 	OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0",  &ssp0_plat),
 	OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0",  &mop500_sdi0_data),
 	OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1",  &mop500_sdi1_data),
@@ -297,6 +294,22 @@  static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
 	{},
 };
 
+static struct of_dev_auxdata u8500_auxdata_uart_lookup[] __initdata = {
+	/* Requires DMA bindings. */
+	OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
+	OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat),
+	OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat),
+	{},
+};
+
+static struct of_dev_auxdata u8540_auxdata_uart_lookup[] __initdata = {
+	/* Requires DMA bindings. */
+	OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", NULL),
+	OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", NULL),
+	OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", NULL),
+	{},
+};
+
 static const struct of_device_id u8500_local_bus_nodes[] = {
 	/* only create devices below soc node */
 	{ .compatible = "stericsson,db8500", },
@@ -324,6 +337,13 @@  static void __init u8500_init_machine(void)
 
 	/* automatically probe child nodes of db8500 device */
 	of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent);
+
+	if (of_machine_is_compatible("st-ericsson,u8540"))
+		of_platform_populate(NULL, u8500_local_bus_nodes,
+				     u8540_auxdata_uart_lookup, parent);
+	else
+		of_platform_populate(NULL, u8500_local_bus_nodes,
+				     u8500_auxdata_uart_lookup, parent);
 }
 
 static const char * stericsson_dt_platform_compat[] = {