Commit ced20ea3 authored by Vijendar Mukunda's avatar Vijendar Mukunda Committed by Vinod Koul
Browse files

soundwire: amd: pass acp pci revision id as resource data



Pass ACP pci revision id as resource data and store it in amd SoundWire
manager private data structure. This field will be used to differentiate
ACP variants.

Signed-off-by: default avatarVijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20240924081846.1834612-2-Vijendar.Mukunda@amd.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 9852d85e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ static struct sdw_amd_ctx *sdw_amd_probe_controller(struct sdw_amd_res *res)

		sdw_pdata[index].instance = index;
		sdw_pdata[index].acp_sdw_lock = res->acp_lock;
		sdw_pdata[index].acp_rev = res->acp_rev;
		pdevinfo[index].name = "amd_sdw_manager";
		pdevinfo[index].id = index;
		pdevinfo[index].parent = res->parent;
+1 −0
Original line number Diff line number Diff line
@@ -910,6 +910,7 @@ static int amd_sdw_manager_probe(struct platform_device *pdev)
	amd_manager->mmio = amd_manager->acp_mmio +
			    (amd_manager->instance * SDW_MANAGER_REG_OFFSET);
	amd_manager->acp_sdw_lock = pdata->acp_sdw_lock;
	amd_manager->acp_rev = pdata->acp_rev;
	amd_manager->cols_index = sdw_find_col_index(AMD_SDW_DEFAULT_COLUMNS);
	amd_manager->rows_index = sdw_find_row_index(AMD_SDW_DEFAULT_ROWS);
	amd_manager->dev = dev;
+5 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@

struct acp_sdw_pdata {
	u16 instance;
	u32 acp_rev;
	/* mutex to protect acp common register access */
	struct mutex *acp_sdw_lock;
};
@@ -66,6 +67,7 @@ struct sdw_amd_dai_runtime {
 * @instance: SoundWire manager instance
 * @quirks: SoundWire manager quirks
 * @wake_en_mask: wake enable mask per SoundWire manager
 * @acp_rev: acp pci device revision id
 * @clk_stopped: flag set to true when clock is stopped
 * @power_mode_mask: flag interprets amd SoundWire manager power mode
 * @dai_runtime_array: dai runtime array
@@ -94,6 +96,7 @@ struct amd_sdw_manager {
	u32 quirks;
	u32 wake_en_mask;
	u32 power_mode_mask;
	u32 acp_rev;
	bool clk_stopped;

	struct sdw_amd_dai_runtime **dai_runtime_array;
@@ -134,6 +137,7 @@ struct sdw_amd_ctx {
 * struct sdw_amd_res - Soundwire AMD global resource structure,
 * typically populated by the DSP driver/Legacy driver
 *
 * @acp_rev: acp pci device revision id
 * @addr: acp pci device resource start address
 * @reg_range: ACP register range
 * @link_mask: bit-wise mask listing links selected by the DSP driver/
@@ -146,6 +150,7 @@ struct sdw_amd_ctx {
 * @acp_lock: mutex protecting acp common registers access
 */
struct sdw_amd_res {
	u32 acp_rev;
	u32 addr;
	u32 reg_range;
	u32 link_mask;