coresight: Use fwnode handle instead of device names

We rely on the device names to find a CoreSight device on the
coresight bus. The device name however is obtained from the platform,
which is bound to the real platform/amba device. As we are about
to use different naming scheme for the coresight devices, we can't
rely on the platform device name to find the corresponding
coresight device. Instead we use the platform agnostic
"fwnode handle" of the parent device to find the devices.
We also reuse the same fwnode as the parent for the Coresight
device we create.

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Suzuki K Poulose 2019-06-19 13:53:03 -06:00 committed by Greg Kroah-Hartman
parent 20961aea98
commit 37ea1ffddf
4 changed files with 49 additions and 17 deletions

View file

@ -126,15 +126,15 @@ struct coresight_desc {
/**
* struct coresight_connection - representation of a single connection
* @outport: a connection's output port number.
* @chid_name: remote component's name.
* @child_port: remote component's port number @output is connected to.
* @chid_fwnode: remote component's fwnode handle.
* @child_dev: a @coresight_device representation of the component
connected to @outport.
*/
struct coresight_connection {
int outport;
const char *child_name;
int child_port;
struct fwnode_handle *child_fwnode;
struct coresight_device *child_dev;
};