summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/mmc_private.h
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2013-09-09 15:30:26 +0100
committerPantelis Antoniou <panto@antoniou-consulting.com>2013-09-20 18:58:55 +0300
commitda61fa5f42133593be51764b55a905330eae5063 (patch)
tree57ac9ecb88465aca1356174d9f597401cadcb3c2 /drivers/mmc/mmc_private.h
parent8687d5c80c9b4d66b4c33e34ef8eb36cf93d9ec7 (diff)
downloadtalos-obmc-uboot-da61fa5f42133593be51764b55a905330eae5063.tar.gz
talos-obmc-uboot-da61fa5f42133593be51764b55a905330eae5063.zip
mmc: don't support write & erase for SPL builds
For SPL builds this is just dead code since we'll only need to read. Eliminating it results in a significant size reduction for the SPL binary, which may be critical for certain platforms where the binary size is highly constrained. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Diffstat (limited to 'drivers/mmc/mmc_private.h')
-rw-r--r--drivers/mmc/mmc_private.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h
new file mode 100644
index 0000000000..16dcf9ff61
--- /dev/null
+++ b/drivers/mmc/mmc_private.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2008,2010 Freescale Semiconductor, Inc
+ * Andy Fleming
+ *
+ * Based (loosely) on the Linux code
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _MMC_PRIVATE_H_
+#define _MMC_PRIVATE_H_
+
+#include <mmc.h>
+
+extern int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
+ struct mmc_data *data);
+extern int mmc_send_status(struct mmc *mmc, int timeout);
+extern int mmc_set_blocklen(struct mmc *mmc, int len);
+
+#ifndef CONFIG_SPL_BUILD
+
+extern unsigned long mmc_berase(int dev_num, lbaint_t start, lbaint_t blkcnt);
+
+extern ulong mmc_bwrite(int dev_num, lbaint_t start, lbaint_t blkcnt,
+ const void *src);
+
+#else /* CONFIG_SPL_BUILD */
+
+/* SPL will never write or erase, declare dummies to reduce code size. */
+
+static inline unsigned long mmc_berase(int dev_num, lbaint_t start,
+ lbaint_t blkcnt)
+{
+ return 0;
+}
+
+static inline ulong mmc_bwrite(int dev_num, lbaint_t start, lbaint_t blkcnt,
+ const void *src)
+{
+ return 0;
+}
+
+#endif /* CONFIG_SPL_BUILD */
+
+#endif /* _MMC_PRIVATE_H_ */
OpenPOWER on IntegriCloud