[U-Boot] [PATCH] MX: serial_mxc: cleanup removing nasty #ifdef

Stefano Babic sbabic at denx.de
Wed Nov 23 09:41:44 CET 2011


On 22/11/2011 19:06, Marek Vasut wrote:
>> -#ifdef CONFIG_SYS_MX31_UART2
>>  void mx31_uart2_hw_init(void)
>>  {
>>  	/* setup pins for UART2 */
>> @@ -47,7 +44,6 @@ void mx31_uart2_hw_init(void)
>>  	mx31_gpio_mux(MUX_RTS2__UART2_RTS_B);
>>  	mx31_gpio_mux(MUX_CTS2__UART2_CTS_B);
>>  }
>> -#endif
> 
> Maybe the MUX should be abstracted into CPU-files in arch/arm/.... ?

There are several way to improve the MUX on the IMX, but this should be
done in separate patches. This patch takes care only to move the
selected UART from the driver to the board configuration file.

>>  #ifdef CONFIG_MXC_SPI
>>  /*
>> diff --git a/arch/arm/include/asm/arch-mx25/imx-regs.h
>> b/arch/arm/include/asm/arch-mx25/imx-regs.h index eece138..7f9449b 100644
>> --- a/arch/arm/include/asm/arch-mx25/imx-regs.h
>> +++ b/arch/arm/include/asm/arch-mx25/imx-regs.h
>> @@ -180,8 +180,8 @@ struct aips_regs {
>>  #define IMX_I2C3_BASE		(0x43F84000)
>>  #define IMX_CAN1_BASE		(0x43F88000)
>>  #define IMX_CAN2_BASE		(0x43F8C000)
>> -#define IMX_UART1_BASE		(0x43F90000)
>> -#define IMX_UART2_BASE		(0x43F94000)
>> +#define UART1_BASE		(0x43F90000)
>> +#define UART2_BASE		(0x43F94000)
>>  #define IMX_I2C2_BASE		(0x43F98000)
>>  #define IMX_OWIRE_BASE		(0x43F9C000)
>>  #define IMX_CSPI1_BASE		(0x43FA4000)
>> @@ -197,15 +197,15 @@ struct aips_regs {
>>  /* SPBA */
>>  #define IMX_SPBA_BASE		(0x50000000)
>>  #define IMX_CSPI3_BASE		(0x50004000)
>> -#define IMX_UART4_BASE		(0x50008000)
>> -#define IMX_UART3_BASE		(0x5000C000)
>> +#define UART4_BASE		(0x50008000)
>> +#define UART3_BASE		(0x5000C000)
>>  #define IMX_CSPI2_BASE		(0x50010000)
>>  #define IMX_SSI2_BASE		(0x50014000)
>>  #define IMX_ESAI_BASE		(0x50018000)
>>  #define IMX_ATA_DMA_BASE	(0x50020000)
>>  #define IMX_SIM1_BASE		(0x50024000)
>>  #define IMX_SIM2_BASE		(0x50028000)
>> -#define IMX_UART5_BASE		(0x5002C000)
>> +#define UART5_BASE		(0x5002C000)
>>  #define IMX_TSC_BASE		(0x50030000)
>>  #define IMX_SSI1_BASE		(0x50034000)
>>  #define IMX_FEC_BASE		(0x50038000)
> 
> The parenthesis should go too ...

This should be done globally. Agree this must be done, but I will let
that the patch remain easy to be read containing only the changes
related to the commit message. So I tend to move this cleanup in a
separate patch.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list