* [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE
@ 2025-02-17 23:17 Mario Limonciello
2025-02-17 23:17 ` [PATCH 1/7] x86/amd_node: Add a helper for use with `read_poll_timeout` Mario Limonciello
` (8 more replies)
0 siblings, 9 replies; 15+ messages in thread
From: Mario Limonciello @ 2025-02-17 23:17 UTC (permalink / raw)
To: Yazen Ghannam, Borislav Petkov, Mark Brown
Cc: Mario Limonciello, Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
From: Mario Limonciello <mario.limonciello@amd.com>
The various AMD audio drivers have self contained implementations
for SMN router communication that require hardcoding the bridge ID.
These implementations also don't prevent race conditions with other
drivers performing SMN communication.
A new centralized driver AMD_NODE is introduced and all drivers in
the kernel should use this instead. Adjust all AMD audio drivers to
use it.
Mario Limonciello (7):
x86/amd_node: Add a helper for use with `read_poll_timeout`
ASoC: amd: acp: rembrandt: Use AMD_NODE
ASoC: amd: acp: acp70: Use AMD_NODE
ASoC: amd: acp: acp63: Use AMD_NODE
ASoC: SOF: amd: Use AMD_NODE
ASoC: amd: acp: Drop local symbols for smn read/write
ASoC: SOF: amd: Drop host bridge ID from struct
arch/x86/include/asm/amd_node.h | 11 +++++
sound/soc/amd/acp/Kconfig | 3 ++
sound/soc/amd/acp/acp-legacy-common.c | 18 --------
sound/soc/amd/acp/acp-rembrandt.c | 28 ++++++------
sound/soc/amd/acp/acp63.c | 63 +++++++++++++++++----------
sound/soc/amd/acp/acp70.c | 28 ++----------
sound/soc/amd/acp/amd.h | 3 --
sound/soc/sof/amd/Kconfig | 1 +
sound/soc/sof/amd/acp.c | 56 +++++++-----------------
sound/soc/sof/amd/acp.h | 2 -
sound/soc/sof/amd/pci-acp63.c | 1 -
sound/soc/sof/amd/pci-acp70.c | 1 -
sound/soc/sof/amd/pci-rmb.c | 1 -
sound/soc/sof/amd/pci-rn.c | 1 -
sound/soc/sof/amd/pci-vangogh.c | 1 -
15 files changed, 90 insertions(+), 128 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/7] x86/amd_node: Add a helper for use with `read_poll_timeout`
2025-02-17 23:17 [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mario Limonciello
@ 2025-02-17 23:17 ` Mario Limonciello
2025-02-17 23:17 ` [PATCH 2/7] ASoC: amd: acp: rembrandt: Use AMD_NODE Mario Limonciello
` (7 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Mario Limonciello @ 2025-02-17 23:17 UTC (permalink / raw)
To: Yazen Ghannam, Borislav Petkov, Mark Brown
Cc: Mario Limonciello, Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
From: Mario Limonciello <mario.limonciello@amd.com>
Some of the ACP drivers will poll registers through SMN using
`read_poll_timeout` which requires returning the result of the register
read as the argument.
Add a helper to do just that.
Tested by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
arch/x86/include/asm/amd_node.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/x86/include/asm/amd_node.h b/arch/x86/include/asm/amd_node.h
index 113ad3e8ee40a..9f3f613366f7d 100644
--- a/arch/x86/include/asm/amd_node.h
+++ b/arch/x86/include/asm/amd_node.h
@@ -33,4 +33,15 @@ static inline u16 amd_num_nodes(void)
int __must_check amd_smn_read(u16 node, u32 address, u32 *value);
int __must_check amd_smn_write(u16 node, u32 address, u32 value);
+/* helper for use with read_poll_timeout */
+static inline int smn_read_register(u32 reg)
+{
+ int data, rc;
+
+ rc = amd_smn_read(0, reg, &data);
+ if (rc)
+ return rc;
+
+ return data;
+}
#endif /*_ASM_X86_AMD_NODE_H_*/
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/7] ASoC: amd: acp: rembrandt: Use AMD_NODE
2025-02-17 23:17 [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mario Limonciello
2025-02-17 23:17 ` [PATCH 1/7] x86/amd_node: Add a helper for use with `read_poll_timeout` Mario Limonciello
@ 2025-02-17 23:17 ` Mario Limonciello
2025-02-17 23:17 ` [PATCH 3/7] ASoC: amd: acp: acp70: " Mario Limonciello
` (6 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Mario Limonciello @ 2025-02-17 23:17 UTC (permalink / raw)
To: Yazen Ghannam, Borislav Petkov, Mark Brown
Cc: Mario Limonciello, Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
From: Mario Limonciello <mario.limonciello@amd.com>
All consumers of SMN in the kernel should be doing it through the
functions provided by AMD_NODE.
Stop using the local SMN read/write symbols and switch to the AMD_NODE
provided ones.
Tested by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
sound/soc/amd/acp/Kconfig | 1 +
sound/soc/amd/acp/acp-rembrandt.c | 28 ++++++++++++++--------------
2 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig
index 53793ec7c7b49..2bb78a748c79d 100644
--- a/sound/soc/amd/acp/Kconfig
+++ b/sound/soc/amd/acp/Kconfig
@@ -58,6 +58,7 @@ config SND_AMD_ASOC_REMBRANDT
select SND_SOC_AMD_ACP_I2S
select SND_SOC_AMD_ACP_PDM
select SND_SOC_AMD_ACP_LEGACY_COMMON
+ depends on AMD_NODE
depends on X86 && PCI
help
This option enables Rembrandt I2S support on AMD platform.
diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c
index 2648256fa129c..e727754a8231c 100644
--- a/sound/soc/amd/acp/acp-rembrandt.c
+++ b/sound/soc/amd/acp/acp-rembrandt.c
@@ -22,6 +22,8 @@
#include <linux/pci.h>
#include <linux/pm_runtime.h>
+#include <asm/amd_node.h>
+
#include "amd.h"
#include "../mach-config.h"
#include "acp-mach.h"
@@ -31,7 +33,6 @@
#define MP1_C2PMSG_69 0x3B10A14
#define MP1_C2PMSG_85 0x3B10A54
#define MP1_C2PMSG_93 0x3B10A74
-#define HOST_BRIDGE_ID 0x14B5
static struct acp_resource rsrc = {
.offset = 0,
@@ -166,21 +167,20 @@ static struct snd_soc_dai_driver acp_rmb_dai[] = {
static int acp6x_master_clock_generate(struct device *dev)
{
- int data = 0;
- struct pci_dev *smn_dev;
+ int data, rc;
- smn_dev = pci_get_device(PCI_VENDOR_ID_AMD, HOST_BRIDGE_ID, NULL);
- if (!smn_dev) {
- dev_err(dev, "Failed to get host bridge device\n");
- return -ENODEV;
- }
+ rc = amd_smn_write(0, MP1_C2PMSG_93, 0);
+ if (rc)
+ return rc;
+ rc = amd_smn_write(0, MP1_C2PMSG_85, 0xC4);
+ if (rc)
+ return rc;
+ rc = amd_smn_write(0, MP1_C2PMSG_69, 0x4);
+ if (rc)
+ return rc;
- smn_write(smn_dev, MP1_C2PMSG_93, 0);
- smn_write(smn_dev, MP1_C2PMSG_85, 0xC4);
- smn_write(smn_dev, MP1_C2PMSG_69, 0x4);
- read_poll_timeout(smn_read, data, data, DELAY_US,
- ACP_TIMEOUT, false, smn_dev, MP1_C2PMSG_93);
- return 0;
+ return read_poll_timeout(smn_read_register, data, data > 0, DELAY_US,
+ ACP_TIMEOUT, false, MP1_C2PMSG_93);
}
static int rembrandt_audio_probe(struct platform_device *pdev)
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/7] ASoC: amd: acp: acp70: Use AMD_NODE
2025-02-17 23:17 [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mario Limonciello
2025-02-17 23:17 ` [PATCH 1/7] x86/amd_node: Add a helper for use with `read_poll_timeout` Mario Limonciello
2025-02-17 23:17 ` [PATCH 2/7] ASoC: amd: acp: rembrandt: Use AMD_NODE Mario Limonciello
@ 2025-02-17 23:17 ` Mario Limonciello
2025-02-17 23:17 ` [PATCH 4/7] ASoC: amd: acp: acp63: " Mario Limonciello
` (5 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Mario Limonciello @ 2025-02-17 23:17 UTC (permalink / raw)
To: Yazen Ghannam, Borislav Petkov, Mark Brown
Cc: Mario Limonciello, Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
From: Mario Limonciello <mario.limonciello@amd.com>
All consumers of SMN in the kernel should be doing it through the
functions provided by AMD_NODE.
Stop using the local SMN read/write symbols and switch to the AMD_NODE
provided ones.
Tested by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
sound/soc/amd/acp/Kconfig | 1 +
sound/soc/amd/acp/acp70.c | 28 ++++------------------------
sound/soc/sof/amd/pci-acp70.c | 1 -
3 files changed, 5 insertions(+), 25 deletions(-)
diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig
index 2bb78a748c79d..a649f49864059 100644
--- a/sound/soc/amd/acp/Kconfig
+++ b/sound/soc/amd/acp/Kconfig
@@ -82,6 +82,7 @@ config SND_AMD_ASOC_ACP70
tristate "AMD ACP ASOC Acp7.0 Support"
depends on X86 && PCI
depends on ACPI
+ depends on AMD_NODE
select SND_SOC_AMD_ACP_PCM
select SND_SOC_AMD_ACP_I2S
select SND_SOC_AMD_ACP_PDM
diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c
index 9e23729fd1a71..ef3f6504bc7f5 100644
--- a/sound/soc/amd/acp/acp70.c
+++ b/sound/soc/amd/acp/acp70.c
@@ -23,6 +23,8 @@
#include "amd.h"
#include "acp-mach.h"
+#include <asm/amd_node.h>
+
#define DRV_NAME "acp_asoc_acp70"
#define CLK7_CLK0_DFS_CNTL_N1 0X0006C1A4
@@ -137,29 +139,6 @@ static struct snd_soc_dai_driver acp70_dai[] = {
},
};
-static int acp70_i2s_master_clock_generate(struct acp_dev_data *adata)
-{
- struct pci_dev *smn_dev;
- u32 device_id;
-
- if (adata->acp_rev == ACP70_PCI_ID)
- device_id = 0x1507;
- else if (adata->acp_rev == ACP71_PCI_ID)
- device_id = 0x1122;
- else
- return -ENODEV;
-
- smn_dev = pci_get_device(PCI_VENDOR_ID_AMD, device_id, NULL);
-
- if (!smn_dev)
- return -ENODEV;
-
- /* Set clk7 DFS clock divider register value to get mclk as 196.608MHz*/
- smn_write(smn_dev, CLK7_CLK0_DFS_CNTL_N1, CLK0_DIVIDER);
-
- return 0;
-}
-
static int acp_acp70_audio_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -215,7 +194,8 @@ static int acp_acp70_audio_probe(struct platform_device *pdev)
dev_set_drvdata(dev, adata);
- ret = acp70_i2s_master_clock_generate(adata);
+ /* Set clk7 DFS clock divider register value to get mclk as 196.608MHz*/
+ ret = amd_smn_write(0, CLK7_CLK0_DFS_CNTL_N1, CLK0_DIVIDER);
if (ret) {
dev_err(&pdev->dev, "Failed to set I2S master clock as 196.608MHz\n");
return ret;
diff --git a/sound/soc/sof/amd/pci-acp70.c b/sound/soc/sof/amd/pci-acp70.c
index 3647ec992e95f..d886bdf3a1128 100644
--- a/sound/soc/sof/amd/pci-acp70.c
+++ b/sound/soc/sof/amd/pci-acp70.c
@@ -28,7 +28,6 @@
#define ACP70_REG_END 0x125C000
static const struct sof_amd_acp_desc acp70_chip_info = {
- .host_bridge_id = HOST_BRIDGE_ACP70,
.pgfsm_base = ACP70_PGFSM_BASE,
.ext_intr_enb = ACP70_EXTERNAL_INTR_ENB,
.ext_intr_cntl = ACP70_EXTERNAL_INTR_CNTL,
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/7] ASoC: amd: acp: acp63: Use AMD_NODE
2025-02-17 23:17 [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mario Limonciello
` (2 preceding siblings ...)
2025-02-17 23:17 ` [PATCH 3/7] ASoC: amd: acp: acp70: " Mario Limonciello
@ 2025-02-17 23:17 ` Mario Limonciello
2025-02-17 23:17 ` [PATCH 5/7] ASoC: SOF: amd: " Mario Limonciello
` (4 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Mario Limonciello @ 2025-02-17 23:17 UTC (permalink / raw)
To: Yazen Ghannam, Borislav Petkov, Mark Brown
Cc: Mario Limonciello, Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
From: Mario Limonciello <mario.limonciello@amd.com>
All consumers of SMN in the kernel should be doing it through the
functions provided by AMD_NODE.
Stop using the local SMN read/write symbols and switch to the AMD_NODE
provided ones.
Tested by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
sound/soc/amd/acp/Kconfig | 1 +
sound/soc/amd/acp/acp63.c | 63 +++++++++++++++++++++++------------
sound/soc/sof/amd/pci-acp63.c | 1 -
3 files changed, 42 insertions(+), 23 deletions(-)
diff --git a/sound/soc/amd/acp/Kconfig b/sound/soc/amd/acp/Kconfig
index a649f49864059..157c124570c88 100644
--- a/sound/soc/amd/acp/Kconfig
+++ b/sound/soc/amd/acp/Kconfig
@@ -69,6 +69,7 @@ config SND_AMD_ASOC_ACP63
tristate "AMD ACP ASOC ACP6.3 Support"
depends on X86 && PCI
depends on ACPI
+ depends on AMD_NODE
select SND_SOC_AMD_ACP_PCM
select SND_SOC_AMD_ACP_I2S
select SND_SOC_AMD_ACP_PDM
diff --git a/sound/soc/amd/acp/acp63.c b/sound/soc/amd/acp/acp63.c
index 81496e713440b..4187a8968de75 100644
--- a/sound/soc/amd/acp/acp63.c
+++ b/sound/soc/amd/acp/acp63.c
@@ -20,6 +20,9 @@
#include <linux/dma-mapping.h>
#include <linux/pm_runtime.h>
#include <linux/pci.h>
+
+#include <asm/amd_node.h>
+
#include "amd.h"
#include "acp-mach.h"
#include "../mach-config.h"
@@ -160,37 +163,53 @@ static struct snd_soc_dai_driver acp63_dai[] = {
static int acp63_i2s_master_clock_generate(struct acp_dev_data *adata)
{
+ int rc;
u32 data;
union clk_pll_req_no clk_pll;
- struct pci_dev *smn_dev;
-
- smn_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x14E8, NULL);
- if (!smn_dev)
- return -ENODEV;
/* Clk5 pll register values to get mclk as 196.6MHz*/
clk_pll.bits.fb_mult_int = 0x31;
clk_pll.bits.pll_spine_div = 0;
clk_pll.bits.gb_mult_frac = 0x26E9;
- data = smn_read(smn_dev, CLK_PLL_PWR_REQ_N0);
- smn_write(smn_dev, CLK_PLL_PWR_REQ_N0, data | PLL_AUTO_STOP_REQ);
-
- data = smn_read(smn_dev, CLK_SPLL_FIELD_2_N0);
- if (data & PLL_FRANCE_EN)
- smn_write(smn_dev, CLK_SPLL_FIELD_2_N0, data | PLL_FRANCE_EN);
-
- smn_write(smn_dev, CLK_PLL_REQ_N0, clk_pll.clk_pll_req_no_reg);
-
- data = smn_read(smn_dev, CLK_PLL_PWR_REQ_N0);
- smn_write(smn_dev, CLK_PLL_PWR_REQ_N0, data | PLL_AUTO_START_REQ);
-
- data = smn_read(smn_dev, CLK_DFSBYPASS_CONTR);
- smn_write(smn_dev, CLK_DFSBYPASS_CONTR, data | EXIT_DPF_BYPASS_0);
- smn_write(smn_dev, CLK_DFSBYPASS_CONTR, data | EXIT_DPF_BYPASS_1);
+ rc = amd_smn_read(0, CLK_PLL_PWR_REQ_N0, &data);
+ if (rc)
+ return rc;
+ rc = amd_smn_write(0, CLK_PLL_PWR_REQ_N0, data | PLL_AUTO_STOP_REQ);
+ if (rc)
+ return rc;
+
+ rc = amd_smn_read(0, CLK_SPLL_FIELD_2_N0, &data);
+ if (rc)
+ return rc;
+ if (data & PLL_FRANCE_EN) {
+ rc = amd_smn_write(0, CLK_SPLL_FIELD_2_N0, data | PLL_FRANCE_EN);
+ if (rc)
+ return rc;
+ }
- smn_write(smn_dev, CLK_DFS_CNTL_N0, CLK0_DIVIDER);
- return 0;
+ rc = amd_smn_write(0, CLK_PLL_REQ_N0, clk_pll.clk_pll_req_no_reg);
+ if (rc)
+ return rc;
+
+ rc = amd_smn_read(0, CLK_PLL_PWR_REQ_N0, &data);
+ if (rc)
+ return rc;
+ rc = amd_smn_write(0, CLK_PLL_PWR_REQ_N0, data | PLL_AUTO_START_REQ);
+ if (rc)
+ return rc;
+
+ rc = amd_smn_read(0, CLK_DFSBYPASS_CONTR, &data);
+ if (rc)
+ return rc;
+ rc = amd_smn_write(0, CLK_DFSBYPASS_CONTR, data | EXIT_DPF_BYPASS_0);
+ if (rc)
+ return rc;
+ rc = amd_smn_write(0, CLK_DFSBYPASS_CONTR, data | EXIT_DPF_BYPASS_1);
+ if (rc)
+ return rc;
+
+ return amd_smn_write(0, CLK_DFS_CNTL_N0, CLK0_DIVIDER);
}
static int acp63_audio_probe(struct platform_device *pdev)
diff --git a/sound/soc/sof/amd/pci-acp63.c b/sound/soc/sof/amd/pci-acp63.c
index ffe7c755d655e..13aa87cdeeac3 100644
--- a/sound/soc/sof/amd/pci-acp63.c
+++ b/sound/soc/sof/amd/pci-acp63.c
@@ -28,7 +28,6 @@
#define ACP6x_REG_END 0x125C000
static const struct sof_amd_acp_desc acp63_chip_info = {
- .host_bridge_id = HOST_BRIDGE_ACP63,
.pgfsm_base = ACP6X_PGFSM_BASE,
.ext_intr_enb = ACP6X_EXTERNAL_INTR_ENB,
.ext_intr_cntl = ACP6X_EXTERNAL_INTR_CNTL,
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/7] ASoC: SOF: amd: Use AMD_NODE
2025-02-17 23:17 [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mario Limonciello
` (3 preceding siblings ...)
2025-02-17 23:17 ` [PATCH 4/7] ASoC: amd: acp: acp63: " Mario Limonciello
@ 2025-02-17 23:17 ` Mario Limonciello
2025-02-17 23:17 ` [PATCH 6/7] ASoC: amd: acp: Drop local symbols for smn read/write Mario Limonciello
` (3 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Mario Limonciello @ 2025-02-17 23:17 UTC (permalink / raw)
To: Yazen Ghannam, Borislav Petkov, Mark Brown
Cc: Mario Limonciello, Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
From: Mario Limonciello <mario.limonciello@amd.com>
All consumers of SMN in the kernel should be doing it through the
functions provided by AMD_NODE.
Stop using the local SMN read/write symbols and switch to the AMD_NODE
provided ones.
Tested by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
sound/soc/sof/amd/Kconfig | 1 +
sound/soc/sof/amd/acp.c | 56 ++++++++++-----------------------
sound/soc/sof/amd/acp.h | 1 -
sound/soc/sof/amd/pci-rmb.c | 1 -
sound/soc/sof/amd/pci-rn.c | 1 -
sound/soc/sof/amd/pci-vangogh.c | 1 -
6 files changed, 17 insertions(+), 44 deletions(-)
diff --git a/sound/soc/sof/amd/Kconfig b/sound/soc/sof/amd/Kconfig
index f4cafe8010178..28216c8c1cf97 100644
--- a/sound/soc/sof/amd/Kconfig
+++ b/sound/soc/sof/amd/Kconfig
@@ -25,6 +25,7 @@ config SND_SOC_SOF_AMD_COMMON
select SND_SOC_SOF_ACP_PROBES
select SND_SOC_ACPI_AMD_MATCH
select SND_SOC_ACPI if ACPI
+ depends on AMD_NODE
help
This option is not user-selectable but automatically handled by
'select' statements at a higher level
diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c
index 9e13c96528be3..7c6d647fa253b 100644
--- a/sound/soc/sof/amd/acp.c
+++ b/sound/soc/sof/amd/acp.c
@@ -16,6 +16,8 @@
#include <linux/module.h>
#include <linux/pci.h>
+#include <asm/amd_node.h>
+
#include "../ops.h"
#include "acp.h"
#include "acp-dsp-offset.h"
@@ -43,24 +45,6 @@ const struct dmi_system_id acp_sof_quirk_table[] = {
};
EXPORT_SYMBOL_GPL(acp_sof_quirk_table);
-static int smn_write(struct pci_dev *dev, u32 smn_addr, u32 data)
-{
- pci_write_config_dword(dev, 0x60, smn_addr);
- pci_write_config_dword(dev, 0x64, data);
-
- return 0;
-}
-
-static int smn_read(struct pci_dev *dev, u32 smn_addr)
-{
- u32 data = 0;
-
- pci_write_config_dword(dev, 0x60, smn_addr);
- pci_read_config_dword(dev, 0x64, &data);
-
- return data;
-}
-
static void init_dma_descriptor(struct acp_dev_data *adata)
{
struct snd_sof_dev *sdev = adata->dev;
@@ -209,11 +193,11 @@ int configure_and_run_dma(struct acp_dev_data *adata, unsigned int src_addr,
static int psp_mbox_ready(struct acp_dev_data *adata, bool ack)
{
struct snd_sof_dev *sdev = adata->dev;
- int ret;
- u32 data;
+ int ret, data;
+
+ ret = read_poll_timeout(smn_read_register, data, data > 0 && data & MBOX_READY_MASK,
+ MBOX_DELAY_US, ACP_PSP_TIMEOUT_US, false, MP0_C2PMSG_114_REG);
- ret = read_poll_timeout(smn_read, data, data & MBOX_READY_MASK, MBOX_DELAY_US,
- ACP_PSP_TIMEOUT_US, false, adata->smn_dev, MP0_C2PMSG_114_REG);
if (!ret)
return 0;
@@ -241,8 +225,8 @@ static int psp_send_cmd(struct acp_dev_data *adata, int cmd)
return -EINVAL;
/* Get a non-zero Doorbell value from PSP */
- ret = read_poll_timeout(smn_read, data, data, MBOX_DELAY_US, ACP_PSP_TIMEOUT_US, false,
- adata->smn_dev, MP0_C2PMSG_73_REG);
+ ret = read_poll_timeout(smn_read_register, data, data > 0, MBOX_DELAY_US,
+ ACP_PSP_TIMEOUT_US, false, MP0_C2PMSG_73_REG);
if (ret) {
dev_err(sdev->dev, "Failed to get Doorbell from MBOX %x\n", MP0_C2PMSG_73_REG);
@@ -254,10 +238,14 @@ static int psp_send_cmd(struct acp_dev_data *adata, int cmd)
if (ret)
return ret;
- smn_write(adata->smn_dev, MP0_C2PMSG_114_REG, cmd);
+ ret = amd_smn_write(0, MP0_C2PMSG_114_REG, cmd);
+ if (ret)
+ return ret;
/* Ring the Doorbell for PSP */
- smn_write(adata->smn_dev, MP0_C2PMSG_73_REG, data);
+ ret = amd_smn_write(0, MP0_C2PMSG_73_REG, data);
+ if (ret)
+ return ret;
/* Check MBOX ready as PSP ack */
ret = psp_mbox_ready(adata, 1);
@@ -771,16 +759,10 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev)
adata->pci_rev = pci->revision;
mutex_init(&adata->acp_lock);
sdev->pdata->hw_pdata = adata;
- adata->smn_dev = pci_get_device(PCI_VENDOR_ID_AMD, chip->host_bridge_id, NULL);
- if (!adata->smn_dev) {
- dev_err(sdev->dev, "Failed to get host bridge device\n");
- ret = -ENODEV;
- goto unregister_dev;
- }
ret = acp_init(sdev);
if (ret < 0)
- goto free_smn_dev;
+ goto unregister_dev;
sdev->ipc_irq = pci->irq;
ret = request_threaded_irq(sdev->ipc_irq, acp_irq_handler, acp_irq_thread,
@@ -788,7 +770,7 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev)
if (ret < 0) {
dev_err(sdev->dev, "failed to register IRQ %d\n",
sdev->ipc_irq);
- goto free_smn_dev;
+ goto unregister_dev;
}
/* scan SoundWire capabilities exposed by DSDT */
@@ -801,7 +783,6 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev)
if (ret < 0) {
dev_err(sdev->dev, "error: SoundWire probe error\n");
free_irq(sdev->ipc_irq, sdev);
- pci_dev_put(adata->smn_dev);
return ret;
}
@@ -847,8 +828,6 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev)
free_ipc_irq:
free_irq(sdev->ipc_irq, sdev);
-free_smn_dev:
- pci_dev_put(adata->smn_dev);
unregister_dev:
platform_device_unregister(adata->dmic_dev);
return ret;
@@ -859,9 +838,6 @@ void amd_sof_acp_remove(struct snd_sof_dev *sdev)
{
struct acp_dev_data *adata = sdev->pdata->hw_pdata;
- if (adata->smn_dev)
- pci_dev_put(adata->smn_dev);
-
if (adata->sdw)
amd_sof_sdw_exit(sdev);
diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h
index 2a19d82d62002..4bfb05d93b25a 100644
--- a/sound/soc/sof/amd/acp.h
+++ b/sound/soc/sof/amd/acp.h
@@ -256,7 +256,6 @@ struct acp_dev_data {
struct dma_descriptor dscr_info[ACP_MAX_DESC];
struct acp_dsp_stream stream_buf[ACP_MAX_STREAM];
struct acp_dsp_stream *dtrace_stream;
- struct pci_dev *smn_dev;
struct acp_dsp_stream *probe_stream;
bool enable_fw_debug;
bool is_dram_in_use;
diff --git a/sound/soc/sof/amd/pci-rmb.c b/sound/soc/sof/amd/pci-rmb.c
index cbb4d52826644..0233b6ba2d2e2 100644
--- a/sound/soc/sof/amd/pci-rmb.c
+++ b/sound/soc/sof/amd/pci-rmb.c
@@ -28,7 +28,6 @@
#define ACP6X_FUTURE_REG_ACLK_0 0x1854
static const struct sof_amd_acp_desc rembrandt_chip_info = {
- .host_bridge_id = HOST_BRIDGE_RMB,
.pgfsm_base = ACP6X_PGFSM_BASE,
.ext_intr_stat = ACP6X_EXT_INTR_STAT,
.dsp_intr_base = ACP6X_DSP_SW_INTR_BASE,
diff --git a/sound/soc/sof/amd/pci-rn.c b/sound/soc/sof/amd/pci-rn.c
index b7d558cb1fd7a..4a36029a00dec 100644
--- a/sound/soc/sof/amd/pci-rn.c
+++ b/sound/soc/sof/amd/pci-rn.c
@@ -28,7 +28,6 @@
#define ACP3X_FUTURE_REG_ACLK_0 0x1860
static const struct sof_amd_acp_desc renoir_chip_info = {
- .host_bridge_id = HOST_BRIDGE_CZN,
.pgfsm_base = ACP3X_PGFSM_BASE,
.ext_intr_stat = ACP3X_EXT_INTR_STAT,
.dsp_intr_base = ACP3X_DSP_SW_INTR_BASE,
diff --git a/sound/soc/sof/amd/pci-vangogh.c b/sound/soc/sof/amd/pci-vangogh.c
index 28f2d4050a676..caf9e2b2e4638 100644
--- a/sound/soc/sof/amd/pci-vangogh.c
+++ b/sound/soc/sof/amd/pci-vangogh.c
@@ -25,7 +25,6 @@
static const struct sof_amd_acp_desc vangogh_chip_info = {
.name = "vangogh",
- .host_bridge_id = HOST_BRIDGE_VGH,
.pgfsm_base = ACP5X_PGFSM_BASE,
.ext_intr_stat = ACP5X_EXT_INTR_STAT,
.dsp_intr_base = ACP5X_DSP_SW_INTR_BASE,
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 6/7] ASoC: amd: acp: Drop local symbols for smn read/write
2025-02-17 23:17 [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mario Limonciello
` (4 preceding siblings ...)
2025-02-17 23:17 ` [PATCH 5/7] ASoC: SOF: amd: " Mario Limonciello
@ 2025-02-17 23:17 ` Mario Limonciello
2025-02-17 23:17 ` [PATCH 7/7] ASoC: SOF: amd: Drop host bridge ID from struct Mario Limonciello
` (2 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Mario Limonciello @ 2025-02-17 23:17 UTC (permalink / raw)
To: Yazen Ghannam, Borislav Petkov, Mark Brown
Cc: Mario Limonciello, Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
From: Mario Limonciello <mario.limonciello@amd.com>
As the ACP drivers use the AMD_NODE provided symbols, the local
ones are no longer necessary.
Tested by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
sound/soc/amd/acp/acp-legacy-common.c | 18 ------------------
sound/soc/amd/acp/amd.h | 3 ---
2 files changed, 21 deletions(-)
diff --git a/sound/soc/amd/acp/acp-legacy-common.c b/sound/soc/amd/acp/acp-legacy-common.c
index 7acc7ed2e8cc9..89f5cda18a23e 100644
--- a/sound/soc/amd/acp/acp-legacy-common.c
+++ b/sound/soc/amd/acp/acp-legacy-common.c
@@ -345,24 +345,6 @@ int acp_deinit(struct acp_chip_info *chip)
}
EXPORT_SYMBOL_NS_GPL(acp_deinit, "SND_SOC_ACP_COMMON");
-int smn_write(struct pci_dev *dev, u32 smn_addr, u32 data)
-{
- pci_write_config_dword(dev, 0x60, smn_addr);
- pci_write_config_dword(dev, 0x64, data);
- return 0;
-}
-EXPORT_SYMBOL_NS_GPL(smn_write, "SND_SOC_ACP_COMMON");
-
-int smn_read(struct pci_dev *dev, u32 smn_addr)
-{
- u32 data;
-
- pci_write_config_dword(dev, 0x60, smn_addr);
- pci_read_config_dword(dev, 0x64, &data);
- return data;
-}
-EXPORT_SYMBOL_NS_GPL(smn_read, "SND_SOC_ACP_COMMON");
-
static void check_acp3x_config(struct acp_chip_info *chip)
{
u32 val;
diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h
index ee69dfb10cb86..c921bcabbcec6 100644
--- a/sound/soc/amd/acp/amd.h
+++ b/sound/soc/amd/acp/amd.h
@@ -235,9 +235,6 @@ int acp_platform_unregister(struct device *dev);
int acp_machine_select(struct acp_dev_data *adata);
-int smn_read(struct pci_dev *dev, u32 smn_addr);
-int smn_write(struct pci_dev *dev, u32 smn_addr, u32 data);
-
int acp_init(struct acp_chip_info *chip);
int acp_deinit(struct acp_chip_info *chip);
void acp_enable_interrupts(struct acp_dev_data *adata);
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 7/7] ASoC: SOF: amd: Drop host bridge ID from struct
2025-02-17 23:17 [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mario Limonciello
` (5 preceding siblings ...)
2025-02-17 23:17 ` [PATCH 6/7] ASoC: amd: acp: Drop local symbols for smn read/write Mario Limonciello
@ 2025-02-17 23:17 ` Mario Limonciello
2025-02-18 15:11 ` [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mark Brown
2025-02-19 23:08 ` (subset) " Mark Brown
8 siblings, 0 replies; 15+ messages in thread
From: Mario Limonciello @ 2025-02-17 23:17 UTC (permalink / raw)
To: Yazen Ghannam, Borislav Petkov, Mark Brown
Cc: Mario Limonciello, Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
From: Mario Limonciello <mario.limonciello@amd.com>
host_bridge_id is no longer used by any of the SoCs as they
all use AMD_NODE to communicate with SMN routers.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
sound/soc/sof/amd/acp.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h
index 4bfb05d93b25a..d084db34eed8d 100644
--- a/sound/soc/sof/amd/acp.h
+++ b/sound/soc/sof/amd/acp.h
@@ -197,7 +197,6 @@ struct acp_dsp_stream {
struct sof_amd_acp_desc {
const char *name;
- unsigned int host_bridge_id;
u32 pgfsm_base;
u32 ext_intr_enb;
u32 ext_intr_cntl;
--
2.43.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE
2025-02-17 23:17 [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mario Limonciello
` (6 preceding siblings ...)
2025-02-17 23:17 ` [PATCH 7/7] ASoC: SOF: amd: Drop host bridge ID from struct Mario Limonciello
@ 2025-02-18 15:11 ` Mark Brown
2025-02-18 15:16 ` Mario Limonciello
2025-02-19 23:08 ` (subset) " Mark Brown
8 siblings, 1 reply; 15+ messages in thread
From: Mark Brown @ 2025-02-18 15:11 UTC (permalink / raw)
To: Mario Limonciello
Cc: Yazen Ghannam, Borislav Petkov, Mario Limonciello,
Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
On Mon, Feb 17, 2025 at 05:17:40PM -0600, Mario Limonciello wrote:
> The various AMD audio drivers have self contained implementations
> for SMN router communication that require hardcoding the bridge ID.
> These implementations also don't prevent race conditions with other
> drivers performing SMN communication.
> A new centralized driver AMD_NODE is introduced and all drivers in
> the kernel should use this instead. Adjust all AMD audio drivers to
> use it.
> Mario Limonciello (7):
> x86/amd_node: Add a helper for use with `read_poll_timeout`
What's the thinking for merging this - the SMN driver is in arch/x86 but
the bulk of the changes are in ASoC? My first thought is that it's
mostly ASoC stuff, are the x86 people OK with me picking up the arch
patch (I'd put it on a branch anyway so if needed we can do a merge
later)?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE
2025-02-18 15:11 ` [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mark Brown
@ 2025-02-18 15:16 ` Mario Limonciello
2025-02-18 15:26 ` Borislav Petkov
0 siblings, 1 reply; 15+ messages in thread
From: Mario Limonciello @ 2025-02-18 15:16 UTC (permalink / raw)
To: Mark Brown, Borislav Petkov
Cc: Yazen Ghannam, Mario Limonciello, Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
On 2/18/2025 09:11, Mark Brown wrote:
> On Mon, Feb 17, 2025 at 05:17:40PM -0600, Mario Limonciello wrote:
>
>> The various AMD audio drivers have self contained implementations
>> for SMN router communication that require hardcoding the bridge ID.
>
>> These implementations also don't prevent race conditions with other
>> drivers performing SMN communication.
>
>> A new centralized driver AMD_NODE is introduced and all drivers in
>> the kernel should use this instead. Adjust all AMD audio drivers to
>> use it.
>> Mario Limonciello (7):
>> x86/amd_node: Add a helper for use with `read_poll_timeout`
>
> What's the thinking for merging this - the SMN driver is in arch/x86 but
> the bulk of the changes are in ASoC? My first thought is that it's
> mostly ASoC stuff, are the x86 people OK with me picking up the arch
> patch (I'd put it on a branch anyway so if needed we can do a merge
> later)?
Probably need Boris' perspective here.
There are some patches that just landed to tip/tip.git today which I
believe the first patch needs to rebase on top of.
My thought is maybe:
1) We can get an immutable branch from tip/tip.git with the conflicting
changes.
2) An Ack from x86 maintainers on the first patch.
3) ASoC merges immutable branch and takes the series through ASoC tree.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE
2025-02-18 15:16 ` Mario Limonciello
@ 2025-02-18 15:26 ` Borislav Petkov
2025-02-18 15:33 ` Mario Limonciello
0 siblings, 1 reply; 15+ messages in thread
From: Borislav Petkov @ 2025-02-18 15:26 UTC (permalink / raw)
To: Mario Limonciello
Cc: Mark Brown, Yazen Ghannam, Mario Limonciello, Thomas Gleixner,
Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
H . Peter Anvin, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Daniel Baluta,
Kai Vehmanen, Pierre-Louis Bossart, Vijendar Mukunda,
Peter Zijlstra, Jeff Johnson, Venkata Prasad Potturu,
Uwe Kleine-König, Arnd Bergmann, Cristian Ciocaltea,
Krzysztof Kozlowski, open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
On Tue, Feb 18, 2025 at 09:16:20AM -0600, Mario Limonciello wrote:
> My thought is maybe:
> 1) We can get an immutable branch from tip/tip.git with the conflicting
> changes.
I can very easisy do that. Just holler.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE
2025-02-18 15:26 ` Borislav Petkov
@ 2025-02-18 15:33 ` Mario Limonciello
2025-02-18 17:26 ` Borislav Petkov
0 siblings, 1 reply; 15+ messages in thread
From: Mario Limonciello @ 2025-02-18 15:33 UTC (permalink / raw)
To: Borislav Petkov
Cc: Mark Brown, Yazen Ghannam, Mario Limonciello, Thomas Gleixner,
Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
H . Peter Anvin, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Daniel Baluta,
Kai Vehmanen, Pierre-Louis Bossart, Vijendar Mukunda,
Peter Zijlstra, Jeff Johnson, Venkata Prasad Potturu,
Uwe Kleine-König, Arnd Bergmann, Cristian Ciocaltea,
Krzysztof Kozlowski, open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
On 2/18/2025 09:26, Borislav Petkov wrote:
> On Tue, Feb 18, 2025 at 09:16:20AM -0600, Mario Limonciello wrote:
>> My thought is maybe:
>> 1) We can get an immutable branch from tip/tip.git with the conflicting
>> changes.
>
> I can very easisy do that. Just holler.
>
Yeah; please get that ready and I'll rebase the series and send out a v2
on that branch.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE
2025-02-18 15:33 ` Mario Limonciello
@ 2025-02-18 17:26 ` Borislav Petkov
2025-02-18 17:29 ` Mario Limonciello
0 siblings, 1 reply; 15+ messages in thread
From: Borislav Petkov @ 2025-02-18 17:26 UTC (permalink / raw)
To: Mario Limonciello
Cc: Mark Brown, Yazen Ghannam, Mario Limonciello, Thomas Gleixner,
Dave Hansen, maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
H . Peter Anvin, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Daniel Baluta,
Kai Vehmanen, Pierre-Louis Bossart, Vijendar Mukunda,
Peter Zijlstra, Jeff Johnson, Venkata Prasad Potturu,
Uwe Kleine-König, Arnd Bergmann, Cristian Ciocaltea,
Krzysztof Kozlowski, open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
On Tue, Feb 18, 2025 at 09:33:03AM -0600, Mario Limonciello wrote:
> Yeah; please get that ready and I'll rebase the series and send out a v2 on
> that branch.
There it is:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=x86/misc
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE
2025-02-18 17:26 ` Borislav Petkov
@ 2025-02-18 17:29 ` Mario Limonciello
0 siblings, 0 replies; 15+ messages in thread
From: Mario Limonciello @ 2025-02-18 17:29 UTC (permalink / raw)
To: Borislav Petkov, Mark Brown
Cc: Yazen Ghannam, Mario Limonciello, Thomas Gleixner, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H . Peter Anvin,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi,
Bard Liao, Ranjani Sridharan, Daniel Baluta, Kai Vehmanen,
Pierre-Louis Bossart, Vijendar Mukunda, Peter Zijlstra,
Jeff Johnson, Venkata Prasad Potturu, Uwe Kleine-König,
Arnd Bergmann, Cristian Ciocaltea, Krzysztof Kozlowski,
open list:AMD NODE DRIVER,
open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
On 2/18/2025 11:26, Borislav Petkov wrote:
> On Tue, Feb 18, 2025 at 09:33:03AM -0600, Mario Limonciello wrote:
>> Yeah; please get that ready and I'll rebase the series and send out a v2 on
>> that branch.
>
> There it is:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=x86/misc
>
Thanks.
Mark,
I confirmed that a test merge of tip/x86/misc into ASoC/for-next and
then applying the remaining 6 patches worked properly, so you can pick
up and do that.
Thanks,
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: (subset) [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE
2025-02-17 23:17 [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mario Limonciello
` (7 preceding siblings ...)
2025-02-18 15:11 ` [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mark Brown
@ 2025-02-19 23:08 ` Mark Brown
8 siblings, 0 replies; 15+ messages in thread
From: Mark Brown @ 2025-02-19 23:08 UTC (permalink / raw)
To: Yazen Ghannam, Borislav Petkov, Mario Limonciello
Cc: Mario Limonciello, Thomas Gleixner, Dave Hansen, x86,
H . Peter Anvin, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Daniel Baluta,
Kai Vehmanen, Pierre-Louis Bossart, Vijendar Mukunda,
Peter Zijlstra, Jeff Johnson, Venkata Prasad Potturu,
Uwe Kleine-König, Arnd Bergmann, Cristian Ciocaltea,
Krzysztof Kozlowski, linux-kernel, linux-sound,
sound-open-firmware
On Mon, 17 Feb 2025 17:17:40 -0600, Mario Limonciello wrote:
> The various AMD audio drivers have self contained implementations
> for SMN router communication that require hardcoding the bridge ID.
>
> These implementations also don't prevent race conditions with other
> drivers performing SMN communication.
>
> A new centralized driver AMD_NODE is introduced and all drivers in
> the kernel should use this instead. Adjust all AMD audio drivers to
> use it.
> Mario Limonciello (7):
> x86/amd_node: Add a helper for use with `read_poll_timeout`
> ASoC: amd: acp: rembrandt: Use AMD_NODE
> ASoC: amd: acp: acp70: Use AMD_NODE
> ASoC: amd: acp: acp63: Use AMD_NODE
> ASoC: SOF: amd: Use AMD_NODE
> ASoC: amd: acp: Drop local symbols for smn read/write
> ASoC: SOF: amd: Drop host bridge ID from struct
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[2/7] ASoC: amd: acp: rembrandt: Use AMD_NODE
commit: e211adcf36d0ccdd31af7398af4725a47d74b3d4
[3/7] ASoC: amd: acp: acp70: Use AMD_NODE
commit: 135c6af1cac5465529469700d16c0c44b24ce317
[4/7] ASoC: amd: acp: acp63: Use AMD_NODE
commit: 8f969537149d672d40a0e75a83f39451a5402780
[5/7] ASoC: SOF: amd: Use AMD_NODE
commit: f120cf33d2325fd95d063eccbff2e86ffc7f493a
[6/7] ASoC: amd: acp: Drop local symbols for smn read/write
commit: 40d05927830227f2a1701c61e8bbe65287a03490
[7/7] ASoC: SOF: amd: Drop host bridge ID from struct
commit: a261d77fec147b9974aacca8ae8f0693feede838
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2025-02-19 23:08 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17 23:17 [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mario Limonciello
2025-02-17 23:17 ` [PATCH 1/7] x86/amd_node: Add a helper for use with `read_poll_timeout` Mario Limonciello
2025-02-17 23:17 ` [PATCH 2/7] ASoC: amd: acp: rembrandt: Use AMD_NODE Mario Limonciello
2025-02-17 23:17 ` [PATCH 3/7] ASoC: amd: acp: acp70: " Mario Limonciello
2025-02-17 23:17 ` [PATCH 4/7] ASoC: amd: acp: acp63: " Mario Limonciello
2025-02-17 23:17 ` [PATCH 5/7] ASoC: SOF: amd: " Mario Limonciello
2025-02-17 23:17 ` [PATCH 6/7] ASoC: amd: acp: Drop local symbols for smn read/write Mario Limonciello
2025-02-17 23:17 ` [PATCH 7/7] ASoC: SOF: amd: Drop host bridge ID from struct Mario Limonciello
2025-02-18 15:11 ` [PATCH 0/7] Adjust all AMD audio drivers to use AMD_NODE Mark Brown
2025-02-18 15:16 ` Mario Limonciello
2025-02-18 15:26 ` Borislav Petkov
2025-02-18 15:33 ` Mario Limonciello
2025-02-18 17:26 ` Borislav Petkov
2025-02-18 17:29 ` Mario Limonciello
2025-02-19 23:08 ` (subset) " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox