- Add a missing shift in schizo_get_timecount(). This happened to be non-fatal
as STX_CTRL_PERF_CNT_CNT0_SHIFT actually is zero, if we were using the second counter in the upper 32 bits this would be required though as the MI timecounter code doesn't support 64-bit counters/counter registers. - Remove a redundant NULL assignment from the timecounter initialization.
This commit is contained in:
parent
47e9f283f0
commit
447e9ac31d
@ -482,7 +482,6 @@ schizo_attach(device_t dev)
|
||||
if (tc == NULL)
|
||||
panic("%s: could not malloc timecounter", __func__);
|
||||
tc->tc_get_timecount = schizo_get_timecount;
|
||||
tc->tc_poll_pps = NULL;
|
||||
tc->tc_counter_mask = STX_CTRL_PERF_CNT_MASK;
|
||||
if (OF_getprop(OF_peer(0), "clock-frequency", &prop,
|
||||
sizeof(prop)) == -1)
|
||||
@ -1521,6 +1520,7 @@ schizo_get_timecount(struct timecounter *tc)
|
||||
struct schizo_softc *sc;
|
||||
|
||||
sc = tc->tc_priv;
|
||||
return (SCHIZO_CTRL_READ_8(sc, STX_CTRL_PERF_CNT) &
|
||||
(STX_CTRL_PERF_CNT_MASK << STX_CTRL_PERF_CNT_CNT0_SHIFT));
|
||||
return ((SCHIZO_CTRL_READ_8(sc, STX_CTRL_PERF_CNT) &
|
||||
(STX_CTRL_PERF_CNT_MASK << STX_CTRL_PERF_CNT_CNT0_SHIFT)) >>
|
||||
STX_CTRL_PERF_CNT_CNT0_SHIFT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user