linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/11] ARM: imx: Add support of uncompress print for i.MX28
Date: Mon, 15 Nov 2010 17:47:27 +0100	[thread overview]
Message-ID: <20101115164727.GO8942@pengutronix.de> (raw)
In-Reply-To: <1289831795-4373-8-git-send-email-shawn.guo@freescale.com>

On Mon, Nov 15, 2010 at 10:36:31PM +0800, Shawn Guo wrote:
> SoC i.MX28 uses DUART IP block as the debug serial. It adds the
> support in the same file used by other i.MX SoC UART, and uses
> variable is_duart to distinguish.
> 
> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> ---
>  arch/arm/plat-mxc/include/mach/uncompress.h |   20 ++++++++++++++------
>  1 files changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
> index 9dd9c20..adb617f 100644
> --- a/arch/arm/plat-mxc/include/mach/uncompress.h
> +++ b/arch/arm/plat-mxc/include/mach/uncompress.h
> @@ -1,8 +1,9 @@
>  /*
> - *  arch/arm/plat-mxc/include/mach/uncompress.h
> + *  rch/arm/plat-mxc/include/mach/uncompress.h
???

>   *
>   *  Copyright (C) 1999 ARM Limited
>   *  Copyright (C) Shane Nay (shane at minirl.com)
> + *  Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
>   *
>   * This program is free software; you can redistribute it and/or modify
>   * it under the terms of the GNU General Public License as published by
> @@ -22,14 +23,16 @@
>  #include <asm/mach-types.h>
>  
>  static unsigned long uart_base;
> +static unsigned short is_duart = 0;
don't initialize static variables to 0.

>  
>  #define UART(x) (*(volatile unsigned long *)(uart_base + (x)))
>  
> -#define USR2 0x98
> -#define USR2_TXFE (1<<14)
> -#define TXR  0x40
> -#define UCR1 0x80
> -#define UCR1_UARTEN 1
> +#define USR2		(is_duart ? 0x18 : 0x98)
> +#define USR2_TXFE	(is_duart ? 1<<7 : 1<<14)
> +#define USR2_BUSY	(1 << 3)
> +#define TXR		(is_duart ? 0x00 : 0x40)
> +#define UCR1		(is_duart ? 0x30 : 0x80)
> +#define UCR1_UARTEN	1
>  
>  /*
>   * The following code assumes the serial port has already been
> @@ -59,6 +62,7 @@ static inline void flush(void)
>  
>  #define MX1_UART1_BASE_ADDR	0x00206000
>  #define MX25_UART1_BASE_ADDR	0x43f90000
> +#define MX28_DUART_BASE_ADDR	0x80074000
>  #define MX2X_UART1_BASE_ADDR	0x1000a000
>  #define MX3X_UART1_BASE_ADDR	0x43F90000
>  #define MX3X_UART2_BASE_ADDR	0x43F94000
> @@ -83,6 +87,10 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
>  	case MACH_TYPE_MXT_TD60:
>  		uart_base = MX2X_UART1_BASE_ADDR;
>  		break;
> +	case MACH_TYPE_MX28EVK:
> +		uart_base = MX28_DUART_BASE_ADDR;
> +		is_duart = 1;
> +		break;
>  	case MACH_TYPE_MX31LITE:
>  	case MACH_TYPE_ARMADILLO5X0:
>  	case MACH_TYPE_MX31MOBOARD:
> -- 
> 1.7.1
> 
> 
> 

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2010-11-15 16:47 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 14:36 [RFC][PATCH 00/11] ARM: imx: Add initial i.MX28 support Shawn Guo
2010-11-15 14:36 ` [PATCH 01/11] ARM: imx: Add basic definitions for i.MX28 Shawn Guo
2010-11-15 16:25   ` Uwe Kleine-König
2010-11-15 14:36 ` [PATCH 02/11] ARM: imx: Add support of interrupt controller ICOLL Shawn Guo
2010-11-15 16:33   ` Uwe Kleine-König
2010-11-15 14:36 ` [PATCH 03/11] ARM: imx: Add reset routine for i.MX28 Shawn Guo
2010-11-15 16:36   ` Uwe Kleine-König
2010-11-17 11:17     ` Shawn Guo
2010-11-17 13:44       ` Uwe Kleine-König
2010-11-15 14:36 ` [PATCH 04/11] ARM: imx: Add timer support " Shawn Guo
2010-11-15 16:40   ` Uwe Kleine-König
2010-11-15 14:36 ` [PATCH 05/11] ARM: imx: Add GPIO " Shawn Guo
2010-11-15 16:43   ` Uwe Kleine-König
2010-11-15 14:36 ` [PATCH 06/11] ARM: imx: Add IOMUX " Shawn Guo
2010-11-15 16:46   ` Uwe Kleine-König
2010-11-15 14:36 ` [PATCH 07/11] ARM: imx: Add support of uncompress print " Shawn Guo
2010-11-15 16:47   ` Uwe Kleine-König [this message]
2010-11-15 14:36 ` [PATCH 08/11] ARM: imx: Add clock support " Shawn Guo
2010-11-15 14:36 ` [PATCH 09/11] ARM: imx: Add memory map " Shawn Guo
2010-11-15 14:36 ` [PATCH 10/11] ARM: imx: Add initial support of machine mx28evk Shawn Guo
2010-11-15 16:54   ` Uwe Kleine-König
2010-11-15 14:36 ` [PATCH 11/11] ARM: imx: Add i.MX28 support into Kconfig and Makefile Shawn Guo
2010-11-15 17:01   ` Uwe Kleine-König
2010-11-16 10:15 ` [RFC][PATCH 00/11] ARM: imx: Add initial i.MX28 support Sascha Hauer
2010-11-16 12:42   ` Shawn Guo
2010-11-16 17:24     ` Uwe Kleine-König
2010-11-17  1:28       ` Shawn Guo
2010-11-17  6:06         ` Uwe Kleine-König

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=20101115164727.GO8942@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).