lkml.org 
[lkml]   [2017]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC v1 4/6] platform: x86: Add generic Intel IPC driver
On Tue, Aug 22, 2017 at 8:09 AM, sathya <sathyaosid@gmail.com> wrote:
> On 08/18/2017 05:38 AM, Andy Shevchenko wrote:
>> On Tue, Aug 1, 2017 at 9:13 PM,
>> <sathyanarayanan.kuppuswamy@linux.intel.com> wrote:

>>> +struct intel_ipc_dev_cfg {
>>> + void __iomem *base;
>>> + void __iomem *wrbuf_reg;
>>> + void __iomem *rbuf_reg;
>>> + void __iomem *sptr_reg;
>>> + void __iomem *dptr_reg;
>>> + void __iomem *status_reg;
>>> + void __iomem *cmd_reg;
>>
>> No, you have to switch to regmap instead.
>
> Do you want me to register regmap in intel_pmc_ipc.c and pass this regmap
> pointer to devm_intel_ipc_dev_create()
> instead of regular mem address ? Please correct me if my understanding is
> incorrect.
>
> But I don't understand how this change will improve the design.

We will have a core part which takes a PMC/SCU regmap on input.

Core part will not know about exact PMC in use. On top of core part
you will have one driver per PMC type.

In exchange core part will provide a generic set of functions like
"send simple command", "send command", "do ...smth...".

Core part _is_ a library.

>>> + int mode;
>>> + int irq;
>>> + int irqflags;
>>> + int chan_type;
>>> + bool use_msi;
>>> +};

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-08-22 11:51    [W:0.040 / U:7.036 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site