coresight: tmc: waiting for TMCReady bit before programming
authorMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 3 May 2016 17:33:45 +0000 (11:33 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 May 2016 21:59:30 +0000 (14:59 -0700)
commit358f42184e97f9a216b927a5a744597b98e0eee1
tree4ddb86e05bf553971704055f9a8a3a5e4f7065da
parent580ff804ecaf5bc59835fec26e17325bcd53fc91
coresight: tmc: waiting for TMCReady bit before programming

According to the TRM before programming the TMC in circular
buffer mode (and that for any configuration, ETB, ETR, ETF),
the TMCReady bit in the status register has to be set.

This patch adds a check to make sure the state machine is in
a state where it can be configured, and complains otherwise.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-tmc.c