summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2020-02-21 14:56:39 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2020-03-10 11:28:31 +0100
commita960b9ecd99d1b4e3f194bc52d92cb41b0d80e4a (patch)
treea2695e2c09a669b76822530ea2310fce19b12175
parenta29d593fb8cdcbbf9a6449a83febb9580c1a068e (diff)
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 <max.krummenacher@toradex.com>
-rw-r--r--board/toradex/common/Makefile2
-rw-r--r--board/toradex/common/mmc.c13
2 files changed, 14 insertions, 1 deletions
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 <common.h>
+#include <mmc.h>
+
+/* provide a default implementation */
+__weak int mmc_map_to_kernel_blk(int dev_no)
+{
+ return dev_no;
+}