2013-09-09 14:30:26 +00:00
|
|
|
/*
|
|
|
|
* 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);
|
2015-04-22 05:57:00 +00:00
|
|
|
#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT
|
|
|
|
void mmc_adapter_card_type_ident(void);
|
|
|
|
#endif
|
2013-09-09 14:30:26 +00:00
|
|
|
|
|
|
|
#ifndef CONFIG_SPL_BUILD
|
|
|
|
|
2016-02-29 22:25:34 +00:00
|
|
|
unsigned long mmc_berase(struct blk_desc *block_dev, lbaint_t start,
|
2015-12-07 18:38:48 +00:00
|
|
|
lbaint_t blkcnt);
|
2013-09-09 14:30:26 +00:00
|
|
|
|
2016-02-29 22:25:34 +00:00
|
|
|
unsigned long mmc_bwrite(struct blk_desc *block_dev, lbaint_t start,
|
2015-12-07 18:38:48 +00:00
|
|
|
lbaint_t blkcnt, const void *src);
|
2013-09-09 14:30:26 +00:00
|
|
|
|
|
|
|
#else /* CONFIG_SPL_BUILD */
|
|
|
|
|
|
|
|
/* SPL will never write or erase, declare dummies to reduce code size. */
|
|
|
|
|
2016-02-29 22:25:34 +00:00
|
|
|
static inline unsigned long mmc_berase(struct blk_desc *block_dev,
|
2015-12-07 18:38:48 +00:00
|
|
|
lbaint_t start, lbaint_t blkcnt)
|
2013-09-09 14:30:26 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2016-02-29 22:25:34 +00:00
|
|
|
static inline ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start,
|
2015-12-07 18:38:48 +00:00
|
|
|
lbaint_t blkcnt, const void *src)
|
2013-09-09 14:30:26 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* CONFIG_SPL_BUILD */
|
|
|
|
|
|
|
|
#endif /* _MMC_PRIVATE_H_ */
|