Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch UART clock source is PLLP. Set com type to COM_TYPE...
details: https://anonhg.NetBSD.org/src/rev/f29a3c3f46d2
branches: trunk
changeset: 337924:f29a3c3f46d2
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun May 03 17:24:45 2015 +0000
description:
UART clock source is PLLP. Set com type to COM_TYPE_TEGRA.
diffstat:
sys/arch/arm/nvidia/tegra_com.c | 8 ++++----
sys/arch/arm/nvidia/tegra_reg.h | 3 +--
sys/arch/evbarm/tegra/tegra_machdep.c | 9 +++++----
3 files changed, 10 insertions(+), 10 deletions(-)
diffs (76 lines):
diff -r 0dc0eca91bc9 -r f29a3c3f46d2 sys/arch/arm/nvidia/tegra_com.c
--- a/sys/arch/arm/nvidia/tegra_com.c Sun May 03 17:22:54 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_com.c Sun May 03 17:24:45 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_com.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $ */
+/* $NetBSD: tegra_com.c,v 1.2 2015/05/03 17:24:45 jmcneill Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: tegra_com.c,v 1.1 2015/03/29 10:41:59 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: tegra_com.c,v 1.2 2015/05/03 17:24:45 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -88,8 +88,8 @@
bus_space_handle_t bsh;
sc->sc_dev = self;
- sc->sc_frequency = TEGRA_UART_FREQ;
- sc->sc_type = COM_TYPE_NORMAL;
+ sc->sc_frequency = tegra_car_uart_rate(loc->loc_port);
+ sc->sc_type = COM_TYPE_TEGRA;
if (com_is_console(bst, iobase, &bsh) == 0
&& bus_space_subregion(bst, tio->tio_bsh,
diff -r 0dc0eca91bc9 -r f29a3c3f46d2 sys/arch/arm/nvidia/tegra_reg.h
--- a/sys/arch/arm/nvidia/tegra_reg.h Sun May 03 17:22:54 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_reg.h Sun May 03 17:24:45 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_reg.h,v 1.6 2015/05/03 01:07:44 jmcneill Exp $ */
+/* $NetBSD: tegra_reg.h,v 1.7 2015/05/03 17:24:45 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -66,7 +66,6 @@
#define TEGRA_AHB_A2_VBASE 0xfd000000
#define TEGRA_REF_FREQ 12000000
-#define TEGRA_UART_FREQ TEGRA_REF_FREQ
/* APB */
#define TEGRA_UARTA_OFFSET 0x00006000
diff -r 0dc0eca91bc9 -r f29a3c3f46d2 sys/arch/evbarm/tegra/tegra_machdep.c
--- a/sys/arch/evbarm/tegra/tegra_machdep.c Sun May 03 17:22:54 2015 +0000
+++ b/sys/arch/evbarm/tegra/tegra_machdep.c Sun May 03 17:24:45 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_machdep.c,v 1.9 2015/05/03 01:07:44 jmcneill Exp $ */
+/* $NetBSD: tegra_machdep.c,v 1.10 2015/05/03 17:24:45 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_machdep.c,v 1.9 2015/05/03 01:07:44 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_machdep.c,v 1.10 2015/05/03 17:24:45 jmcneill Exp $");
#include "opt_tegra.h"
#include "opt_machdep.h"
@@ -354,8 +354,9 @@
#if NCOM > 0
const bus_space_tag_t bst = &armv7_generic_a4x_bs_tag;
- if (comcnattach(bst, CONSADDR, CONSPEED, TEGRA_UART_FREQ,
- COM_TYPE_NORMAL, CONMODE)) {
+ const u_int freq = tegra_car_uart_rate(3);
+ if (comcnattach(bst, CONSADDR, CONSPEED, freq,
+ COM_TYPE_TEGRA, CONMODE)) {
panic("Serial console cannot be initialized.");
}
#else
Home |
Main Index |
Thread Index |
Old Index