summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc_private.h
blob: d3f6bfe123cdde8930ad0b40e5307efd83274dab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * 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);
#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT
void mmc_adapter_card_type_ident(void);
#endif

#ifndef CONFIG_SPL_BUILD

unsigned long mmc_berase(struct blk_desc *block_dev, lbaint_t start,
			 lbaint_t blkcnt);

unsigned long mmc_bwrite(struct blk_desc *block_dev, 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(struct blk_desc *block_dev,
				       lbaint_t start, lbaint_t blkcnt)
{
	return 0;
}

static inline ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start,
			       lbaint_t blkcnt, const void *src)
{
	return 0;
}

#endif /* CONFIG_SPL_BUILD */

#endif /* _MMC_PRIVATE_H_ */