Repository navigation
bootloader: enable LPSRAM memory for cannonlake #1552
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
cd92c18
shim: add LSPGCTL register relative offset
mrajwa 7cedbb3
Kconfig: add option to enable CONFIG_LP_SRAM
mrajwa 5096db4
bootloader: enable LPSRAM depending on CONFIG
mrajwa ea10d48
memory: fix LPSRAM defines on CANNONLAKE
mrajwa c814628
kconfig: enable LPSRAM by default for APL
mrajwa 5e40872
kconfig: enable LPSRAM by default for CNL
mrajwa 09957d2
memory: set LPSRAM related defines to zero if LP not configured
mrajwa 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,4 @@ CONFIG_CAVS_DMIC=y | |
| CONFIG_CAVS_SSP=y | ||
| CONFIG_LP_MEMORY_BANKS=2 | ||
| CONFIG_HP_MEMORY_BANKS=8 | ||
| CONFIG_LP_SRAM=y | ||
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 |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ CONFIG_CAVS_SSP=y | |
| CONFIG_CORE_COUNT=4 | ||
| CONFIG_LP_MEMORY_BANKS=1 | ||
| CONFIG_HP_MEMORY_BANKS=47 | ||
| CONFIG_LP_SRAM=y | ||
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 |
|---|---|---|
|
|
@@ -19,14 +19,22 @@ | |
|
|
||
| #define EBB_SEGMENT_SIZE EBB_BANKS_IN_SEGMENT | ||
|
|
||
| #if CONFIG_LP_MEMORY_BANKS | ||
| #define PLATFORM_LPSRAM_EBB_COUNT CONFIG_LP_MEMORY_BANKS | ||
| #else | ||
| #define PLATFORM_LPSRAM_EBB_COUNT 0 | ||
| #endif | ||
|
Collaborator
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. @mrajwa , the preprocessor replaces undefined macros with 0 so I don't see when or how the newer and more convoluted code behaves differently from the previous code, can you explain? Besides moving any |
||
|
|
||
| #define PLATFORM_HPSRAM_EBB_COUNT CONFIG_HP_MEMORY_BANKS | ||
|
|
||
| #define MAX_MEMORY_SEGMENTS PLATFORM_HPSRAM_SEGMENTS | ||
|
|
||
| #if CONFIG_LP_MEMORY_BANKS | ||
| #define LP_SRAM_SIZE \ | ||
| (CONFIG_LP_MEMORY_BANKS * SRAM_BANK_SIZE) | ||
| #else | ||
| #define LP_SRAM_SIZE 0 | ||
| #endif | ||
|
|
||
| #define HP_SRAM_SIZE \ | ||
| (CONFIG_HP_MEMORY_BANKS * SRAM_BANK_SIZE) | ||
|
|
||
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
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.
It got a bit messy, we have LSPGCTL once used as shim (here) and another time as just memory mng register to turn it off at all (in asm_memory_management). Please clean it up.