mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 16:10:58 +00:00
5a8dbdc6b4
Add adapter card type identification support by reading FPGA STAT_PRES1 register SDHC Card ID[0:2] bits. To use this function, define CONFIG_FSL_ESDHC_ADAPTER_IDENT. Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com> Cc: York Sun <yorksun@freescale.com> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> [York Sun: resolve conflicts in README.fsl-esdhc] Reviewed-by: York Sun <yorksun@freescale.com>
48 lines
1.1 KiB
C
48 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
|
|
|
|
extern unsigned long mmc_berase(int dev_num, lbaint_t start, lbaint_t blkcnt);
|
|
|
|
extern ulong mmc_bwrite(int dev_num, 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(int dev_num, lbaint_t start,
|
|
lbaint_t blkcnt)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline ulong mmc_bwrite(int dev_num, lbaint_t start, lbaint_t blkcnt,
|
|
const void *src)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
#endif /* CONFIG_SPL_BUILD */
|
|
|
|
#endif /* _MMC_PRIVATE_H_ */
|