[RFC 1/2] kirkwood: add support for booting via oftree probe

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Sun Jun 22 14:45:57 PDT 2014


On 06/22/2014 10:34 PM, Alexander Aring wrote:
> This patch initialize memory only if we boot a kirkwood arch with
> device-tree probing. Otherwise some devices like timer or uart will
> be probed twice.
> 
> Signed-off-by: Alexander Aring <alex.aring at gmail.com>
> ---
> I don't know if this is right. The guruplug is the other kirkwood platform
> but don't have devictree support.

Alexander,

I'd rather remove non-DT booting for kirkwood completely. I have patches
ready somewhere. Let me sort them out tomorrow.

Sebastian

>  arch/arm/mach-mvebu/kirkwood.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
> index c79d130..dd73ab0 100644
> --- a/arch/arm/mach-mvebu/kirkwood.c
> +++ b/arch/arm/mach-mvebu/kirkwood.c
> @@ -86,6 +86,12 @@ static int kirkwood_init_soc(void)
>  {
>  	unsigned long phys_base, phys_size;
>  
> +	kirkwood_memory_find(&phys_base, &phys_size);
> +	arm_add_mem_device("ram0", phys_base, phys_size);
> +
> +	if (IS_ENABLED(CONFIG_OFDEVICE))
> +		return 0;
> +
>  	barebox_set_model("Marvell Kirkwood");
>  	barebox_set_hostname("kirkwood");
>  
> @@ -94,8 +100,6 @@ static int kirkwood_init_soc(void)
>  	add_generic_device("orion-timer", DEVICE_ID_SINGLE, NULL,
>  			   (unsigned int)KIRKWOOD_TIMER_BASE, 0x30,
>  			   IORESOURCE_MEM, NULL);
> -	kirkwood_memory_find(&phys_base, &phys_size);
> -	arm_add_mem_device("ram0", phys_base, phys_size);
>  	kirkwood_add_uart();
>  
>  	return 0;
> 




More information about the barebox mailing list