Skip to content

Commit

Permalink
ARM: 6292/1: coresight: add ETM management registers
Browse files Browse the repository at this point in the history
Add notion of ETM OS lock, save and restore registers.

Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Alexander Shishkin authored and Russell King committed Aug 10, 2010
1 parent 686ff22 commit 9e354ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions arch/arm/include/asm/hardware/coresight.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ struct tracectx {
/* CoreSight Component Registers */
#define CSCR_CLASS 0xff4

#define CSCR_PRSR 0x314

#define UNLOCK_MAGIC 0xc5acce55

/* ETM control register, "ETM Architecture", 3.3.1 */
Expand Down Expand Up @@ -132,6 +130,12 @@ struct tracectx {
ETMCTRL_BRANCH_OUTPUT | \
ETMCTRL_DO_CONTEXTID)

/* ETM management registers, "ETM Architecture", 3.5.24 */
#define ETMMR_OSLAR 0x300
#define ETMMR_OSLSR 0x304
#define ETMMR_OSSRR 0x308
#define ETMMR_PDSR 0x314

/* ETB registers, "CoreSight Components TRM", 9.3 */
#define ETBR_DEPTH 0x04
#define ETBR_STATUS 0x0c
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/etm.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ static int __init etm_probe(struct amba_device *dev, struct amba_id *id)
t->etm_portsz = 1;

etm_unlock(t);
ret = etm_readl(t, CSCR_PRSR);
ret = etm_readl(t, ETMMR_PDSR);

t->ncmppairs = etm_readl(t, ETMR_CONFCODE) & 0xf;
etm_writel(t, 0x440, ETMR_CTRL);
Expand Down

0 comments on commit 9e354ea

Please sign in to comment.