]> git.dujemihanovic.xyz Git - u-boot.git/commit
spl: mmc: Introduce proper layering for spl_mmc_get_uboot_raw_sector()
authorMarek Vasut <marex@denx.de>
Mon, 16 Oct 2023 16:16:12 +0000 (18:16 +0200)
committerStefano Babic <sbabic@denx.de>
Tue, 17 Oct 2023 21:55:10 +0000 (23:55 +0200)
commite936db953600aba0986743f12229d8b7ebff92ae
treeb9a76226e83d2092323071747df0b58da242e5f7
parentfb2bdc4efcb99fab62051274ad2330aef07360f6
spl: mmc: Introduce proper layering for spl_mmc_get_uboot_raw_sector()

Introduce two new weak functions, arch_spl_mmc_get_uboot_raw_sector() and
board_spl_mmc_get_uboot_raw_sector(), each of which can be overridden at
a matching level, that is arch/ and board/ , in addition to the existing
weak function spl_mmc_get_uboot_raw_sector().

This way, architecture code can define a default architecture specific
implementation of arch_spl_mmc_get_uboot_raw_sector(), while the board
code can override that using board_spl_mmc_get_uboot_raw_sector() which
takes precedence over the architecture code. In some sort of unlikely
special case where code has to take precedence over board code too, the
spl_mmc_get_uboot_raw_sector() is still left out to be a weak function,
but it should be unlikely that this is ever needed to be overridden.

Signed-off-by: Marek Vasut <marex@denx.de>
arch/arm/mach-imx/image-container.c
arch/arm/mach-mvebu/spl.c
arch/arm/mach-sunxi/board.c
board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c
board/data_modul/imx8mp_edm_sbc/spl.c
board/gateworks/venice/spl.c
common/spl/spl_mmc.c
include/spl.h