[U-Boot] [PATCH 02/10] serial_mx31: allow it to work with mx27 too
Wolfgang Denk
wd at denx.de
Wed May 6 23:16:00 CEST 2009
Dear Ilya Yanok,
In message <1241634633-13917-3-git-send-email-yanok at emcraft.com> you wrote:
> UART hardware on i.MX27 is the same as on the i.MX31 so we just
> need to provide the driver with correct address of the registers.
>
> Signed-off-by: Ilya Yanok <yanok at emcraft.com>
> ---
> drivers/serial/serial_mx31.c | 21 +++++++++++++++++++++
> 1 files changed, 21 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/serial/serial_mx31.c b/drivers/serial/serial_mx31.c
> index 7c0682a..acc5b7d 100644
> --- a/drivers/serial/serial_mx31.c
> +++ b/drivers/serial/serial_mx31.c
> @@ -18,7 +18,12 @@
> */
>
> #include <common.h>
> +#ifdef CONFIG_MX31
> #include <asm/arch/mx31.h>
> +#else
> +#include <asm/arch/imx-regs.h>
> +#include <asm/arch/clock.h>
> +#endif
>
> #define __REG(x) (*((volatile u32 *)(x)))
>
> @@ -32,6 +37,18 @@
> #define UART_PHYS 0x43fb0000
> #elif defined(CONFIG_SYS_MX31_UART5)
> #define UART_PHYS 0x43fb4000
> +#elif defined(CONFIG_SYS_MX27_UART1)
> +#define UART_PHYS 0x1000a000
> +#elif defined(CONFIG_SYS_MX27_UART2)
> +#define UART_PHYS 0x1000b000
> +#elif defined(CONFIG_SYS_MX27_UART3)
> +#define UART_PHYS 0x1000c000
> +#elif defined(CONFIG_SYS_MX27_UART4)
> +#define UART_PHYS 0x1000d000
> +#elif defined(CONFIG_SYS_MX27_UART5)
> +#define UART_PHYS 0x1001b000
> +#elif defined(CONFIG_SYS_MX27_UART6)
> +#define UART_PHYS 0x1001c000
Should that file be renamed? serial_mx31.c does not seem correct any
more...
And - what are these constants? I smell addresses? Unse I/O accessors
instead?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Overdrawn? But I still have checks left!
More information about the U-Boot
mailing list