forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coresight: add CoreSight core layer framework
CoreSight components are compliant with the ARM CoreSight architecture specification and can be connected in various topologies to suit a particular SoC tracing needs. These trace components can generally be classified as sources, links and sinks. Trace data produced by one or more sources flows through the intermediate links connecting the source to the currently selected sink. The CoreSight framework provides an interface for the CoreSight trace drivers to register themselves with. It's intended to build up a topological view of the CoreSight components and configure the correct serie of components on user input via sysfs. For eg., when enabling a source, the framework builds up a path consisting of all the components connecting the source to the currently selected sink(s) and enables all of them. The framework also supports switching between available sinks and provides status information to user space applications through the debugfs interface. Signed-off-by: Pratik Patel <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,272 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -918,6 +918,14 @@ M: Hubert Feurstein <[email protected]> | |
S: Maintained | ||
F: arch/arm/mach-ep93xx/micro9.c | ||
|
||
ARM/CORESIGHT FRAMEWORK AND DRIVERS | ||
M: Mathieu Poirier <[email protected]> | ||
L: [email protected] (moderated for non-subscribers) | ||
S: Maintained | ||
F: drivers/coresight/* | ||
F: Documentation/trace/coresight.txt | ||
F: Documentation/devicetree/bindings/arm/coresight.txt | ||
|
||
ARM/CORGI MACHINE SUPPORT | ||
M: Richard Purdie <[email protected]> | ||
S: Maintained | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# | ||
# Makefile for CoreSight drivers. | ||
# | ||
obj-$(CONFIG_CORESIGHT) += coresight.o | ||
obj-$(CONFIG_OF) += of_coresight.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 and | ||
* only version 2 as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
|
||
#ifndef _CORESIGHT_PRIV_H | ||
#define _CORESIGHT_PRIV_H | ||
|
||
#include <linux/bitops.h> | ||
#include <linux/io.h> | ||
#include <linux/coresight.h> | ||
|
||
/* | ||
* Coresight management registers (0xf00-0xfcc) | ||
* 0xfa0 - 0xfa4: Management registers in PFTv1.0 | ||
* Trace registers in PFTv1.1 | ||
*/ | ||
#define CORESIGHT_ITCTRL 0xf00 | ||
#define CORESIGHT_CLAIMSET 0xfa0 | ||
#define CORESIGHT_CLAIMCLR 0xfa4 | ||
#define CORESIGHT_LAR 0xfb0 | ||
#define CORESIGHT_LSR 0xfb4 | ||
#define CORESIGHT_AUTHSTATUS 0xfb8 | ||
#define CORESIGHT_DEVID 0xfc8 | ||
#define CORESIGHT_DEVTYPE 0xfcc | ||
|
||
#define TIMEOUT_US 100 | ||
#define BMVAL(val, lsb, msb) ((val & GENMASK(msb, lsb)) >> lsb) | ||
|
||
static inline void CS_LOCK(void __iomem *addr) | ||
{ | ||
do { | ||
/* Wait for things to settle */ | ||
mb(); | ||
writel_relaxed(0x0, addr + CORESIGHT_LAR); | ||
} while (0); | ||
} | ||
|
||
static inline void CS_UNLOCK(void __iomem *addr) | ||
{ | ||
do { | ||
writel_relaxed(CORESIGHT_UNLOCK, addr + CORESIGHT_LAR); | ||
/* Make sure eveyone has seen this */ | ||
mb(); | ||
} while (0); | ||
} | ||
|
||
#ifdef CONFIG_CORESIGHT_SOURCE_ETM3X | ||
extern int etm_readl_cp14(u32 off, unsigned int *val); | ||
extern int etm_writel_cp14(u32 off, u32 val); | ||
#else | ||
static inline int etm_readl_cp14(u32 off, unsigned int *val) { return 0; } | ||
static inline int etm_writel_cp14(u32 val, u32 off) { return 0; } | ||
#endif | ||
|
||
#endif |
Oops, something went wrong.