All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Guinot <simon.guinot@sequanux.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/4] arm: add machine ID for CloudBox
Date: Mon, 1 Jul 2013 00:53:21 +0200	[thread overview]
Message-ID: <20130630225321.GC10726@kw.sim.vm.gnt> (raw)
In-Reply-To: <1372587149-8220-5-git-send-email-fredo@starox.org>

On Sun, Jun 30, 2013 at 12:12:29PM +0200, Fr?d?ric Leroy wrote:
> CloudBox device is device tree compliant, but older LaCie kernel uses
> machine ID method to boot.
> 
> Signed-off-by: Fr?d?ric Leroy <fredo@starox.org>
> ---
>  arch/arm/include/asm/mach-types.h | 14 ++++++++++++++
>  board/LaCie/cloudbox/cloudbox.c   |  7 ++++++-
>  include/configs/lacie_kw.h        |  1 +
>  3 files changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h
> index 440b041..071bd11 100644
> --- a/arch/arm/include/asm/mach-types.h
> +++ b/arch/arm/include/asm/mach-types.h
> @@ -1106,6 +1106,7 @@ extern unsigned int __machine_arch_type;
>  #define MACH_TYPE_OMAP5_SEVM           3777
>  #define MACH_TYPE_ARMADILLO_800EVA     3863
>  #define MACH_TYPE_KZM9G                4140
> +#define MACH_TYPE_CLOUDBOX             4170
>  
>  #ifdef CONFIG_ARCH_EBSA110
>  # ifdef machine_arch_type
> @@ -14235,6 +14236,19 @@ extern unsigned int __machine_arch_type;
>  # define machine_is_kzm9g()	(0)
>  #endif
>  
> +#ifdef CONFIG_MACH_CLOUDBOX
> +# ifdef machine_arch_type
> +#  undef machine_arch_type
> +#  define machine_arch_type	__machine_arch_type
> +# else
> +#  define machine_arch_type	MACH_TYPE_CLOUDBOX
> +# endif
> +# define machine_cloudbox()	(machine_arch_type == MACH_TYPE_CLOUDBOX)
> +#else
> +# define machine_cloudbox()	(0)
> +#endif

Hi Fred,

I think you can't update this file directly. Pulling the Linux mach-types
file is the ARM maintainer job.

Note that for the CloudBox board, the mach-types entry has been removed
because not needed by Linux. The Linux mainline support is only based on
DT. I had the same issue with the ns2 lite and mini. At the time, I have
been told to include the machine ID in the board header:
http://marc.info/?l=u-boot&m=134694402011372&w=2

Looks in configs/lacie_kw.h and grep for "missing in mach-types.h".

Besides, I don't understand why do you need a separate patch to add the
legacy boot support.

Simon

> +
> +
>  /*
>   * These have not yet been registered
>   */
> diff --git a/board/LaCie/cloudbox/cloudbox.c b/board/LaCie/cloudbox/cloudbox.c
> index e5ee5a3..51b1f96 100644
> --- a/board/LaCie/cloudbox/cloudbox.c
> +++ b/board/LaCie/cloudbox/cloudbox.c
> @@ -64,7 +64,12 @@ int board_early_init_f(void)
>  
>  int board_init(void)
>  {
> -	/* Nothing to do with fdt */
> +	/* Machine number */
> +	gd->bd->bi_arch_number = CONFIG_MACH_TYPE;
> +
> +	/* Boot parameters address */
> +	gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
> +
>  	return 0;
>  }
>  
> diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h
> index 02e0882..b305bf6 100644
> --- a/include/configs/lacie_kw.h
> +++ b/include/configs/lacie_kw.h
> @@ -22,6 +22,7 @@
>   * Machine number definition
>   */
>  #if defined(CONFIG_CLOUDBOX)
> +#define CONFIG_MACH_TYPE		MACH_TYPE_CLOUDBOX
>  #define CONFIG_IDENT_STRING		" CloudBox"
>  #elif defined(CONFIG_D2NET_V2)
>  #define CONFIG_MACH_TYPE		MACH_TYPE_D2NET_V2
> -- 
> 1.8.1.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130701/dd40ba78/attachment.pgp>

  reply	other threads:[~2013-06-30 22:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 16:49 [U-Boot] [PATCH 0/2] add support for LaCie CloudBox Frederic Leroy
2013-06-25 16:49 ` [U-Boot] [PATCH 1/2] arm: " Frederic Leroy
2013-06-25 18:24   ` Wolfgang Denk
2013-06-30 10:12     ` [U-Boot] [PATCH v2 0/4] " Frédéric Leroy
2013-06-30 10:12       ` [U-Boot] [PATCH v2 1/4] lacie_kw: sort #ifdef lists by CONFIG_ identifiers Frédéric Leroy
2013-06-30 22:15         ` Simon Guinot
2013-06-30 10:12       ` [U-Boot] [PATCH v2 2/4] arm: add support for LaCie CloudBox Frédéric Leroy
2013-06-30 10:12       ` [U-Boot] [PATCH v2 3/4] LaCie/common: Fix cloudbox ethernet leds Frédéric Leroy
2013-06-30 23:01         ` Simon Guinot
2013-07-01  9:51           ` [U-Boot] compiled failed when turned off gcc optimazition TigerLiu at viatech.com.cn
2013-07-01 10:03             ` Wolfgang Denk
2013-07-01 10:08               ` TigerLiu at viatech.com.cn
2013-07-01 11:37                 ` Wolfgang Denk
2013-07-01 18:03                   ` Mike Dunn
2013-07-01 19:51                     ` Wolfgang Denk
2013-07-02 19:40                       ` Mike Dunn
2013-07-02 22:38                         ` Graeme Russ
2013-07-05 10:31                           ` TigerLiu at viatech.com.cn
2013-07-05 14:00                             ` [U-Boot] compiled failed when turned off gcc optimazitionAT Albert ARIBAUD
2013-06-30 10:12       ` [U-Boot] [PATCH v2 4/4] arm: add machine ID for CloudBox Frédéric Leroy
2013-06-30 22:53         ` Simon Guinot [this message]
2013-07-01  9:30           ` Frédéric Leroy
2013-07-01 10:01             ` Simon Guinot
2013-06-25 20:50   ` [U-Boot] [PATCH 1/2] arm: add support for LaCie CloudBox Simon Guinot
2013-06-25 21:09     ` Simon Guinot
2013-06-25 16:49 ` [U-Boot] [PATCH 2/2] LaCie/common: Fix cloudbox ethernet leds Frederic Leroy
2013-06-25 18:27   ` Wolfgang Denk
2013-06-25 21:08   ` Simon Guinot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130630225321.GC10726@kw.sim.vm.gnt \
    --to=simon.guinot@sequanux.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.