Re: [RFC v1 4/6] platform: x86: Add generic Intel IPC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 22, 2017 at 8:09 AM, sathya <sathyaosid@xxxxxxxxx> wrote:
> On 08/18/2017 05:38 AM, Andy Shevchenko wrote:
>> On Tue, Aug 1, 2017 at 9:13 PM,
>> <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux