summaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/intel_th/core.c
Commit message (Collapse)AuthorAgeFilesLines
* intel_th: Support Host Debugger mode of operationAlexander Shishkin2016-11-181-8/+18
| | | | | | | | | | | | This patch adds a 'host_mode' module option to enable host-driven operational mode in the driver. In this mode, the driver does not perform trace configuration or enable trace capture, but still provides all the means necessary for software trace sources to write their data to the Trace Hub. This means that the debug host takes care of all the configuration and enabling and we do not interfere. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
* intel_th: Constify subdevicesAlexander Shishkin2016-11-181-1/+1
| | | | | | The subdevice array consists of immutable objects, make them const. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
* Merge tag 'stm-for-greg-20160714' of ↵Greg Kroah-Hartman2016-07-151-1/+34
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm into char-misc-next Alexander writes: intel_th: Fixes -t://git.kernel.org/pub/scm/linux/kernel/git/ash/stm.git tags/stm-for-greg-20160714 stable These are: * a fix for a modprobe time deadlock * a new PCI ID for Kaby Lake PCH-H
| * intel_th: Fix a deadlock in modprobingAlexander Shishkin2016-07-141-1/+34
| | | | | | | | | | | | | | | | | | | | | | Driver initialization tries to request a hub (GTH) driver module from its probe callback, resulting in a deadlock. This patch solves the problem by adding a deferred work for requesting the hub module. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: <stable@vger.kernel.org> # 4.4.x-
* | intel_th: Add runtime power management handlingAlexander Shishkin2016-07-011-9/+45
|/ | | | | | | | | | | | | Currently, an Intel TH (pci) device will be always active, because the devices on the 'intel_th' bus don't implement runtime pm to track their usage. To address this, this patch adds runtime pm support to the 'intel_th' bus and some additional bits for the hub. The 'output' type device is in use while a capture is active; the 'source' type device (STH) relies on its child stm class device for runtime pm tracking. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
* intel_th: Hold output driver module reference while capture is activeAlexander Shishkin2016-04-081-0/+5
| | | | | | | | | Right now it's possible to unload the output subdevice's driver while the capture to this output is active. Prevent this by holding the output driver's module reference. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Reviewed-by: Laurent Fert <laurent.fert@intel.com>
* intel_th: Fix activating a subdevice without a driverAlexander Shishkin2016-04-081-2/+10
| | | | | | | | | If output subdevice driver is not loaded, activating it will try to call its ->activate method and crash. Fix this by explicitly checking for the driver. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Reviewed-by: Laurent Fert <laurent.fert@intel.com>
* intel_th: Allow subdevice drivers to bring in own attribute groupsAlexander Shishkin2016-04-081-0/+12
| | | | | | | | | | Some subdevices (MSU, PTI) need to register their own driver-specific attribute groups. Provide a way for those to pass their attribute groups to the core driver in their driver structure so that the core can take care of creating and removing them. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Reviewed-by: Laurent Fert <laurent.fert@intel.com>
* intel_th: Use real device index in the node namesAlexander Shishkin2016-02-201-3/+20
| | | | | | | | | | | | Most of the intel_th core supports multiple co-existing TH devices, except for output device nodes, where intel_th device id is hardcoded to be zero. Fix this by fetching the actual intel_th device id from the parent device's drvdata. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* intel_th: Set root device's drvdata earlyAlexander Shishkin2016-02-201-0/+2
| | | | | | | | | | | Already during the subdevice initialization time, devices will need to reference Intel TH controller descriptor structure. This patch moves setting the drvdata from the pci glue to intel_th core, before subdevices are populated. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* intel_th: Update scratchpad bits according to enabled output activityAlexander Shishkin2016-02-201-0/+5
| | | | | | | | | | | | | | | | Intel TH implements a scratchpad register to indicate to the firmware and external debuggers what trace configuration is enabled so that everybody plays nicely together. The register is a bit field and the bit assignment convention is described in the developer's manual. This patch enables the driver to automatically set scratchpad register bits according to the output configuration that's enabled. Based on work by Yann Fouassier. Signed-off-by: Yann Fouassier <yann.fouassier@intel.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* intel_th: Add driver infrastructure for Intel(R) Trace Hub devicesAlexander Shishkin2015-10-041-0/+692
Intel(R) Trace Hub (TH) is a set of hardware blocks (subdevices) that produce, switch and output trace data from multiple hardware and software sources over several types of trace output ports encoded in System Trace Protocol (MIPI STPv2) and is intended to perform full system debugging. For these subdevices, we create a bus, where they can be discovered and configured by userspace software. This patch creates this bus infrastructure, three types of devices (source, output, switch), resource allocation, some callback mechanisms to facilitate communication between the subdevices' drivers and some common sysfs attributes. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>