summaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/intel_th/intel_th.h
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2017-08-10 17:28:38 +0200
committerAlexander Shishkin <alexander.shishkin@linux.intel.com>2017-08-25 17:47:55 +0200
commita753bfcfdb1f31d74b5ec87faa19f15e8c7b44a2 (patch)
tree583341f644da61bb07bc8b6f200c693cfe83cd0d /drivers/hwtracing/intel_th/intel_th.h
parentintel_th: Make SOURCE devices children of the root device (diff)
downloadlinux-a753bfcfdb1f31d74b5ec87faa19f15e8c7b44a2.tar.xz
linux-a753bfcfdb1f31d74b5ec87faa19f15e8c7b44a2.zip
intel_th: Make the switch allocate its subdevices
Instead of allocating devices for every possible output subdevice, allow the switch to allocate only the ones that it knows about. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Diffstat (limited to 'drivers/hwtracing/intel_th/intel_th.h')
-rw-r--r--drivers/hwtracing/intel_th/intel_th.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/hwtracing/intel_th/intel_th.h b/drivers/hwtracing/intel_th/intel_th.h
index 6243ac1b8bf1..d44da50be3b0 100644
--- a/drivers/hwtracing/intel_th/intel_th.h
+++ b/drivers/hwtracing/intel_th/intel_th.h
@@ -216,6 +216,7 @@ int intel_th_trace_enable(struct intel_th_device *thdev);
int intel_th_trace_disable(struct intel_th_device *thdev);
int intel_th_set_output(struct intel_th_device *thdev,
unsigned int master);
+int intel_th_output_enable(struct intel_th *th, unsigned int otype);
enum {
TH_MMIO_CONFIG = 0,
@@ -223,8 +224,9 @@ enum {
TH_MMIO_END,
};
-#define TH_SUBDEVICE_MAX 6
#define TH_POSSIBLE_OUTPUTS 8
+/* Total number of possible subdevices: outputs + GTH + STH */
+#define TH_SUBDEVICE_MAX (TH_POSSIBLE_OUTPUTS + 2)
#define TH_CONFIGURABLE_MASTERS 256
#define TH_MSC_MAX 2
@@ -233,6 +235,10 @@ enum {
* @dev: driver core's device
* @thdev: subdevices
* @hub: "switch" subdevice (GTH)
+ * @resource: resources of the entire controller
+ * @num_thdevs: number of devices in the @thdev array
+ * @num_resources: number or resources in the @resource array
+ * @irq: irq number
* @id: this Intel TH controller's device ID in the system
* @major: device node major for output devices
*/
@@ -242,6 +248,11 @@ struct intel_th {
struct intel_th_device *thdev[TH_SUBDEVICE_MAX];
struct intel_th_device *hub;
+ struct resource *resource;
+ unsigned int num_thdevs;
+ unsigned int num_resources;
+ int irq;
+
int id;
int major;
#ifdef CONFIG_MODULES