From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] MX: serial_mxc: cleanup removing nasty #ifdef
Date: Wed, 23 Nov 2011 09:41:44 +0100 [thread overview]
Message-ID: <4ECCB1C8.5030004@denx.de> (raw)
In-Reply-To: <201111221906.39243.marek.vasut@gmail.com>
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
=====================================================================
next prev parent reply other threads:[~2011-11-23 8:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 15:51 [U-Boot] [PATCH] MX: serial_mxc: cleanup removing nasty #ifdef Stefano Babic
2011-11-22 18:06 ` Marek Vasut
2011-11-23 8:41 ` Stefano Babic [this message]
2011-11-23 2:48 ` Jason Hui
2011-11-23 8:37 ` Stefano Babic
2011-11-23 10:44 ` Marek Vasut
2011-11-23 21:27 ` stefano babic
2011-11-24 0:08 ` Marek Vasut
2011-11-24 2:35 ` Jason Hui
2011-11-24 2:44 ` Marek Vasut
2011-11-24 11:35 ` Wolfgang Denk
2011-11-24 6:13 ` Wolfgang Denk
2011-11-24 6:23 ` Jason Hui
2011-11-24 11:41 ` Wolfgang Denk
2011-11-24 11:47 ` Jason Hui
2011-11-24 12:11 ` Wolfgang Denk
2011-11-25 2:11 ` Jason Hui
2011-11-25 3:32 ` Jason Hui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ECCB1C8.5030004@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox