summaryrefslogtreecommitdiff
path: root/sound/soc/sof/amd/acp.h
diff options
context:
space:
mode:
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>2023-10-20 09:28:15 +0300
committerMark Brown <broonie@kernel.org>2023-10-23 15:29:56 +0300
commit145d7e5ae8f4e553478232fe3095379b60fa5496 (patch)
tree9e508c5fb9026e88a3b561816a59e884456f16e5 /sound/soc/sof/amd/acp.h
parent135e0d49cde383395afcaf285d6304be9230a06f (diff)
downloadlinux-145d7e5ae8f4e553478232fe3095379b60fa5496.tar.xz
ASoC: SOF: amd: add option to use sram for data bin loading
Provide an option to load DSP data bin to ACP SRAM. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20231020062822.3913760-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/amd/acp.h')
-rw-r--r--sound/soc/sof/amd/acp.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h
index 2d1f57e1365a..c536cfde0e44 100644
--- a/sound/soc/sof/amd/acp.h
+++ b/sound/soc/sof/amd/acp.h
@@ -56,7 +56,7 @@
#define ACP_IRAM_BASE_ADDRESS 0x000000
#define ACP_DRAM_BASE_ADDRESS 0x01000000
#define ACP_DRAM_PAGE_COUNT 128
-
+#define ACP_SRAM_BASE_ADDRESS 0x3806000
#define ACP_DSP_TO_HOST_IRQ 0x04
#define ACP_RN_PCI_ID 0x01
@@ -88,6 +88,8 @@
#define PROBE_STATUS_BIT BIT(31)
#define ACP_FIRMWARE_SIGNATURE 0x100
+#define ACP_DEFAULT_SRAM_LENGTH 0x00080000
+#define ACP_SRAM_PAGE_COUNT 128
enum clock_source {
ACP_CLOCK_96M = 0,
@@ -194,13 +196,18 @@ struct acp_dev_data {
struct platform_device *dmic_dev;
unsigned int fw_bin_size;
unsigned int fw_data_bin_size;
+ unsigned int fw_sram_data_bin_size;
const char *fw_code_bin;
const char *fw_data_bin;
+ const char *fw_sram_data_bin;
u32 fw_bin_page_count;
+ u32 fw_data_bin_page_count;
dma_addr_t sha_dma_addr;
u8 *bin_buf;
dma_addr_t dma_addr;
u8 *data_buf;
+ dma_addr_t sram_dma_addr;
+ u8 *sram_data_buf;
bool signed_fw_image;
struct dma_descriptor dscr_info[ACP_MAX_DESC];
struct acp_dsp_stream stream_buf[ACP_MAX_STREAM];
@@ -209,6 +216,7 @@ struct acp_dev_data {
struct acp_dsp_stream *probe_stream;
bool enable_fw_debug;
bool is_dram_in_use;
+ bool is_sram_in_use;
};
void memcpy_to_scratch(struct snd_sof_dev *sdev, u32 offset, unsigned int *src, size_t bytes);