forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 145
ASoC: SOF: amd: add SOF support for ACP7.B/7.F platforms #5813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vijendarmukunda
wants to merge
15
commits into
thesofproject:topic/sof-dev
Choose a base branch
from
vijendarmukunda:topic/sof-dev
base: topic/sof-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
6483dbd
ASoC: amd: acp: add ACPI machine table for ACP7.B/7.F SOF driver
vijendarmukunda ba79a92
ASoC: SOF: amd: add base platform support for ACP7.B/7.F
vijendarmukunda 69fb4f8
ASoC: SOF: amd: mask ACP7x PGFSM status poll
vijendarmukunda b1f0ade
ASoC: SOF: amd: refactor SW1 I2S error reason clear in acp_irq_handler
vijendarmukunda 79a256c
ASoC: SOF: amd: add ACP7x probe and remove
vijendarmukunda 3af8b59
ASoC: SOF: amd: add ACP7x IRQ handler for DSP IPC
vijendarmukunda f439804
ASoC: SOF: amd: extend signed firmware pre-run for ACP7x
vijendarmukunda a4de99f
ASoC: SOF: amd: validate signed firmware image size for ACP7x
vijendarmukunda 7d874ce
ASoC: SOF: amd: add post-firmware-run delay for ACP7x
vijendarmukunda 4779570
ASoC: SOF: amd: extend configure_and_run_sha_dma for ACPI signed FW flag
vijendarmukunda 29c1d6a
ASoC: SOF: amd: wire signed firmware load callback for ACP7x via ACPI
vijendarmukunda f49d30d
ASoC: SOF: amd: load ACP7.B/7.F signed data firmware to SRAM
vijendarmukunda 886c158
ASoC: SOF: amd: add ACPTDM format field and topology token
vijendarmukunda ed7280f
ASoC: SOF: amd: add ACP7x I2S DAI type and topology support
vijendarmukunda 0b8af55
ASoC: SOF: amd: add system and runtime PM ops for ACP7x
vijendarmukunda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ | |
| #include <linux/firmware.h> | ||
| #include <linux/module.h> | ||
| #include <linux/pci.h> | ||
| #include <linux/unaligned.h> | ||
|
|
||
| #include "../ops.h" | ||
| #include "acp-dsp-offset.h" | ||
|
|
@@ -173,10 +174,24 @@ int acp_dsp_pre_fw_run(struct snd_sof_dev *sdev) | |
|
|
||
| adata = sdev->pdata->hw_pdata; | ||
|
|
||
| if (adata->quirks && adata->quirks->signed_fw_image) | ||
| if (adata->pci_rev >= ACP7B_PCI_ID) { | ||
| if (adata->acp_sof_signed_firmware_image) { | ||
| if (adata->fw_bin_size <= ACP_IMAGE_HEADER_SIZE) { | ||
| dev_err(sdev->dev, "Invalid signed firmware size %u\n", | ||
| adata->fw_bin_size); | ||
| return -EINVAL; | ||
| } | ||
| size_fw = get_unaligned_le32(adata->bin_buf + | ||
| ACP_IMAGE_HDR_SIZE_FW_SIGNED_OFF); | ||
| size_fw += ACP_IMAGE_HEADER_SIZE; | ||
|
Comment on lines
+177
to
+186
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will fix it. |
||
| } else { | ||
| size_fw = adata->fw_bin_size; | ||
| } | ||
| } else if (adata->quirks && adata->quirks->signed_fw_image) { | ||
|
vijendarmukunda marked this conversation as resolved.
|
||
| size_fw = adata->fw_bin_size - ACP_FIRMWARE_SIGNATURE; | ||
| else | ||
| } else { | ||
| size_fw = adata->fw_bin_size; | ||
| } | ||
|
|
||
| page_count = PAGE_ALIGN(size_fw) >> PAGE_SHIFT; | ||
| adata->fw_bin_page_count = page_count; | ||
|
|
@@ -312,9 +327,14 @@ int acp_sof_load_signed_firmware(struct snd_sof_dev *sdev, const char *fw_name) | |
| } | ||
| kfree(fw_filename); | ||
|
|
||
| ret = snd_sof_dsp_block_write(sdev, SOF_FW_BLK_TYPE_DRAM, 0, | ||
| (void *)adata->fw_dbin->data, | ||
| adata->fw_dbin->size); | ||
| if (adata->pci_rev >= ACP7B_PCI_ID) | ||
| ret = snd_sof_dsp_block_write(sdev, SOF_FW_BLK_TYPE_SRAM, 0, | ||
| (void *)adata->fw_dbin->data, | ||
| adata->fw_dbin->size); | ||
| else | ||
| ret = snd_sof_dsp_block_write(sdev, SOF_FW_BLK_TYPE_DRAM, 0, | ||
| (void *)adata->fw_dbin->data, | ||
| adata->fw_dbin->size); | ||
| return ret; | ||
| } | ||
| EXPORT_SYMBOL_NS(acp_sof_load_signed_firmware, "SND_SOC_SOF_AMD_COMMON"); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will fix it.