Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/cortex print "A5" instead of "A9" at attach tim...
details: https://anonhg.NetBSD.org/src/rev/0137321652b5
branches: trunk
changeset: 336528:0137321652b5
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Mar 04 23:18:21 2015 +0000
description:
print "A5" instead of "A9" at attach time if running on a Cortex-A5
diffstat:
sys/arch/arm/cortex/a9tmr.c | 12 +++++++++---
sys/arch/arm/cortex/a9wdt.c | 14 ++++++++++----
2 files changed, 19 insertions(+), 7 deletions(-)
diffs (82 lines):
diff -r 8be46a8e5eb5 -r 0137321652b5 sys/arch/arm/cortex/a9tmr.c
--- a/sys/arch/arm/cortex/a9tmr.c Wed Mar 04 23:01:55 2015 +0000
+++ b/sys/arch/arm/cortex/a9tmr.c Wed Mar 04 23:18:21 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: a9tmr.c,v 1.11 2015/02/27 18:26:49 jmcneill Exp $ */
+/* $NetBSD: a9tmr.c,v 1.12 2015/03/04 23:18:21 jmcneill Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.11 2015/02/27 18:26:49 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a9tmr.c,v 1.12 2015/03/04 23:18:21 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -120,6 +120,7 @@
struct mpcore_attach_args * const mpcaa = aux;
prop_dictionary_t dict = device_properties(self);
char freqbuf[sizeof("XXX SHz")];
+ const char *cpu_type;
/*
* This runs at the ARM PERIPHCLOCK which should be 1/2 of the CPU clock.
@@ -130,7 +131,12 @@
humanize_number(freqbuf, sizeof(freqbuf), sc->sc_freq, "Hz", 1000);
aprint_naive("\n");
- aprint_normal(": A9 Global 64-bit Timer (%s)\n", freqbuf);
+ if (CPU_ID_CORTEX_A5_P(curcpu()->ci_arm_cpuid)) {
+ cpu_type = "A5";
+ } else {
+ cpu_type = "A9";
+ }
+ aprint_normal(": %s Global 64-bit Timer (%s)\n", cpu_type, freqbuf);
self->dv_private = sc;
sc->sc_dev = self;
diff -r 8be46a8e5eb5 -r 0137321652b5 sys/arch/arm/cortex/a9wdt.c
--- a/sys/arch/arm/cortex/a9wdt.c Wed Mar 04 23:01:55 2015 +0000
+++ b/sys/arch/arm/cortex/a9wdt.c Wed Mar 04 23:18:21 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: a9wdt.c,v 1.3 2015/02/27 18:43:28 jmcneill Exp $ */
+/* $NetBSD: a9wdt.c,v 1.4 2015/03/04 23:18:21 jmcneill Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: a9wdt.c,v 1.3 2015/02/27 18:43:28 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a9wdt.c,v 1.4 2015/03/04 23:18:21 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -186,6 +186,7 @@
struct a9wdt_softc * const sc = device_private(self);
struct mpcore_attach_args * const mpcaa = aux;
prop_dictionary_t dict = device_properties(self);
+ const char *cpu_type;
sc->sc_dev = self;
sc->sc_memt = mpcaa->mpcaa_memt;
@@ -230,8 +231,13 @@
sc->sc_wdog_armed = true;
aprint_naive("\n");
- aprint_normal(": A9 Watchdog Timer, default period is %u seconds%s\n",
- sc->sc_wdog_period,
+ if (CPU_ID_CORTEX_A5_P(curcpu()->ci_arm_cpuid)) {
+ cpu_type = "A5";
+ } else {
+ cpu_type = "A9";
+ }
+ aprint_normal(": %s Watchdog Timer, default period is %u seconds%s\n",
+ cpu_type, sc->sc_wdog_period,
sc->sc_wdog_armed ? " (armed)" : "");
sc->sc_smw.smw_name = device_xname(self);
Home |
Main Index |
Thread Index |
Old Index