From a960b9ecd99d1b4e3f194bc52d92cb41b0d80e4a Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Fri, 21 Feb 2020 14:56:39 +0100 Subject: mmc board code: add a weak common implementation NXP common code now calls a board function mmc_map_to_kernel_blk(). Provide a weak function in common code for boards not requiring special handling. Taken from boards/freescale/common/mmc.c Related-to: ELB-2351 Signed-off-by: Max Krummenacher --- board/toradex/common/Makefile | 2 +- board/toradex/common/mmc.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 board/toradex/common/mmc.c diff --git a/board/toradex/common/Makefile b/board/toradex/common/Makefile index 6b9fccb6b9..fc4dd4b6c3 100644 --- a/board/toradex/common/Makefile +++ b/board/toradex/common/Makefile @@ -7,5 +7,5 @@ ifeq ($(CONFIG_SPL_BUILD),y) obj- := __dummy__.o else obj-$(CONFIG_TDX_CFG_BLOCK) += tdx-cfg-block.o -obj-y += tdx-common.o +obj-y += mmc.o tdx-common.o endif diff --git a/board/toradex/common/mmc.c b/board/toradex/common/mmc.c new file mode 100644 index 0000000000..5fe8026ed1 --- /dev/null +++ b/board/toradex/common/mmc.c @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2016-2019 Toradex, Inc. + */ + +#include +#include + +/* provide a default implementation */ +__weak int mmc_map_to_kernel_blk(int dev_no) +{ + return dev_no; +} -- cgit v1.2.3