diff options
author | Syed Saba Kareem <Syed.SabaKareem@amd.com> | 2023-06-26 19:25:05 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-07-09 22:47:33 +0100 |
commit | e61b415515d3db57dce3af3e4a0441f08d8d8f15 (patch) | |
tree | e1306b5b98f5f9e996e620b6aa3f5240a4cbf003 /sound/soc/amd/acp/amd.h | |
parent | 3d74f42c56db263e82ad96f8fe23aef38cdc071f (diff) | |
download | lwn-e61b415515d3db57dce3af3e4a0441f08d8d8f15.tar.gz lwn-e61b415515d3db57dce3af3e4a0441f08d8d8f15.zip |
ASoC: amd: acp: refactor the acp init and de-init sequence
Remove the individual acp init and de-init functions from different
variants of acp pci driver(for renoir/rembrandt platforms) and use a
common file to define callbacks and refactor the callbacks to support
existing platforms.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20230626135515.1252063-2-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/acp/amd.h')
-rw-r--r-- | sound/soc/amd/acp/amd.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index 12a176a50fd6..19327c4edcf3 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -92,6 +92,25 @@ #define SLOT_WIDTH_24 0x18 #define SLOT_WIDTH_32 0x20 +#define ACP6X_PGFSM_CONTROL 0x1024 +#define ACP6X_PGFSM_STATUS 0x1028 + +#define ACP_SOFT_RST_DONE_MASK 0x00010001 + +#define ACP_PGFSM_CNTL_POWER_ON_MASK 0x01 +#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0x00 +#define ACP_PGFSM_STATUS_MASK 0x03 +#define ACP_POWERED_ON 0x00 +#define ACP_POWER_ON_IN_PROGRESS 0x01 +#define ACP_POWERED_OFF 0x02 +#define ACP_POWER_OFF_IN_PROGRESS 0x03 + +#define ACP_ERROR_MASK 0x20000000 +#define ACP_EXT_INTR_STAT_CLEAR_MASK 0xffffffff + +#define ACP_TIMEOUT 500 +#define DELAY_US 5 + struct acp_chip_info { char *name; /* Platform name */ unsigned int acp_rev; /* ACP Revision id */ @@ -168,6 +187,8 @@ int acp_platform_unregister(struct device *dev); int acp_machine_select(struct acp_dev_data *adata); +int acp_init(struct acp_chip_info *chip); +int acp_deinit(void __iomem *base); /* Machine configuration */ int snd_amd_acp_find_config(struct pci_dev *pci); |