Created
December 16, 2023 12:38
-
-
Save iuncuim/3d2b20f7274aa8ea69a634bc7aeb54a2 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
diff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c | |
index c5c1331..9b51b7e 100644 | |
--- a/arch/arm/mach-sunxi/dram_sun50i_h616.c | |
+++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c | |
@@ -1352,6 +1352,9 @@ static unsigned long mctl_calc_size(const struct dram_config *config) | |
u8 width = config->bus_full_width ? 4 : 2; | |
/* 8 banks */ | |
+ u32 offset = (1ULL << (config->cols + config->rows + 3)) * width * config->ranks; | |
+ if (mctl_mem_matches(offset-0x10)) | |
+ return (1ULL << (config->cols + config->rows + 3)) * width * config->ranks * 3 / 4; | |
return (1ULL << (config->cols + config->rows + 3)) * width * config->ranks; | |
} | |
it doesn't matter since it doesn't work with opizero3 lpddr4
Oh that is sad to hear. Then I can skip testing it. Is this one supposed to work instead? EDIT: Just read our answer on the OpenWRT forum.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Many thanks, @iuncuim, this is what we were looking for. I am no C coder, but isn't it possible to reuse the
offset
variable, like?