Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/ralink Instead of
details: https://anonhg.NetBSD.org/src/rev/4116ad77a0dd
branches: trunk
changeset: 329028:4116ad77a0dd
user: matt <matt%NetBSD.org@localhost>
date: Wed Apr 30 00:52:49 2014 +0000
description:
Instead of
mainbus0 (root): Ralink System Bus
be more explicit about the system:
mainbus0 (root): Mediatek MT7620 System Bus
diffstat:
sys/arch/mips/ralink/ralink_mainbus.c | 31 ++++++++++++++++++++++++-------
1 files changed, 24 insertions(+), 7 deletions(-)
diffs (57 lines):
diff -r 15b6d62e9364 -r 4116ad77a0dd sys/arch/mips/ralink/ralink_mainbus.c
--- a/sys/arch/mips/ralink/ralink_mainbus.c Wed Apr 30 00:51:26 2014 +0000
+++ b/sys/arch/mips/ralink/ralink_mainbus.c Wed Apr 30 00:52:49 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ralink_mainbus.c,v 1.3 2014/03/26 17:42:00 christos Exp $ */
+/* $NetBSD: ralink_mainbus.c,v 1.4 2014/04/30 00:52:49 matt Exp $ */
/*-
* Copyright (c) 2011 CradlePoint Technology, Inc.
* All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ralink_mainbus.c,v 1.3 2014/03/26 17:42:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ralink_mainbus.c,v 1.4 2014/04/30 00:52:49 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -86,16 +86,33 @@
{
mainbus_softc_t * const sc = device_private(self);
struct mainbus_attach_args ma;
+ union {
+ char buf[9];
+ uint32_t id[2];
+ } xid;
mainbus_found = true;
- aprint_naive(": Ralink System Bus\n");
- aprint_normal(": Ralink System Bus\n");
+ sc->sc_dev = self;
+ sc->sc_memt = &ra_bus_memt;
+ sc->sc_dmat = &ra_bus_dmat;
- sc->sc_dev = self;
+ xid.id[0] = bus_space_read_4(sc->sc_memt, ra_sysctl_bsh, RA_SYSCTL_ID0);
+ xid.id[1] = bus_space_read_4(sc->sc_memt, ra_sysctl_bsh, RA_SYSCTL_ID1);
+ xid.buf[8] = '\0';
+ if (xid.buf[6] == ' ') {
+ xid.buf[6] = '\0';
+ } else if (xid.buf[7] == ' ') {
+ xid.buf[7] = '\0';
+ }
+ const char * const manuf = xid.buf[0] == 'M' ? "Mediatek" : "Ralink";
+
+ aprint_naive(": %s %s System Bus\n", manuf, xid.buf);
+ aprint_normal(": %s %s System Bus\n", manuf, xid.buf);
+
ma.ma_name = NULL;
- ma.ma_memt = sc->sc_memt = &ra_bus_memt;
- ma.ma_dmat = sc->sc_dmat = &ra_bus_dmat;
+ ma.ma_memt = sc->sc_memt;
+ ma.ma_dmat = sc->sc_dmat;
/* attach critical devices */
mainbus_attach_critical(sc);
Home |
Main Index |
Thread Index |
Old Index