Kukjin Kim | 2 Apr 21:17 2012

[PATCH] ARM: EXYNOS: autodetect enabled serial port in uncompress

From: Colin Cross <ccross <at> android.com>

Check the ULCON register of each serial port to determine if
it has been enabled by the bootloader.  If only one serial port
is found enabled, use that one.  Otherwise, use the value from
CONFIG_S3C_LOWLEVEL_UART_PORT.

Signed-off-by: Colin Cross <ccross <at> android.com>
Signed-off-by: Kukjin Kim <kgene.kim <at> samsung.com>
---
 arch/arm/mach-exynos/include/mach/uncompress.h |   25 ++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h
index 2979995..0d17a43 100644
--- a/arch/arm/mach-exynos/include/mach/uncompress.h
+++ b/arch/arm/mach-exynos/include/mach/uncompress.h
 <at>  <at>  -25,6 +25,25  <at>  <at>  static unsigned int __raw_readl(unsigned int ptr)
 	return *((volatile unsigned int *)ptr);
 }

+static volatile u8 *exynos_autodetect_uart(volatile u8 *base)
+{
+	int i;
+	int found = 0;
+	int port;
+
+	for (i = 0; i < CONFIG_SERIAL_SAMSUNG_UARTS; i++) {
+		if (__raw_readl((unsigned int)base + S3C_UART_OFFSET * i)) {
+			port = i;
(Continue reading)

Kyungmin Park | 2 Apr 23:06 2012

Re: [PATCH] ARM: EXYNOS: autodetect enabled serial port in uncompress

Hi,

On Tue, Apr 3, 2012 at 4:17 AM, Kukjin Kim <kgene.kim <at> samsung.com> wrote:
> From: Colin Cross <ccross <at> android.com>
>
> Check the ULCON register of each serial port to determine if
> it has been enabled by the bootloader.  If only one serial port
> is found enabled, use that one.  Otherwise, use the value from
> CONFIG_S3C_LOWLEVEL_UART_PORT.
>
> Signed-off-by: Colin Cross <ccross <at> android.com>
> Signed-off-by: Kukjin Kim <kgene.kim <at> samsung.com>
> ---
>  arch/arm/mach-exynos/include/mach/uncompress.h |   25 ++++++++++++++++++++++-
>  1 files changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h
> index 2979995..0d17a43 100644
> --- a/arch/arm/mach-exynos/include/mach/uncompress.h
> +++ b/arch/arm/mach-exynos/include/mach/uncompress.h
>  <at>  <at>  -25,6 +25,25  <at>  <at>  static unsigned int __raw_readl(unsigned int ptr)
>        return *((volatile unsigned int *)ptr);
>  }
>
> +static volatile u8 *exynos_autodetect_uart(volatile u8 *base)
> +{
> +       int i;
> +       int found = 0;
> +       int port;
> +
(Continue reading)


Gmane