lkml.org 
[lkml]   [2017]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 4/9] coresight: refactor with function of_coresight_get_cpu
From
Date
On 25/03/17 18:23, Leo Yan wrote:
> This is refactor to add function of_coresight_get_cpu(), so it's used to
> retrieve CPU id for coresight component. Finally can use it as a common
> function for multiple places.
>
> Suggested-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Leo Yan <leo.yan@linaro.org>

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> - if (found)
> - break;
> - }
> - of_node_put(dn);
> -
> - /* Affinity to CPU0 if no cpu nodes are found */
> - pdata->cpu = found ? cpu : 0;
> + pdata->cpu = of_coresight_get_cpu(node);
>
> return pdata;
> }
> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> index 2a5982c..bf96678 100644
> --- a/include/linux/coresight.h
> +++ b/include/linux/coresight.h
> @@ -263,9 +263,11 @@ static inline int coresight_timeout(void __iomem *addr, u32 offset,
> #endif
>
> #ifdef CONFIG_OF
> +extern int of_coresight_get_cpu(struct device_node *node);
> extern struct coresight_platform_data *of_get_coresight_platform_data(
> struct device *dev, struct device_node *node);
> #else
> +static inline int of_coresight_get_cpu(struct device_node *node) { return 0; }
> static inline struct coresight_platform_data *of_get_coresight_platform_data(
> struct device *dev, struct device_node *node) { return NULL; }
> #endif
>

\
 
 \ /
  Last update: 2017-03-31 11:07    [W:0.190 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site