From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reinhard Meyer Date: Tue, 29 Jun 2010 23:03:59 +0200 Subject: [U-Boot] [RFC] AT91SAM9 series - cleanup USART definitions In-Reply-To: <4C2A5BA5.20809@emk-elektronik.de> References: <4C2A3C42.7050602@emk-elektronik.de> <20100629191712.36AD314EBF8@gemini.denx.de> <4C2A5BA5.20809@emk-elektronik.de> Message-ID: <4C2A5FBF.1000907@emk-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 Reinhard Meyer wrote: > Hello Wolfgang, > > I just became aware that this patch will involve changes to ALL > include/configs/*.h files for AT91 AND AVR32 boards using > atmel_usart.c. If thats OK I will do that. > Reason: #if defined(CONFIG_USART0) # define USART_ID 0 # define USART_BASE USART0_BASE #elif defined(CONFIG_USART1) # define USART_ID 1 # define USART_BASE USART1_BASE #elif defined(CONFIG_USART2) # define USART_ID 2 # define USART_BASE USART2_BASE #elif defined(CONFIG_USART3) # define USART_ID 3 # define USART_BASE USART3_BASE #endif in atmel_usart.c would have to be blown up for each "new" USART incarnation Atmel invents on new SoCs. USART_ID is effectively not used and USART_BASE might as well defined directly in the include/configs/.h file either by: #define CONFIG_ATMEL_USART 1 #define CONFIG_ATMEL_USART_BASE AT91_UARTDEB /* USART used is DBGU */ OR directly by: #define CONFIG_ATMEL_USART AT91_UARTDEB /* USART used is DBGU */ or is the 2nd solution bad because Makefiles might choke on it? Greetings, Reinhard