-
-
Save kallisti5/2b69362c18a33c6ab657c261ee60cc51 to your computer and use it in GitHub Desktop.
This file contains 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
if (regShift != NULL) { | |
// Grab any register shifts if requested | |
prop = (const uint8*)fdt_getprop(fdt, node, "reg-shift", &propSize); | |
if (prop == NULL) | |
#if defined(__ARM__) || defined(__aarch64__) | |
// arm and arm64 before dts's were used outside of these architectures historically | |
// assumed reg-shift 2 which means dts's from these architectures omit it and assume | |
// you're shifting. | |
*regShift = 2; | |
#else | |
*regShift = 0; | |
#endif | |
else | |
*regShift = fdt32_to_cpu(*(uint32*)prop); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment