coresight: Fixes coresight DT parse to get correct output port ID.
authorMike Leach <mike.leach@linaro.org>
Mon, 27 Mar 2017 17:09:33 +0000 (11:09 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 15:43:45 +0000 (17:43 +0200)
Corrected to get the port numbering to allow programmable replicator driver
to operate correctly.

By convention, CoreSight devices number ports, not endpoints in
the .dts files:-

port {
     reg<N>
     endpoint {
     }
}

Existing code read endpoint number - always 0x0, rather than the correct
port number.

Signed-off-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/of_coresight.c

index 629e031b745651f136916d482506b953dc12597a..09142e99e915e8230c7de2d88a9ff259c14e9e3e 100644 (file)
@@ -149,7 +149,7 @@ struct coresight_platform_data *of_get_coresight_platform_data(
                                continue;
 
                        /* The local out port number */
-                       pdata->outports[i] = endpoint.id;
+                       pdata->outports[i] = endpoint.port;
 
                        /*
                         * Get a handle on the remote port and parent