From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Scharsig Date: Wed, 28 Oct 2009 11:10:27 +0100 Subject: [U-Boot] [PATCH] ARM AT91 new board EB+CPUx9K2 In-Reply-To: <20091027183506.20010E916D5@gemini.denx.de> References: <4AE6B186.9030301@bus-elektronik.de> <20091027110234.A0787E916D5@gemini.denx.de> <20091027183506.20010E916D5@gemini.denx.de> Message-ID: <4AE81893.30506@bus-elektronik.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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