Enable ECC using device tree#15
Open
shenki wants to merge 3 commits intoAspeedTech-BMC:aspeed-master-v2019.04from
Open
Enable ECC using device tree#15shenki wants to merge 3 commits intoAspeedTech-BMC:aspeed-master-v2019.04from
shenki wants to merge 3 commits intoAspeedTech-BMC:aspeed-master-v2019.04from
Conversation
Instead of configuring ECC based on the build config, use a device tree
property to selectively enable ECC at runtime.
There are two properties:
aspeed,ecc-enabled;
aspeed,ecc-size-mb = "512";
The enabled property is a boolean that enables ECC if it is present.
The size is the number of MB that should be covered by ECC. Setting it
to zero, or omitting it, defaults the ECC size to "auto detect".
edac: sdram@1e6e0000 {
compatible = "aspeed,ast2600-sdram-edac";
reg = <0x1e6e0000 0x174>;
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
aspeed,ecc-enabled;
aspeed,ecc-size-mb = "512";
};
Signed-off-by: Joel Stanley <[email protected]>
Reviewed-by: Andrew Jeffery <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Always build the code now that it is enabled by device tree. Signed-off-by: Joel Stanley <[email protected]> Reviewed-by: Andrew Jeffery <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Enable ECC to cover the entire DRAM by not setting the size property. Signed-off-by: Joel Stanley <[email protected]> Reviewed-by: Andrew Jeffery <[email protected]> Link: https://lore.kernel.org/r/[email protected]
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Please consider merging these changes. This allows us to have one u-boot configuration for all machines, and enable ECC depending on a device tree property. An example is given with the p10bmc machine.