Daniel Schultz | d0039d3 | 2024-07-16 22:11:31 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2024 PHYTEC Messtechnik GmbH |
| 4 | * Author: Daniel Schultz <d.schultz@phytec.de> |
| 5 | */ |
| 6 | |
| 7 | /* Logic for TI K3 based SoCs to boot from a MMC device. */ |
| 8 | |
Daniel Schultz | 4d7437c | 2024-07-16 22:11:32 -0700 | [diff] [blame^] | 9 | #include <env/phytec/overlays.env> |
| 10 | |
Daniel Schultz | d0039d3 | 2024-07-16 22:11:31 -0700 | [diff] [blame] | 11 | mmcargs=setenv bootargs console=${console} earlycon=${earlycon} |
| 12 | root=/dev/mmcblk${mmcdev}p${mmcroot} rootwait rw |
| 13 | loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} Image |
| 14 | loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile} |
| 15 | mmcboot=run mmcargs; |
| 16 | mmc dev ${mmcdev}; |
| 17 | mmc rescan; |
| 18 | run loadimage; |
| 19 | run loadfdt; |
Daniel Schultz | 4d7437c | 2024-07-16 22:11:32 -0700 | [diff] [blame^] | 20 | run mmc_apply_overlays; |
Daniel Schultz | d0039d3 | 2024-07-16 22:11:31 -0700 | [diff] [blame] | 21 | booti ${loadaddr} - ${fdt_addr_r} |