[U-Boot] [PATCH v6] dreamplug: initial board support.
Igor Grinberg
grinberg at compulab.co.il
Mon Sep 12 09:37:37 CEST 2011
Sorry for jumping in that late...
On 09/12/11 01:10, u-boot at lakedaemon.net wrote:
> From: Jason Cooper <u-boot at lakedaemon.net>
>
> Copied wholeheartedly from board/Marvell/guruplug and modified to add support
> for SPI NOR flash.
>
> CONFIG_MACH_DREAMPLUG defined in include/configs/dreamplug.h until Linus's
> kernel.org tree adds it to mach-types.h. Once it trickles down, the definition
> can be removed from dreamplug.h.
>
> Signed-off-by: Jason Cooper <u-boot at lakedaemon.net>
> ---
[...]
> diff --git a/board/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c
> new file mode 100644
> index 0000000..cff3e9d
> --- /dev/null
> +++ b/board/Marvell/dreamplug/dreamplug.c
[...]
> +
> +int board_init(void)
> +{
> + /* arch number of board */
> + gd->bd->bi_arch_number = MACH_TYPE_DREAMPLUG;
This should be done in the board config file.
Please, see the CONFIG_MACH_TYPE in the U-Boot documentation (README file).
[...]
> diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
> new file mode 100644
> index 0000000..003d201
> --- /dev/null
> +++ b/include/configs/dreamplug.h
[...]
> +/*
> + * FIXME: This belongs in mach-types.h. However, we only pull mach-types
> + * from Linus' kernel.org tree. This hasn't been updated primarily due to
> + * the recent arch/arm reshuffling. So, in the meantime, we'll place it
> + * here.
> + */
> +#define MACH_TYPE_DREAMPLUG 3550
> +
> +#ifdef CONFIG_MACH_DREAMPLUG
> +# ifdef machine_arch_type
> +# undef machine_arch_type
> +# define machine_arch_type __machine_arch_type
> +# else
> +# define machine_arch_type MACH_TYPE_DREAMPLUG
> +# endif
> +# define machine_is_dreamplug() (machine_arch_type == MACH_TYPE_DREAMPLUG)
> +#else
> +# define machine_is_dreamplug() (0)
> +#endif
> +
#define CONFIG_MACH_TYPE MACH_TYPE_DREAMPLUG
should be added here... and should remain after you remove the
above as in FIXME.
--
Regards,
Igor.
More information about the U-Boot
mailing list