From 11fdade294b4d60c19ae861515aabddca1278deb Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Fri, 5 Feb 2010 15:04:43 +0100 Subject: MMC: add weak function to detect MMC/SD card Most controllers can check if there is a card in the slot. However, they require pins that could be not available because required by other functions and the detection of a card must be performed in another way. This patch adds a weak function that a board can implement to add its internal custom way to check the presence of a MMC/SD card. Signed-off-by: Stefano Babic --- drivers/mmc/mmc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/mmc/mmc.c') diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index d91b9b7f3a3..367922579cb 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -36,6 +36,13 @@ static struct list_head mmc_devices; static int cur_dev_num = -1; +int __board_mmc_getcd(u8 *cd, struct mmc *mmc) { + return -1; +} + +int board_mmc_getcd(u8 *cd, struct mmc *mmc)__attribute__((weak, + alias("__board_mmc_getcd"))); + int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) { return mmc->send_cmd(mmc, cmd, data); -- cgit v1.2.3