Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  *  Board-specific MMC configuration
0004  */
0005 
0006 #ifndef _DAVINCI_MMC_H
0007 #define _DAVINCI_MMC_H
0008 
0009 #include <linux/types.h>
0010 #include <linux/mmc/host.h>
0011 
0012 struct davinci_mmc_config {
0013     /* get_cd()/get_wp() may sleep */
0014     int (*get_cd)(int module);
0015     int (*get_ro)(int module);
0016 
0017     void    (*set_power)(int module, bool on);
0018 
0019     /* wires == 0 is equivalent to wires == 4 (4-bit parallel) */
0020     u8  wires;
0021 
0022     u32     max_freq;
0023 
0024     /* any additional host capabilities: OR'd in to mmc->f_caps */
0025     u32     caps;
0026 
0027     /* Number of sg segments */
0028     u8  nr_sg;
0029 };
0030 void davinci_setup_mmc(int module, struct davinci_mmc_config *config);
0031 
0032 enum {
0033     MMC_CTLR_VERSION_1 = 0, /* DM644x and DM355 */
0034     MMC_CTLR_VERSION_2, /* DA830 */
0035 };
0036 
0037 #endif