lkml.org 
[lkml]   [2019]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 18/25] coresight: Introduce generic platform data helper
From
Date
On 03/27/2019 10:57 PM, Mathieu Poirier wrote:
> On Wed, Mar 20, 2019 at 06:49:35PM +0000, Suzuki K Poulose wrote:
>> So far we have hard coded the DT platform parsing code in
>> every driver. Introduce generic helper to parse the information
>> provided by the firmware in a platform agnostic manner, in preparation
>> for the ACPI support.
>>
>> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>


>>
>> +static int coresight_alloc_conns(struct device *dev,
>> + struct coresight_platform_data *pdata)
>> +{
>> + if (pdata->nr_outport) {
>> + pdata->conns = devm_kzalloc(dev, pdata->nr_outport *
>> + sizeof(*pdata->conns),
>> + GFP_KERNEL);
>> + if (!pdata->conns)
>> + return -ENOMEM;
>> + }
>> +
>> + return 0;
>> +}
>> +

>> - ret = of_coresight_alloc_memory(dev, pdata);
>> + ret = coresight_alloc_conns(dev, pdata);
>
> I'm pretty sure you're doing this because you want to use
> coresight_alloc_conns() for ACPI as well, and I'm fine with that. But it is
> quite orthogonal to the rest of the work done in this patch and as such I think
> it needs a patch of its own.
>

Sure, will split this into a separate patch.

Suzuki

\
 
 \ /
  Last update: 2019-03-28 11:58    [W:0.066 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site