public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 4/6] i.mx: serial_mxc: add the i.mx6q support
Date: Mon, 21 Nov 2011 15:51:19 +0100	[thread overview]
Message-ID: <4ECA6567.3020607@denx.de> (raw)
In-Reply-To: <1321600267-8514-5-git-send-email-jason.hui@linaro.org>

On 18/11/2011 08:11, Jason Liu wrote:
> Signed-off-by: Jason Liu <jason.hui@linaro.org>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
> v2: Cc Stefano
> ---
>  drivers/serial/serial_mxc.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
> index dcb4bd1..7d0f288 100644
> --- a/drivers/serial/serial_mxc.c
> +++ b/drivers/serial/serial_mxc.c
> @@ -47,14 +47,18 @@
>  #elif defined(CONFIG_SYS_MX27_UART6)
>  #define UART_PHYS 0x1001c000
>  #elif defined(CONFIG_SYS_MX35_UART1) || defined(CONFIG_SYS_MX51_UART1) || \
> -	defined(CONFIG_SYS_MX53_UART1)
> +	defined(CONFIG_SYS_MX53_UART1) || defined(CONFIG_MX6Q_UART1)
>  #define UART_PHYS UART1_BASE_ADDR
>  #elif defined(CONFIG_SYS_MX35_UART2) || defined(CONFIG_SYS_MX51_UART2) || \
> -	defined(CONFIG_SYS_MX53_UART2)
> +	defined(CONFIG_SYS_MX53_UART2) || defined(CONFIG_MX6Q_UART2)
>  #define UART_PHYS UART2_BASE_ADDR
>  #elif defined(CONFIG_SYS_MX35_UART3) || defined(CONFIG_SYS_MX51_UART3) || \
> -	defined(CONFIG_SYS_MX53_UART3)
> +	defined(CONFIG_SYS_MX53_UART3) || defined(CONFIG_MX6Q_UART3)
>  #define UART_PHYS UART3_BASE_ADDR
> +#elif defined(CONFIG_MX6Q_UART4)
> +#define UART_PHYS UART4_BASE_ADDR
> +#elif defined(CONFIG_MX6Q_UART5)
> +#define UART_PHYS UART5_BASE_ADDR
>  #else
>  #error "define CONFIG_SYS_MXxx_UARTx to use the MXC UART driver"
>  #endif

This is not a comment of your patch, but I cannot avoid to note how much
crap in this file. And we have not yet added all possible values for
each SOC, only the values necessary to build the actual boards.

The worst thing is that we do not need all this stuff. We set a lot of
#ifdef only to set the UART base address, and we really ignore (because
unneeded) the CONFIG_SYS_*_UART_*. It should be really better to define
the base address in the board configuration file, as we already do for
other drivers (USB with ehci base address, SD,..). Maybe with a
MXC_UART_BASE_ADDRESS, and we can get rid of all this bad stuff.

I will prepare a 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
=====================================================================

  reply	other threads:[~2011-11-21 14:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-18  7:11 [U-Boot] [PATCH V2 0/6] i.mx: add the initial i.mx6q core/board support Jason Liu
2011-11-18  7:11 ` [U-Boot] [PATCH V2 1/6] i.mx: introduce the armv7/imx-common folder Jason Liu
2011-11-21 13:40   ` Stefano Babic
2011-11-18  7:11 ` [U-Boot] [PATCH V2 2/6] i.mx: add the initial support for freescale i.MX6Q processor Jason Liu
2011-11-21 14:44   ` Stefano Babic
2011-11-22 13:13     ` Jason Hui
2011-11-18  7:11 ` [U-Boot] [PATCH V2 3/6] i.mx: mxc_gpio: add the i.mx6q support Jason Liu
     [not found]   ` <2EDAD32A5B0B85468ED77279EBEE99682586FB@039-SN1MPN1-001.039d.mgd.msft.net>
2011-11-18  7:30     ` Jason Hui
2011-11-18 10:18       ` Marek Vasut
2011-11-18 12:26         ` Jason Hui
2011-11-18 20:01           ` Mike Frysinger
2011-11-18 22:59             ` Marek Vasut
2011-11-18 23:50               ` Mike Frysinger
2011-11-18 20:00   ` Mike Frysinger
2011-11-18  7:11 ` [U-Boot] [PATCH V2 4/6] i.mx: serial_mxc: " Jason Liu
2011-11-21 14:51   ` Stefano Babic [this message]
2011-11-22 13:15     ` Jason Hui
2011-11-18  7:11 ` [U-Boot] [PATCH V2 5/6] i.mx: fsl_esdhc: " Jason Liu
2011-11-24 16:23   ` Stefano Babic
2011-11-18  7:11 ` [U-Boot] [PATCH V2 6/6] i.mx: i.mx6q: add the initial support for i.mx6q ARM2 board Jason Liu

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=4ECA6567.3020607@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