public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] cpu9260: update board support
Date: Sat, 23 Apr 2011 09:12:50 +0200	[thread overview]
Message-ID: <4DB27BF2.6080202@aribaud.net> (raw)
In-Reply-To: <4DA944AF.3020103@aribaud.net>

Le 16/04/2011 09:26, Albert ARIBAUD a ?crit :
> Le 03/04/2011 18:35, Eric B?nard a ?crit :
>
>> diff --git a/board/eukrea/cpu9260/cpu9260.c b/board/eukrea/cpu9260/cpu9260.c
>> index 61b6c33..9ec48a0 100644
>> --- a/board/eukrea/cpu9260/cpu9260.c
>> +++ b/board/eukrea/cpu9260/cpu9260.c
>
>> @@ -188,26 +175,16 @@ int board_init(void)
>>
>>    int dram_init(void)
>>    {
>> -	gd->bd->bi_dram[0].start = PHYS_SDRAM;
>> -	if (get_ram_size((long *) PHYS_SDRAM, PHYS_SDRAM_SIZE) !=
>> -	    PHYS_SDRAM_SIZE)
>> -		return -1;
>> -
>> -	gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
>> +	gd->ram_size = get_ram_size((volatile long *)CONFIG_SYS_SDRAM_BASE,
>> +			CONFIG_SYS_SDRAM_SIZE);
>
> Checkpatch warns about the volatile here.
>
> I know the get_ram_size() prototype calls for the volatile attribute,
> but what is the rationale here for this? get_ram_size() just needs the
> RAM base address *value*; if it requires volatile accesses to it, it can
> arrange for these inside its definition. Besides, throughout the code
> base there are 19 instances of get_ram_size() callw where the argument
> is cast to volatile, against 130 where it is not.
>
> Wolfgang et al.: how about removing the 'volatile' qualifier from the
> get_ram_size() prototype?
>
> Eric: if your patch does not cause a warning without the volatile in the
> call, can you update and repost it as V2?
>
>> diff --git a/include/configs/cpu9260.h b/include/configs/cpu9260.h
>> index d239423..a8ada2d 100644
>> --- a/include/configs/cpu9260.h
>> +++ b/include/configs/cpu9260.h
>
>> -#define CONFIG_SYS_NAND_READY_PIN		AT91_PIN_PC13
>> -#define CONFIG_SYS_NAND_ENABLE_PIN		AT91_PIN_PC14
>> +#define CONFIG_SYS_NAND_READY_PIN		AT91_PIO_PORTC, 13
>> +#define CONFIG_SYS_NAND_ENABLE_PIN		AT91_PIO_PORTC, 14
>
>> -#define CONFIG_RED_LED				AT91_PIN_PC11
>> -#define CONFIG_GREEN_LED			AT91_PIN_PC12
>> -#define CONFIG_YELLOW_LED			AT91_PIN_PC7
>> -#define CONFIG_BLUE_LED				AT91_PIN_PC9
>> +#define CONFIG_RED_LED				AT91_PIO_PORTC, 11
>> +#define CONFIG_GREEN_LED			AT91_PIO_PORTC, 12
>> +#define CONFIG_YELLOW_LED			AT91_PIO_PORTC, 7
>> +#define CONFIG_BLUE_LED				AT91_PIO_PORTC, 9
>
> Checkpatch considers these errors. This is again a case where we'd want
> it to ignore it... or reconsider this type of macro, which intends to
> expand to several function arguments.
>
> For now I'll ignore these 6 checkpatch errors.
>
> Amicalement,

Applied to u-boot-arm/master, thanks.

Amicalement,
-- 
Albert.

  reply	other threads:[~2011-04-23  7:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-03 16:35 [U-Boot] [PATCH 1/3] mp2usb: remove board support Eric Bénard
2011-04-03 16:35 ` [U-Boot] [PATCH 2/3] cpu9260: update " Eric Bénard
2011-04-15 13:49   ` Eric Bénard
2011-04-16  7:26   ` Albert ARIBAUD
2011-04-23  7:12     ` Albert ARIBAUD [this message]
2011-04-03 16:35 ` [U-Boot] [PATCH 3/3] cpuat91: fix " Eric Bénard
2011-04-15 13:49   ` Eric Bénard
2011-04-16  6:57     ` Albert ARIBAUD
2011-04-23 10:08   ` Albert ARIBAUD
2011-04-27 20:00 ` [U-Boot] [PATCH 1/3] mp2usb: remove " Wolfgang Denk
2011-04-27 20:15   ` Eric Bénard
2011-04-27 20:18   ` [U-Boot] [PATCH] mp2usb: finish the removal Eric Bénard
2011-05-12 21:29     ` Wolfgang Denk

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=4DB27BF2.6080202@aribaud.net \
    --to=albert.u.boot@aribaud.net \
    --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