From 7592c6aa953cbe037ba0eee268b4dde69446a5c1 Mon Sep 17 00:00:00 2001 From: uch Date: Sun, 3 Mar 2002 14:34:36 +0000 Subject: [PATCH] don't initialize twice --- sys/arch/hpcsh/dev/hd64461/hd64461uart.c | 8 ++++++-- sys/arch/hpcsh/dev/hd64465/hd64465uart.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/arch/hpcsh/dev/hd64461/hd64461uart.c b/sys/arch/hpcsh/dev/hd64461/hd64461uart.c index 0599246bc591..db901f06a5eb 100644 --- a/sys/arch/hpcsh/dev/hd64461/hd64461uart.c +++ b/sys/arch/hpcsh/dev/hd64461/hd64461uart.c @@ -1,4 +1,4 @@ -/* $NetBSD: hd64461uart.c,v 1.8 2002/03/02 22:26:26 uch Exp $ */ +/* $NetBSD: hd64461uart.c,v 1.9 2002/03/03 14:34:36 uch Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -132,6 +132,9 @@ hd64461uart_kgdb_init() if (strcmp(kgdb_devname, "hd64461uart") != 0) return (1); + if (hd64461uart_chip.console) + return (1); /* can't share with console */ + hd64461uart_init(); if (com_kgdb_attach(hd64461uart_chip.io_tag, 0x0, kgdb_rate, @@ -164,7 +167,8 @@ hd64461uart_attach(struct device *parent, struct device *self, void *aux) sc->sc_module_id = ha->ha_module_id; - hd64461uart_init(); + if (!sc->sc_chip->console) + hd64461uart_init(); csc->sc_iot = sc->sc_chip->io_tag; bus_space_map(csc->sc_iot, 0, 8, 0, &csc->sc_ioh); diff --git a/sys/arch/hpcsh/dev/hd64465/hd64465uart.c b/sys/arch/hpcsh/dev/hd64465/hd64465uart.c index b400cd66f818..33fefc340001 100644 --- a/sys/arch/hpcsh/dev/hd64465/hd64465uart.c +++ b/sys/arch/hpcsh/dev/hd64465/hd64465uart.c @@ -1,4 +1,4 @@ -/* $NetBSD: hd64465uart.c,v 1.2 2002/03/02 22:26:26 uch Exp $ */ +/* $NetBSD: hd64465uart.c,v 1.3 2002/03/03 14:34:36 uch Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -130,6 +130,9 @@ hd64465uart_kgdb_init() if (strcmp(kgdb_devname, "hd64465uart") != 0) return (1); + if (hd64465uart_chip.console) + return (1); /* can't share with console */ + hd64465uart_init(); if (com_kgdb_attach(hd64465uart_chip.io_tag, 0x0, kgdb_rate, @@ -161,7 +164,8 @@ hd64465uart_attach(struct device *parent, struct device *self, void *aux) sc->sc_module_id = ha->ha_module_id; - hd64465uart_init(); + if (!sc->sc_chip->console) + hd64465uart_init(); csc->sc_iot = sc->sc_chip->io_tag; bus_space_map(csc->sc_iot, 0, 8, 0, &csc->sc_ioh);