On Tue, May 21, 2013 at 08:38:26AM +0200, Sebastian Hesselbarth wrote: > On 05/21/2013 08:33 AM, Sascha Hauer wrote: > >On Tue, May 21, 2013 at 08:28:10AM +0200, Sascha Hauer wrote: > >>Sebastian, > >> > >>>+static int armada_370_xp_init_soc(void) > >>> { > >>> unsigned long phys_base, phys_size; > >>> > >>>- mvebu_init_clocks(); > >>>+ armada_370_xp_init_clocks(); > >>> add_generic_device("mvebu-timer", DEVICE_ID_SINGLE, NULL, > >>>- MVEBU_TIMER_BASE, 0x30, IORESOURCE_MEM, > >>>- NULL); > >>>- mvebu_memory_find(&phys_base,&phys_size); > >>>+ (unsigned int)ARMADA_370_XP_TIMER_BASE, 0x30, > >>>+ IORESOURCE_MEM, NULL); > >>>+ armada_370_xp_memory_find(&phys_base,&phys_size); > >>> arm_add_mem_device("ram0", phys_base, phys_size); > >>>+ armada_370_xp_add_uart(); > >> > >>How do you want to support a board which uses another UART instead of > >>uart0 when you call this from SoC code? > > > >Ok, I see. You use CONFIG_MVEBU_CONSOLE_UART to determine an UART base. > >What's the rationale for doing this? We don't want to have compile time > >decisions for things we know at runtime. > > How do you know the UART console by runtime? It can be on any UART > possible. Well ok, you can't really know it at runtime, but you could use multiple consoles or maybe you could register a specific uart based on a configuration option in the environment or some bootstrap pin. These are all not very common examples, but I think you shouldn't prevent them in your SoC code. > Anyway, as we are moving to DT with the next patches, all > enabled uarts will be registered. > > But leaves the question, how to get the correct UART for console? Using the linux,stdout-path property in the chosen node. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox