diff options
author | Vijendar Mukunda <Vijendar.Mukunda@amd.com> | 2021-07-21 20:04:18 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-07-22 13:45:33 +0200 |
commit | 4a7151c9688cc166ff6bf5a1a00e3cee429a2f11 (patch) | |
tree | 871443c1d0bff026cab46c910d6a373abbf607d3 /sound/soc/amd/vangogh/acp5x.h | |
parent | ASoC: amd: add Vangogh ACP5x IP register header (diff) | |
download | linux-4a7151c9688cc166ff6bf5a1a00e3cee429a2f11.tar.xz linux-4a7151c9688cc166ff6bf5a1a00e3cee429a2f11.zip |
ASoC: amd: add Vangogh ACP PCI driver
ACP is a PCI audio device.
This patch adds PCI driver to bind to this device and get
PCI resources.
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20210721180430.11571-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/vangogh/acp5x.h')
-rw-r--r-- | sound/soc/amd/vangogh/acp5x.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sound/soc/amd/vangogh/acp5x.h b/sound/soc/amd/vangogh/acp5x.h new file mode 100644 index 000000000000..251a7e0347a7 --- /dev/null +++ b/sound/soc/amd/vangogh/acp5x.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * AMD ALSA SoC PCM Driver + * + * Copyright (C) 2021 Advanced Micro Devices, Inc. All rights reserved. + */ + +#include "vg_chip_offset_byte.h" + +#define ACP5x_PHY_BASE_ADDRESS 0x1240000 +#define ACP_DEVICE_ID 0x15E2 + +/* common header file uses exact offset rather than relative + * offset which requires subtraction logic from base_addr + * for accessing ACP5x MMIO space registers + */ +static inline u32 acp_readl(void __iomem *base_addr) +{ + return readl(base_addr - ACP5x_PHY_BASE_ADDRESS); +} + +static inline void acp_writel(u32 val, void __iomem *base_addr) +{ + writel(val, base_addr - ACP5x_PHY_BASE_ADDRESS); +} |