[U-Boot] [PATCH V4 1/3] Initial support for Marvell Orion5x SoC

Albert ARIBAUD albert.aribaud at free.fr
Wed Jan 13 08:21:31 CET 2010


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.


More information about the U-Boot mailing list