mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-19 16:38:53 +09:00
![Stephen Warren](/assets/img/avatar_default.png)
This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
/*
|
|
* 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(block_dev_desc_t *block_dev, lbaint_t start,
|
|
lbaint_t blkcnt);
|
|
|
|
unsigned long mmc_bwrite(block_dev_desc_t *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(block_dev_desc_t *block_dev,
|
|
lbaint_t start, lbaint_t blkcnt)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline ulong mmc_bwrite(block_dev_desc_t *block_dev, lbaint_t start,
|
|
lbaint_t blkcnt, const void *src)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
#endif /* CONFIG_SPL_BUILD */
|
|
|
|
#endif /* _MMC_PRIVATE_H_ */
|