blob: 16dcf9ff617b736e357531d1c466c6abb26de82c [file] [log] [blame]
Paul Burtonda61fa52013-09-09 15:30:26 +01001/*
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
15extern int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
16 struct mmc_data *data);
17extern int mmc_send_status(struct mmc *mmc, int timeout);
18extern int mmc_set_blocklen(struct mmc *mmc, int len);
19
20#ifndef CONFIG_SPL_BUILD
21
22extern unsigned long mmc_berase(int dev_num, lbaint_t start, lbaint_t blkcnt);
23
24extern 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
31static inline unsigned long mmc_berase(int dev_num, lbaint_t start,
32 lbaint_t blkcnt)
33{
34 return 0;
35}
36
37static 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_ */