From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Vijendar Mukunda <Vijendar.Mukunda@amd.com>, vkoul@kernel.org
Cc: amadeuszx.slawinski@linux.intel.com, Mario.Limonciello@amd.com,
Sunil-kumar.Dommati@amd.com, Basavaraj.Hiregoudar@amd.com,
Mastan.Katragadda@amd.com, Arungopal.kondaveeti@amd.com,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Sanyog Kale <sanyog.r.kale@intel.com>,
"moderated list:SOUNDWIRE SUBSYSTEM"
<alsa-devel@alsa-project.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 7/8] soundwire: amd: handle soundwire wake enable interrupt
Date: Mon, 13 Feb 2023 12:24:00 -0600 [thread overview]
Message-ID: <cd70a91c-231e-1bca-b0ac-4041cba0daad@linux.intel.com> (raw)
In-Reply-To: <20230213094031.2231058-8-Vijendar.Mukunda@amd.com>
On 2/13/23 03:40, Vijendar Mukunda wrote:
> Add wake enable interrupt support for both the soundwire manager
> instances.
>
> Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
> Signed-off-by: Mastan Katragadda <Mastan.Katragadda@amd.com>
> ---
> drivers/soundwire/amd_manager.c | 10 ++++++++++
> drivers/soundwire/amd_manager.h | 1 +
> 2 files changed, 11 insertions(+)
>
> diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
> index eced189ba6e0..e53dc67f8529 100644
> --- a/drivers/soundwire/amd_manager.c
> +++ b/drivers/soundwire/amd_manager.c
> @@ -934,6 +934,13 @@ static void amd_sdw_update_slave_status(u32 status_change_0to7, u32 status_chang
> }
> }
>
> +static void amd_sdw_process_wake_event(struct amd_sdw_manager *amd_manager)
> +{
> + pm_request_resume(amd_manager->dev);
> + acp_reg_writel(0x00, amd_manager->acp_mmio + ACP_SW_WAKE_EN(amd_manager->instance));
> + acp_reg_writel(0x00, amd_manager->mmio + ACP_SW_STATE_CHANGE_STATUS_8TO11);
> +}
> +
> static void amd_sdw_irq_thread(struct work_struct *work)
> {
> struct amd_sdw_manager *amd_manager =
> @@ -945,6 +952,9 @@ static void amd_sdw_irq_thread(struct work_struct *work)
> status_change_0to7 = acp_reg_readl(amd_manager->mmio + ACP_SW_STATE_CHANGE_STATUS_0TO7);
> dev_dbg(amd_manager->dev, "%s [SDW%d] SDW INT: 0to7=0x%x, 8to11=0x%x\n",
> __func__, amd_manager->instance, status_change_0to7, status_change_8to11);
> + if (status_change_8to11 & AMD_SDW_WAKE_STAT_MASK)
> + return amd_sdw_process_wake_event(amd_manager);
> +
it's not clear what 8to11 might have to do with the wake enable?
Can't you have a wake for devices 1..7?
> if (status_change_8to11 & AMD_SDW_PREQ_INTR_STAT) {
> amd_sdw_read_and_process_ping_status(amd_manager);
> } else {
> diff --git a/drivers/soundwire/amd_manager.h b/drivers/soundwire/amd_manager.h
> index 6ec37612ae4e..86bc6d4f48bf 100644
> --- a/drivers/soundwire/amd_manager.h
> +++ b/drivers/soundwire/amd_manager.h
> @@ -190,6 +190,7 @@
> #define AMD_SDW_CLK_STOP_DONE 1
> #define AMD_SDW_CLK_RESUME_REQ 2
> #define AMD_SDW_CLK_RESUME_DONE 3
> +#define AMD_SDW_WAKE_STAT_MASK BIT(16)
>
> enum amd_sdw_cmd_type {
> AMD_SDW_CMD_PING = 0,
next prev parent reply other threads:[~2023-02-13 18:25 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230213094031.2231058-1-Vijendar.Mukunda@amd.com>
2023-02-13 9:40 ` [PATCH V2 1/8] soundwire: export sdw_compute_slave_ports() function Vijendar Mukunda
2023-02-13 9:40 ` [PATCH V2 2/8] soundwire: amd: Add support for AMD Manager driver Vijendar Mukunda
2023-02-13 18:05 ` Pierre-Louis Bossart
2023-02-14 5:28 ` Mukunda,Vijendar
2023-02-14 13:21 ` Pierre-Louis Bossart
2023-02-14 22:29 ` Mukunda,Vijendar
2023-02-13 9:40 ` [PATCH V2 3/8] soundwire: amd: register soundwire manager dai ops Vijendar Mukunda
2023-02-13 18:09 ` Pierre-Louis Bossart
2023-02-14 5:49 ` Mukunda,Vijendar
2023-02-13 9:40 ` [PATCH V2 4/8] soundwire: amd: enable build for AMD soundwire manager driver Vijendar Mukunda
2023-02-13 9:40 ` [PATCH V2 5/8] soundwire: amd: add soundwire manager interrupt handling Vijendar Mukunda
2023-02-13 18:15 ` Pierre-Louis Bossart
2023-02-14 5:56 ` Mukunda,Vijendar
2023-02-14 7:54 ` Mukunda,Vijendar
2023-02-14 13:28 ` Pierre-Louis Bossart
2023-02-14 22:18 ` Mukunda,Vijendar
2023-02-13 9:40 ` [PATCH V2 6/8] soundwire: amd: add runtime pm ops for AMD soundwire manager driver Vijendar Mukunda
2023-02-13 18:20 ` Pierre-Louis Bossart
2023-02-14 6:13 ` Mukunda,Vijendar
2023-02-14 13:33 ` Pierre-Louis Bossart
2023-02-14 21:44 ` Mukunda,Vijendar
2023-02-13 9:40 ` [PATCH V2 7/8] soundwire: amd: handle soundwire wake enable interrupt Vijendar Mukunda
2023-02-13 18:24 ` Pierre-Louis Bossart [this message]
2023-02-14 6:15 ` Mukunda,Vijendar
2023-02-14 13:35 ` Pierre-Louis Bossart
2023-02-14 21:24 ` Mukunda,Vijendar
2023-02-13 9:40 ` [PATCH V2 8/8] soundwire: amd: add pm_prepare callback and pm ops support Vijendar Mukunda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd70a91c-231e-1bca-b0ac-4041cba0daad@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=Arungopal.kondaveeti@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Mastan.Katragadda@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sanyog.r.kale@intel.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox