xref: /openbmc/u-boot/drivers/mmc/mmc_private.h (revision 4101f6879256720b30df712089a3df18565f9203)
1da61fa5fSPaul Burton /*
2da61fa5fSPaul Burton  * Copyright 2008,2010 Freescale Semiconductor, Inc
3da61fa5fSPaul Burton  * Andy Fleming
4da61fa5fSPaul Burton  *
5da61fa5fSPaul Burton  * Based (loosely) on the Linux code
6da61fa5fSPaul Burton  *
7da61fa5fSPaul Burton  * SPDX-License-Identifier:	GPL-2.0+
8da61fa5fSPaul Burton  */
9da61fa5fSPaul Burton 
10da61fa5fSPaul Burton #ifndef _MMC_PRIVATE_H_
11da61fa5fSPaul Burton #define _MMC_PRIVATE_H_
12da61fa5fSPaul Burton 
13da61fa5fSPaul Burton #include <mmc.h>
14da61fa5fSPaul Burton 
15da61fa5fSPaul Burton extern int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
16da61fa5fSPaul Burton 			struct mmc_data *data);
17da61fa5fSPaul Burton extern int mmc_send_status(struct mmc *mmc, int timeout);
18da61fa5fSPaul Burton extern int mmc_set_blocklen(struct mmc *mmc, int len);
195a8dbdc6SYangbo Lu #ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT
205a8dbdc6SYangbo Lu void mmc_adapter_card_type_ident(void);
215a8dbdc6SYangbo Lu #endif
22da61fa5fSPaul Burton 
23da61fa5fSPaul Burton #ifndef CONFIG_SPL_BUILD
24da61fa5fSPaul Burton 
25*4101f687SSimon Glass unsigned long mmc_berase(struct blk_desc *block_dev, lbaint_t start,
267c4213f6SStephen Warren 			 lbaint_t blkcnt);
27da61fa5fSPaul Burton 
28*4101f687SSimon Glass unsigned long mmc_bwrite(struct blk_desc *block_dev, lbaint_t start,
297c4213f6SStephen Warren 			 lbaint_t blkcnt, const void *src);
30da61fa5fSPaul Burton 
31da61fa5fSPaul Burton #else /* CONFIG_SPL_BUILD */
32da61fa5fSPaul Burton 
33da61fa5fSPaul Burton /* SPL will never write or erase, declare dummies to reduce code size. */
34da61fa5fSPaul Burton 
35*4101f687SSimon Glass static inline unsigned long mmc_berase(struct blk_desc *block_dev,
367c4213f6SStephen Warren 				       lbaint_t start, lbaint_t blkcnt)
37da61fa5fSPaul Burton {
38da61fa5fSPaul Burton 	return 0;
39da61fa5fSPaul Burton }
40da61fa5fSPaul Burton 
41*4101f687SSimon Glass static inline ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start,
427c4213f6SStephen Warren 			       lbaint_t blkcnt, const void *src)
43da61fa5fSPaul Burton {
44da61fa5fSPaul Burton 	return 0;
45da61fa5fSPaul Burton }
46da61fa5fSPaul Burton 
47da61fa5fSPaul Burton #endif /* CONFIG_SPL_BUILD */
48da61fa5fSPaul Burton 
49da61fa5fSPaul Burton #endif /* _MMC_PRIVATE_H_ */
50