aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2018-11-12 06:30:24 -0500
committerAlexander Shishkin <alexander.shishkin@linux.intel.com>2019-02-21 08:04:36 -0500
commitba828cc9dcc8ffefd0d17165be9b132bd5232063 (patch)
tree6691de79955b0efd80eebe62cabf122e07d65852 /drivers/hwtracing
parent8d86f6b4306f4be38b39d420456edf61a7b7119e (diff)
intel_th: Only create useful device nodes
Right now, the driver will create a device node for each output port, with the intent to provide read access to that port's data. However, only the memory ports are readable this way (msc0, msc1). Other output ports don't need device nodes, so remove them. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Diffstat (limited to 'drivers/hwtracing')
-rw-r--r--drivers/hwtracing/intel_th/core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
index fc6b7f8b62fb..7c1acc2f801c 100644
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -422,6 +422,7 @@ static const struct intel_th_subdevice {
422 unsigned nres; 422 unsigned nres;
423 unsigned type; 423 unsigned type;
424 unsigned otype; 424 unsigned otype;
425 bool mknode;
425 unsigned scrpd; 426 unsigned scrpd;
426 int id; 427 int id;
427} intel_th_subdevices[] = { 428} intel_th_subdevices[] = {
@@ -456,6 +457,7 @@ static const struct intel_th_subdevice {
456 .name = "msc", 457 .name = "msc",
457 .id = 0, 458 .id = 0,
458 .type = INTEL_TH_OUTPUT, 459 .type = INTEL_TH_OUTPUT,
460 .mknode = true,
459 .otype = GTH_MSU, 461 .otype = GTH_MSU,
460 .scrpd = SCRPD_MEM_IS_PRIM_DEST | SCRPD_MSC0_IS_ENABLED, 462 .scrpd = SCRPD_MEM_IS_PRIM_DEST | SCRPD_MSC0_IS_ENABLED,
461 }, 463 },
@@ -476,6 +478,7 @@ static const struct intel_th_subdevice {
476 .name = "msc", 478 .name = "msc",
477 .id = 1, 479 .id = 1,
478 .type = INTEL_TH_OUTPUT, 480 .type = INTEL_TH_OUTPUT,
481 .mknode = true,
479 .otype = GTH_MSU, 482 .otype = GTH_MSU,
480 .scrpd = SCRPD_MEM_IS_PRIM_DEST | SCRPD_MSC1_IS_ENABLED, 483 .scrpd = SCRPD_MEM_IS_PRIM_DEST | SCRPD_MSC1_IS_ENABLED,
481 }, 484 },
@@ -635,7 +638,8 @@ intel_th_subdevice_alloc(struct intel_th *th,
635 } 638 }
636 639
637 if (subdev->type == INTEL_TH_OUTPUT) { 640 if (subdev->type == INTEL_TH_OUTPUT) {
638 thdev->dev.devt = MKDEV(th->major, th->num_thdevs); 641 if (subdev->mknode)
642 thdev->dev.devt = MKDEV(th->major, th->num_thdevs);
639 thdev->output.type = subdev->otype; 643 thdev->output.type = subdev->otype;
640 thdev->output.port = -1; 644 thdev->output.port = -1;
641 thdev->output.scratchpad = subdev->scrpd; 645 thdev->output.scratchpad = subdev->scrpd;