public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] at91sam9260ek: move board id setup to config header
Date: Thu, 14 Mar 2013 09:44:41 +0100	[thread overview]
Message-ID: <51418DF9.4080808@gmail.com> (raw)
In-Reply-To: <51412BDF.5060002@atmel.com>

Hi Bo,

On 03/14/2013 02:46 AM, Bo Shen wrote:
> On 3/11/2013 0:16, Andreas Bie?mann wrote:
>> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
>> Cc: Bo Shen <voice.shen@atmel.com>
> 
> Acked-by: Bo Shen <voice.shen@atmel.com>
> 
>> ---
>>   board/atmel/at91sam9260ek/at91sam9260ek.c |   12 ------------
>>   include/configs/at91sam9260ek.h           |   20 ++++++++++++++++++++
>>   2 files changed, 20 insertions(+), 12 deletions(-)
>>

<snip>

>> --- a/include/configs/at91sam9260ek.h
>> +++ b/include/configs/at91sam9260ek.h
>> @@ -125,6 +125,26 @@
>>       (ATMEL_BASE_SRAM1 + 0x1000 - GENERATED_GBL_DATA_SIZE)
>>   #endif
>>
>> +/*
>> + * The (arm)linux board id set by generic code depending on
>> configured board
>> + * (see boards.cfg for different boards)
>> + */
>> +#ifdef CONFIG_AT91SAM9G20
>> +    /* the sam9g20 variants have two different board ids */
>> +# ifdef CONFIG_AT91SAM9G20EK_2MMC
>> +    /* we may be setup for the 2MMC variant of at91sam9g20ek */
>> +#  define CONFIG_MACH_TYPE MACH_TYPE_AT91SAM9G20EK_2MMC
>> +# else
>> +#  ifdef CONFIG_AT91SAM9G20EK
>> +    /* or the normal at91sam9g20ek */
>> +#   define CONFIG_MACH_TYPE MACH_TYPE_AT91SAM9G20EK
>> +#  endif
>> +# endif

I think I'll generate a v2 here. It is safer to have:

#ifdef AT91SAM9G20
#ifdef 2MMC
// 2MMC
#else
// default for SAM9G20
#endif
#else
// default for SAM9260
#endif

Best regards

Andreas Bie?mann

  reply	other threads:[~2013-03-14  8:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 16:16 [U-Boot] [PATCH] at91sam9260ek: move board id setup to config header Andreas Bießmann
2013-03-14  1:46 ` Bo Shen
2013-03-14  8:44   ` Andreas Bießmann [this message]
2013-03-14 10:25     ` Bo Shen
2013-05-10 15:05 ` [U-Boot] [PATCH v2] " Andreas Bießmann

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=51418DF9.4080808@gmail.com \
    --to=andreas.devel@googlemail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox