[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f30689fb-3fd8-b76a-f614-0aa2c4719327@amd.com>
Date: Fri, 17 Mar 2023 19:34:18 +0530
From: "Mukunda,Vijendar" <vijendar.mukunda@....com>
To: Vinod Koul <vkoul@...nel.org>
Cc: alsa-devel@...a-project.org, pierre-louis.bossart@...ux.intel.com,
Basavaraj.Hiregoudar@....com, Sunil-kumar.Dommati@....com,
Mario.Limonciello@....com, amadeuszx.slawinski@...ux.intel.com,
Mastan.Katragadda@....com, Arungopal.kondaveeti@....com,
claudiu.beznea@...rochip.com,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Sanyog Kale <sanyog.r.kale@...el.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V6 2/8] soundwire: amd: Add support for AMD Manager driver
On 17/03/23 19:04, Vinod Koul wrote:
> On 16-03-23, 19:28, Mukunda,Vijendar wrote:
>> On 15/03/23 15:12, Vinod Koul wrote:
>>> On 07-03-23, 19:01, Vijendar Mukunda wrote:
>>>> +/**
>>>> + * struct amd_sdw_manager - amd manager driver context
>>>> + * @bus: bus handle
>>>> + * @dev: linux device
>>>> + * @mmio: SoundWire registers mmio base
>>>> + * @acp_mmio: acp registers mmio base
>>>> + * @reg_mask: register mask structure per manager instance
>>>> + * @probe_work: SoundWire manager probe workqueue
>>>> + * @acp_sdw_lock: mutex to protect acp share register access
>>>> + * @num_din_ports: number of input ports
>>>> + * @num_dout_ports: number of output ports
>>>> + * @cols_index: Column index in frame shape
>>>> + * @rows_index: Rows index in frame shape
>>>> + * @instance: SoundWire manager instance
>>>> + * @quirks: SoundWire manager quirks
>>>> + * @wake_en_mask: wake enable mask per SoundWire manager
>>>> + * @power_mode_mask: flag interprets amd SoundWire manager power mode
>>>> + */
>>>> +struct amd_sdw_manager {
>>>> + struct sdw_bus bus;
>>>> + struct device *dev;
>>>> +
>>>> + void __iomem *mmio;
>>>> + void __iomem *acp_mmio;
>>>> +
>>>> + struct sdw_manager_reg_mask *reg_mask;
>>>> + struct work_struct probe_work;
>>>> + /* mutex to protect acp common register access */
>>>> + struct mutex *acp_sdw_lock;
>>>> +
>>>> + int num_din_ports;
>>>> + int num_dout_ports;
>>>> +
>>>> + int cols_index;
>>>> + int rows_index;
>>>> +
>>>> + u32 instance;
>>>> + u32 quirks;
>>>> + u32 wake_en_mask;
>>>> + u32 power_mode_mask;
>>>> +};
>>> Does the manager need to be exposed to rest of kernel or users of this
>>> driver, is so why?
>> Currently, amd_manager structure being used in ACP PCI driver
>> (parent driver) and Soundwire DMA driver.
>>
>> In ACP PCI driver, IRQ handler we will use amd_manager structure to
>> schedule workqueue based on soundwire manager instance.
>> In Soundwire DMA driver, we need to retrieve amd_manager instance.
>> As per our design, we have fixed mapping. We need to use same set of
>> DMA registers based on CPU DAI ID.
>> i.e if AUDIO0 TX port is selected in amd_manager driver
>> then we need to use AUDIO0 TX registers for DMA programming.
>> we have included comments for describing mapping in amd_manager.h
>> file.
> Sorry not sure I follow, can you elaborate which members of above struct
> are used by PCI driver?
ACP PCI driver uses "amd_sdw_irq_thread" structure member which was added
in below patch.
https://www.spinics.net/lists/alsa-devel/msg155118.html
amd_manager structure "instance" member will be used by ACP Soundwire DMA driver.
>
Powered by blists - more mailing lists