Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/odroid Oops, i forgot to commit this patch o...



details:   https://anonhg.NetBSD.org/src/rev/7682ce5db356
branches:  trunk
changeset: 328799:7682ce5db356
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Fri Apr 18 14:17:11 2014 +0000

description:
Oops, i forgot to commit this patch on the `teaching sscom to use attach with
bus_space_handle_t'

diffstat:

 sys/arch/evbarm/odroid/odroid_machdep.c |  29 ++++++++++++++++-------------
 1 files changed, 16 insertions(+), 13 deletions(-)

diffs (92 lines):

diff -r 8f2aec16e883 -r 7682ce5db356 sys/arch/evbarm/odroid/odroid_machdep.c
--- a/sys/arch/evbarm/odroid/odroid_machdep.c   Fri Apr 18 11:44:31 2014 +0000
+++ b/sys/arch/evbarm/odroid/odroid_machdep.c   Fri Apr 18 14:17:11 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: odroid_machdep.c,v 1.6 2014/04/15 20:36:07 reinoud Exp $ */
+/*     $NetBSD: odroid_machdep.c,v 1.7 2014/04/18 14:17:11 reinoud Exp $ */
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.6 2014/04/15 20:36:07 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.7 2014/04/18 14:17:11 reinoud Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_exynos.h"
@@ -111,37 +111,37 @@
 #ifdef EXYNOS5
        {
                .unit    = 0,
-               .iobase = EXYNOS5_CORE_PBASE + EXYNOS5_UART0_OFFSET
+               .iobase = EXYNOS5_UART0_OFFSET
        },
        {
                .unit    = 1,
-               .iobase = EXYNOS5_CORE_PBASE + EXYNOS5_UART1_OFFSET
+               .iobase = EXYNOS5_UART1_OFFSET
        },
        {
                .unit    = 2,
-               .iobase = EXYNOS5_CORE_PBASE + EXYNOS5_UART2_OFFSET
+               .iobase = EXYNOS5_UART2_OFFSET
        },
        {
                .unit    = 3,
-               .iobase = EXYNOS5_CORE_PBASE + EXYNOS5_UART3_OFFSET
+               .iobase = EXYNOS5_UART3_OFFSET
        },
 #endif
 #ifdef EXYNOS4
        {
                .unit    = 0,
-               .iobase = EXYNOS5_CORE_PBASE + EXYNOS4_UART0_OFFSET
+               .iobase = EXYNOS4_UART0_OFFSET
        },
        {
                .unit    = 1,
-               .iobase = EXYNOS5_CORE_PBASE + EXYNOS4_UART1_OFFSET
+               .iobase = EXYNOS4_UART1_OFFSET
        },
        {
                .unit    = 2,
-               .iobase = EXYNOS5_CORE_PBASE + EXYNOS4_UART2_OFFSET
+               .iobase = EXYNOS4_UART2_OFFSET
        },
        {
                .unit    = 3,
-               .iobase = EXYNOS5_CORE_PBASE + EXYNOS4_UART3_OFFSET
+               .iobase = EXYNOS4_UART3_OFFSET
        },
 #endif
 };
@@ -427,21 +427,24 @@
 consinit(void)
 {
        static bool consinit_called;
+
        if (consinit_called)
                return;
        consinit_called = true;
 
 #if NSSCOM > 0
-       bus_space_tag_t iot = &exynos_bs_tag;
        bus_addr_t iobase = armreg_tpidruro_read();
        size_t i;
+
        for (i = 0; i < __arraycount(exynos_uarts); i++) {
                /* attach console */
-               if (exynos_uarts[i].iobase == iobase)
+               if (exynos_uarts[i].iobase + EXYNOS_CORE_PBASE == iobase)
                        break;
        }
        KASSERT(i < __arraycount(exynos_uarts));
-       if (sscom_cnattach(iot, &exynos_uarts[i], conspeed, EXYNOS_UART_FREQ,
+
+       if (sscom_cnattach(&exynos_bs_tag, exynos_core_bsh,
+                       &exynos_uarts[i], conspeed, EXYNOS_UART_FREQ,
                        conmode))
                panic("Serial console can not be initialized");
 #else



Home | Main Index | Thread Index | Old Index