All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/7] serial_mx31: allow it to work with mx27	too and rename to serial_mxc
Date: Sat, 20 Jun 2009 15:18:16 +0200	[thread overview]
Message-ID: <20090620131816.GH3849@game.jcrosoft.org> (raw)
In-Reply-To: <1244419971-13895-3-git-send-email-yanok@emcraft.com>

On 04:12 Mon 08 Jun     , Ilya Yanok 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.
> 
IIRC the imx1 share the same too
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
>  drivers/serial/Makefile                        |    2 +-
>  drivers/serial/{serial_mx31.c => serial_mxc.c} |   21 +++++++++++++++++++++
>  include/configs/imx31_litekit.h                |    2 +-
>  include/configs/imx31_phycore.h                |    2 +-
>  include/configs/mx31ads.h                      |    2 +-
>  include/configs/qong.h                         |    2 +-
>  6 files changed, 26 insertions(+), 5 deletions(-)
>  rename drivers/serial/{serial_mx31.c => serial_mxc.c} (94%)
> 
> diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
> index 14c818d..9a572e9 100644
> --- a/drivers/serial/Makefile
> +++ b/drivers/serial/Makefile
> @@ -40,7 +40,7 @@ COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
>  COBJS-$(CONFIG_KS8695_SERIAL) += serial_ks8695.o
>  COBJS-$(CONFIG_LPC2292_SERIAL) += serial_lpc2292.o
>  COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
> -COBJS-$(CONFIG_MX31_UART) += serial_mx31.o
> +COBJS-$(CONFIG_MXC_UART) += serial_mxc.o
>  COBJS-$(CONFIG_NETARM_SERIAL) += serial_netarm.o
>  COBJS-$(CONFIG_PL010_SERIAL) += serial_pl01x.o
>  COBJS-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
> diff --git a/drivers/serial/serial_mx31.c b/drivers/serial/serial_mxc.c
> similarity index 94%
> rename from drivers/serial/serial_mx31.c
> rename to drivers/serial/serial_mxc.c
> index 7c0682a..acc5b7d 100644
> --- a/drivers/serial/serial_mx31.c
> +++ b/drivers/serial/serial_mxc.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
>  #else
>  #error "define CONFIG_SYS_MX31_UARTx to use the mx31 UART driver"
>  #endif
> @@ -149,7 +166,11 @@ DECLARE_GLOBAL_DATA_PTR;
>  
>  void serial_setbrg (void)
>  {
> +#ifdef CONFIG_MX31
>  	u32 clk = mx31_get_ipg_clk();
> +#else
> +	u32 clk = imx_get_perclk1();
> +#endif
here we need to have a common clock rate function name as we do for avr32 &
at91

	this could done in a next patch but mandatory for other board adding

applied to u-boot-arm

Best Regards,
J.

  reply	other threads:[~2009-06-20 13:18 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-08  0:12 [U-Boot] [PATCH 0/7][v3] Support for LogicPD i.MX27-LITEKIT development board Ilya Yanok
2009-06-08  0:12 ` [U-Boot] [PATCH 1/7] mx27: basic cpu support Ilya Yanok
2009-06-20 13:13   ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-08  0:12 ` [U-Boot] [PATCH 2/7] serial_mx31: allow it to work with mx27 too and rename to serial_mxc Ilya Yanok
2009-06-20 13:18   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-06-08  0:12 ` [U-Boot] [PATCH 3/7] fec_imx27: driver for FEC ethernet controller on i.MX27 Ilya Yanok
2009-07-17 10:57   ` [U-Boot] [PATCH] fec_mxc: " Ilya Yanok
2009-07-17 14:05     ` Ben Warren
2009-07-21 15:32       ` Ilya Yanok
2009-07-22 22:23         ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-22 23:03           ` Ben Warren
2009-07-23  6:28         ` Ben Warren
2009-06-08  0:12 ` [U-Boot] [PATCH 4/7] mxc_nand: add nand driver for MX2/MX3 Ilya Yanok
2009-06-20 13:22   ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-22 23:43   ` Scott Wood
2009-06-23 20:03     ` Magnus Lilja
2009-07-03 19:03       ` Paul Thomas
2009-07-03 19:11         ` Paul Thomas
2009-07-17 10:48     ` Ilya Yanok
2009-07-17 10:53       ` [U-Boot] [PATCH] " Ilya Yanok
2009-07-22 21:33         ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-28 22:37         ` Scott Wood
2009-08-03  1:45           ` Ilya Yanok
2009-08-04 23:32             ` Scott Wood
2009-08-10 22:32               ` Ilya Yanok
2009-08-11 22:53                 ` Scott Wood
2009-08-03  2:01           ` Ilya Yanok
2009-08-03 16:58             ` Scott Wood
2009-07-17 16:00       ` [U-Boot] [PATCH 4/7] " Scott Wood
2009-06-08  0:12 ` [U-Boot] [PATCH 5/7] mxc-mmc: sdhc host driver for MX2 and MX3 proccessor Ilya Yanok
2009-06-21 11:04   ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-23 23:02   ` alfred steele
2009-08-07 20:13   ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-08  0:12 ` [U-Boot] [PATCH 6/7] arm: add support for CONFIG_GENERIC_MMC Ilya Yanok
2009-06-20 13:20   ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-08  0:12 ` [U-Boot] [PATCH 7/7] imx27lite: add support for imx27lite board from LogicPD Ilya Yanok
2009-06-21 11:21   ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-23 16:55     ` Detlev Zundel
2009-07-07 19:24     ` Wolfgang Denk
2009-07-17 11:00     ` [U-Boot] [PATCH] " Ilya Yanok
2009-07-22 21:37       ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-22 22:17         ` Ilya Yanok
2009-07-23 21:37           ` Jean-Christophe PLAGNIOL-VILLARD
2009-08-03  1:46             ` Ilya Yanok
2009-08-03  5:32               ` Jean-Christophe PLAGNIOL-VILLARD
2009-08-03  8:19                 ` Wolfgang Denk
2009-08-03 12:17                   ` Jean-Christophe PLAGNIOL-VILLARD
2009-08-03 14:35                     ` Wolfgang Denk
2009-08-05 10:09                       ` javier Martin
2009-08-05 12:30                         ` javier Martin
2009-08-05 12:45                           ` Wolfgang Denk
2009-08-05 14:17                             ` javier Martin
2009-08-05 14:21                               ` Wolfgang Denk
2009-08-05 15:01                                 ` javier Martin
2009-08-06 20:10                           ` Wolfgang Denk
2009-08-07  7:18                             ` javier Martin
2009-08-07  9:13                               ` Wolfgang Denk
2009-08-06 19:29                         ` [U-Boot] [PATCH] ARM EABI: add new helper functions resp. function names Wolfgang Denk
2009-08-08  6:50                           ` Dirk Behme
2009-08-08  7:16                             ` Wolfgang Denk
2009-08-08  7:39                               ` Dirk Behme
2009-08-09 21:28                           ` Wolfgang Denk
2009-08-10 22:32                 ` [U-Boot] [PATCH] imx27lite: add support for imx27lite board from LogicPD Ilya Yanok
2009-08-11 18:47                   ` Fabio Estevam
2009-08-11 19:12                     ` Ilya Yanok
2009-08-14  7:03                   ` Jean-Christophe PLAGNIOL-VILLARD
2009-08-26 20:14                     ` Wolfgang Denk
2009-08-26 20:43                       ` Scott Wood
2009-09-01 20:10                   ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-28  9:52 ` [U-Boot] [PATCH 0/7][v3] Support for LogicPD i.MX27-LITEKIT development board Jean-Christophe PLAGNIOL-VILLARD
  -- strict thread matches above, loose matches on Subject: below --
2009-05-19 23:55 [U-Boot] [PATCH 00/10][v2] " Ilya Yanok
2009-05-19 23:55 ` [U-Boot] [PATCH 2/7] serial_mx31: allow it to work with mx27 too and rename to serial_mxc Ilya Yanok
2009-05-23  0:25   ` Jean-Christophe PLAGNIOL-VILLARD

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=20090620131816.GH3849@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.