ETM: start cleaning up ETM_CTRL bit handling
commite25819645ee2beb0818a79006eed9c9cedaaf5bb
authorDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 19 Dec 2009 21:07:25 +0000 (19 13:07 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 19 Dec 2009 21:07:25 +0000 (19 13:07 -0800)
tree68b71132efccba4167344852dea1c55878186ab1
parent9abad965ab358c1d598f1354842967cad637b284
ETM: start cleaning up ETM_CTRL bit handling

Provide better comments for the ETM_CTRL bits; use the correct bit
for half/full clock mode; and define a few more of the bits available
from the earliest ETM versions.

The new bit defintions use ETM_CTRL_* names to match their register
(instead of ETM_PORT_* or ETMV1_*).  For clarity, and better matching
to docs, they are defined with bitshifting not pre-computed masks.

Stop abusing typdefs for ETM_CTRL values; such values are not limited
to the enumerated set of individual bit values.

Rename etm->portmode to etm->control ... and start morphing it into a
single generic shadow of ETM_CTRL.  Eventually etm->tracemode should
vanish, so we can just write etm->control to ETM_CTRL.

Restore an "if" that somehow got dropped.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/target/etb.c
src/target/etm.c
src/target/etm.h