xref: /openbmc/u-boot/drivers/mmc/mmc_private.h (revision 940db16d)
1 /*
2  * Copyright 2008,2010 Freescale Semiconductor, Inc
3  * Andy Fleming
4  *
5  * Based (loosely) on the Linux code
6  *
7  * SPDX-License-Identifier:	GPL-2.0+
8  */
9 
10 #ifndef _MMC_PRIVATE_H_
11 #define _MMC_PRIVATE_H_
12 
13 #include <mmc.h>
14 
15 extern int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
16 			struct mmc_data *data);
17 extern int mmc_send_status(struct mmc *mmc, int timeout);
18 extern int mmc_set_blocklen(struct mmc *mmc, int len);
19 
20 #ifndef CONFIG_SPL_BUILD
21 
22 extern unsigned long mmc_berase(int dev_num, lbaint_t start, lbaint_t blkcnt);
23 
24 extern ulong mmc_bwrite(int dev_num, lbaint_t start, lbaint_t blkcnt,
25 		const void *src);
26 
27 #else /* CONFIG_SPL_BUILD */
28 
29 /* SPL will never write or erase, declare dummies to reduce code size. */
30 
31 static inline unsigned long mmc_berase(int dev_num, lbaint_t start,
32 		lbaint_t blkcnt)
33 {
34 	return 0;
35 }
36 
37 static inline ulong mmc_bwrite(int dev_num, lbaint_t start, lbaint_t blkcnt,
38 		const void *src)
39 {
40 	return 0;
41 }
42 
43 #endif /* CONFIG_SPL_BUILD */
44 
45 #endif /* _MMC_PRIVATE_H_ */
46