[U-Boot] [PATCH 3/9] apf9328: Add Armadeus Project board APF9328

Eric Jarrige
2011-08-17T21:58:01Z

Hi Higor, Hi Stefano,

On 17 ao?t 2011, at 09:31, Igor Grinberg wrote:

>
> On 08/12/11 09:49, Stefano Babic wrote:
>> On 08/12/2011 01:41 AM, Eric Jarrige wrote:
>>
>> Hi Eric,
>>
>>>>> +int board_init(void) +{ + gd->bd->bi_arch_number =
>>>>> CONFIG_MACH_TYPE;
>>>> Is there no MACH_TYPE for this board ? It is uncommon for an ARM
>>>> board. Should this board run Linux ?
>>> The MACH_TYPE for this board is 906. This board runs linux and the
>>> integration in linux is on going.
>> Ok, I have understood. The only thing you can directly set
>> MACH_TYPE_APF9328 here. IMHO it is more readable.
>
> You should not do this here unless you support multiple mach types in a single file.
> Please, see the CONFIG_MACH_TYPE in the U-Boot documentation (README file).

Here is the README sentence regarding CONFIG_MACH_TYPE:

> CONFIG_MACH_TYPE [relevant for ARM only][mandatory]
>
> This setting is mandatory for all boards that have only one
> machine type and must be used to specify the machine type
> number as it appears in the ARM machine registry
> (see http://www.arm.linux.org.uk/developer/machines/).
> Only boards that have multiple machine types supported
> in a single configuration file and the machine type is
> runtime discoverable, do not have to use this setting.

My understanding is:
1) CONFIG_MACH_TYPE has to be defined in apf9328.h
2) as gd->bd->bi_arch_number is already initialize in board.c i should completely remove this second initialization from the apf9382.c

arch/arm/lib/board.c:
262 void board_init_f(ulong bootflag)
..
277
278 #ifdef CONFIG_MACH_TYPE
279 gd->bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
280 #endif

Please let me know if missed something.

Thx and best regards,
Eric