Created
May 2, 2024 10:17
-
-
Save apritzel/423f96d84599d107383b557ca79bbf96 to your computer and use it in GitHub Desktop.
U-Boot H616 SPL at 256KB MMC offset booting support
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
commit 5e9a281c9f9b50f22fdba619ca3a0f8788224ef3 | |
Author: Andre Przywara <[email protected]> | |
Date: Thu Mar 28 16:18:12 2024 +0000 | |
UNTESTED! H616 high location boot support | |
Signed-off-by: Andre Przywara <[email protected]> | |
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c | |
index 0140b07d32a..046e9fbfc67 100644 | |
--- a/arch/arm/mach-sunxi/board.c | |
+++ b/arch/arm/mach-sunxi/board.c | |
@@ -333,7 +333,8 @@ uint32_t sunxi_get_spl_size(void) | |
* The eGON SPL image can be located at 8KB or at 128KB into an SD card or | |
* an eMMC device. The boot source has bit 4 set in the latter case. | |
* By adding 120KB to the normal offset when booting from a "high" location | |
- * we can support both cases. | |
+ * we can support both cases. The H616 has the alternative location | |
+ * moved up to 256 KB instead of 128KB, so cater for that, too. | |
* Also U-Boot proper is located at least 32KB after the SPL, but will | |
* immediately follow the SPL if that is bigger than that. | |
*/ | |
@@ -349,6 +350,8 @@ unsigned long board_spl_mmc_get_uboot_raw_sector(struct mmc *mmc, | |
case SUNXI_BOOTED_FROM_MMC0_HIGH: | |
case SUNXI_BOOTED_FROM_MMC2_HIGH: | |
sector += (128 - 8) * 2; | |
+ if (IS_ENABLED(CONFIG_MACH_SUN50I_H616)) | |
+ sector += 128 * 2; | |
break; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment