forked from Minki/linux
4a9de8ad2c
Some devices connected to the MMC bus are power controlled by external means. For instance, an SDIO device may be powered down/up by an external gpio line. In order to avoid toggling power from within the MMC host driver, add a set_power callback function, which will be called by set_ios upon powering down/up. Signed-off-by: Ido Yariv <ido@wizery.com> CC: Chris Ball <cjb@laptop.org> Acked-by: Chris Ball <cjb@laptop.org> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
40 lines
751 B
C
40 lines
751 B
C
/*
|
|
* Board-specific MMC configuration
|
|
*/
|
|
|
|
#ifndef _DAVINCI_MMC_H
|
|
#define _DAVINCI_MMC_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/mmc/host.h>
|
|
|
|
struct davinci_mmc_config {
|
|
/* get_cd()/get_wp() may sleep */
|
|
int (*get_cd)(int module);
|
|
int (*get_ro)(int module);
|
|
|
|
void (*set_power)(int module, bool on);
|
|
|
|
/* wires == 0 is equivalent to wires == 4 (4-bit parallel) */
|
|
u8 wires;
|
|
|
|
u32 max_freq;
|
|
|
|
/* any additional host capabilities: OR'd in to mmc->f_caps */
|
|
u32 caps;
|
|
|
|
/* Version of the MMC/SD controller */
|
|
u8 version;
|
|
|
|
/* Number of sg segments */
|
|
u8 nr_sg;
|
|
};
|
|
void davinci_setup_mmc(int module, struct davinci_mmc_config *config);
|
|
|
|
enum {
|
|
MMC_CTLR_VERSION_1 = 0, /* DM644x and DM355 */
|
|
MMC_CTLR_VERSION_2, /* DA830 */
|
|
};
|
|
|
|
#endif
|