[U-Boot] [PATCH] ARM AT91 new board EB+CPUx9K2

Jens Scharsig esw at bus-elektronik.de
Wed Oct 28 11:10:27 CET 2009


Dear Wolfgang Denk,
>> writel(AT91C_PA23_TXD2, ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_OER);
>>
>> like notation
> 
> Close, but please also get rid of this "((AT91PS_PIO) AT91C_BASE_PIOA)"
> thing, especialy the cast is nasty. Declare a real pointer variable to
> the respective data structure, and use that.
> 

I, think

writel(AT91C_PA23_TXD2, AT91C_PIOA_OER);

is the most correct way. 
But, there are need some additional def's in AT91RM9200.h. 
Only the port A registers is defined as pointer variable. 
If you think also this is the right way, I will send a 
separate patch for AT91RM9200.h (PORTB .. PORTD, SMC registers)

Best regards,

Jens Scharsig


More information about the U-Boot mailing list