summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2008-08-24 16:22:04 +0000
committermarius <marius@FreeBSD.org>2008-08-24 16:22:04 +0000
commitb170b03c8e7fb45f3b165ca67ee19e55f3ae9b53 (patch)
tree52a7e6dc5db3445b7735995689b37a82dc24ae37 /sys
parentfc03269bd377fdba1743efebf7c4c4326a09c659 (diff)
downloadFreeBSD-src-b170b03c8e7fb45f3b165ca67ee19e55f3ae9b53.zip
FreeBSD-src-b170b03c8e7fb45f3b165ca67ee19e55f3ae9b53.tar.gz
Announce the speed of the PCI bus for informational purpose.
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/sparc64/pci/psycho.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c
index 88d7bc8..4f027ae 100644
--- a/sys/sparc64/pci/psycho.c
+++ b/sys/sparc64/pci/psycho.c
@@ -295,7 +295,7 @@ psycho_attach(device_t dev)
bus_addr_t intrclr, intrmap;
uint64_t csr, dr;
phandle_t child, node;
- uint32_t dvmabase, prop_array[2];
+ uint32_t dvmabase, prop, prop_array[2];
int32_t rev;
u_int ver;
int i, n, nrange, rid;
@@ -377,10 +377,13 @@ psycho_attach(device_t dev)
sc->sc_ign = 0x1f; /* Hummingbird/Sabre IGN is always 0x1f. */
if (sc->sc_mode == PSYCHO_MODE_PSYCHO)
sc->sc_ign = PSYCHO_GCSR_IGN(csr);
+ if (OF_getprop(node, "clock-frequency", &prop, sizeof(prop)) == -1)
+ prop = 33000000;
- device_printf(dev, "%s, impl %d, version %d, IGN %#x, bus %c\n",
+ device_printf(dev,
+ "%s, impl %d, version %d, IGN %#x, bus %c, %dMHz\n",
desc->pd_name, (u_int)PSYCHO_GCSR_IMPL(csr), ver, sc->sc_ign,
- 'A' + sc->sc_half);
+ 'A' + sc->sc_half, prop / 1000 / 1000);
/* Set up the PCI control and PCI diagnostic registers. */
OpenPOWER on IntegriCloud