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

Wolfgang Denk wd at denx.de
Thu Oct 29 11:47:29 CET 2009


Dear Jens Scharsig,

In message <4AE946E7.4050404 at bus-elektronik.de> you wrote:
>
> If I understand you correctly now? 
> The train goes in the opposite direction.
> 
> in the AT91RM9200.h
> 
> a port is defined as
> 
> typedef struct _AT91S_PIO
> {
> 	...
> 	AT91_REG	 PIO_OER;	/* Output Enable Register */
> 	...
> } AT91S_PIO, *AT91PS_PIO;

This is close. Of course we should drop the AT91_REG and use standard
types instead, and "PIO_OER" is not a logal variable name either
because it's all-capitals. So this entry should rather look like this:

	...
	u32 pio_oer;
	...
> and 
> 
> #define AT91C_BASE_PIOC	((AT91PS_PIO)	0xFFFFF800) 

This is definitely deprecated.

> So the access should be 
> 
> 	AT91PS_PIO pioa = AT91C_BASE_PIOA;
> 	...
> 	writel(AT91C_PA23_TXD2, &pioa->PIO_OER);

Yes, except for the incorrect variable name.

> or 
> 
> 	writel(AT91C_PA23_TXD2, &AT91C_BASE_PIOA->PIO_OER);

No.

> I'm right?

Mostly :-)

Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
 The software required `Windows 95 or better', so I installed Linux.


More information about the U-Boot mailing list