public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.aribaud@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V4 1/3] Initial support for Marvell Orion5x SoC
Date: Wed, 13 Jan 2010 08:21:31 +0100	[thread overview]
Message-ID: <4B4D747B.6020704@free.fr> (raw)
In-Reply-To: <73173D32E9439E4ABB5151606C3E19E20308162519@SC-VEXCH1.marvell.com>

Prafulla Wadaskar a ?crit :

>> +#define ORION5X_REG_CPUCS_WIN_BAR(x) 
>> (ORION5X_REGISTER(0x1500) + (x * 0x08))
>> +#define ORION5X_REG_CPUCS_WIN_SZ(x)  
>> (ORION5X_REGISTER(0x1504) + (x * 0x08))
> 
> As pointed by wolfgang earlier, you can use c-structures here too.
> -Magic numbers 1500, 1504 can be replaced by appropreate macros like- CPU_CS0_BAR, CPU_CS0_SZ
> -Struct pointer can be declared in cpu.h like
>    #define ORION5X_SDRAM_ADRDEC_BASE  (ORION5X_REGISTER(0x1500))
>    ref( table 114 in 5182 users manual)
> 
> I know it's coming from referenced code but lets make new code the best. Also I will be updating old code too.

Agreed and fixed for V5.

>> +/* Orion-1 (88F5181) and Orion-VoIP (88F5181L) */
>> +#define MV88F5181_DEV_ID        0x5181
>> +#define MV88F5181_REV_B1        3
>> +#define MV88F5181L_REV_A0       8
>> +#define MV88F5181L_REV_A1       9
>> +/* Orion-NAS (88F5182) */
>> +#define MV88F5182_DEV_ID        0x5182
>> +#define MV88F5182_REV_A2        2
>> +/* Orion-2 (88F5281) */
>> +#define MV88F5281_DEV_ID        0x5281
>> +#define MV88F5281_REV_D0        4
>> +#define MV88F5281_REV_D1        5
>> +#define MV88F5281_REV_D2        6
>> +/* Orion-1-90 (88F6183) */
>> +#define MV88F6183_DEV_ID        0x6183
>> +#define MV88F6183_REV_B0        3
> 
> These are Chip specific, should be moved to mv88f5182.h and similar headers for other Supported Chips

The reason why they are defined this way is that they are for 
identifying the real device/revision on which you are running u-boot, as 
opposed to the intended device/revision for which you built it; they are 
only useful for parts of the code which are common to all orion5x 
variants (such as print_cpuinfo). Variant-specific code would not need 
it as it knows already which variant it is for.

> Regards.
> Prafulla . .

Amicalement,
-- 
Albert.

  reply	other threads:[~2010-01-13  7:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-10 16:03 [U-Boot] [PATCH V4 1/3] Initial support for Marvell Orion5x SoC Albert Aribaud
2010-01-10 16:03 ` [U-Boot] [PATCH V4 2/3] Add Orion5x support to 16550 device driver Albert Aribaud
2010-01-10 16:03   ` [U-Boot] [PATCH V4 3/3] Add support for the LaCie ED Mini V2 board Albert Aribaud
2010-01-11 11:56     ` Prafulla Wadaskar
2010-01-11 12:12       ` Albert ARIBAUD
2010-01-11 14:10         ` Prafulla Wadaskar
2010-01-11 17:26           ` Albert ARIBAUD
2010-01-13 12:37       ` Albert ARIBAUD
2010-01-13 14:04         ` Prafulla Wadaskar
2010-01-13 17:17           ` Albert ARIBAUD
2010-01-12  0:08     ` Tom
2010-01-10 16:42 ` [U-Boot] [PATCH V4 1/3] Initial support for Marvell Orion5x SoC Albert ARIBAUD
2010-01-11 11:22 ` Prafulla Wadaskar
2010-01-13  7:21   ` Albert ARIBAUD [this message]
2010-01-11 11:29 ` Prafulla Wadaskar
2010-01-13  7:49   ` Albert ARIBAUD

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=4B4D747B.6020704@free.fr \
    --to=albert.aribaud@free.fr \
    --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