X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fsdhci.h;h=88f1917480b66e85ef4015cc6ce6a008be150235;hb=46b5c8ed017958fc387ab86c71ae6c90abb6793c;hp=3e5a64981857df6188f87fba165dd008d14d2d66;hpb=bc0b99bd8b19599f670f42401de655fa9b44cd94;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/sdhci.h b/include/sdhci.h index 3e5a649..88f1917 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -65,6 +65,8 @@ #define SDHCI_CARD_STATE_STABLE BIT(17) #define SDHCI_CARD_DETECT_PIN_LEVEL BIT(18) #define SDHCI_WRITE_PROTECT BIT(19) +#define SDHCI_DATA_LVL_MASK 0x00F00000 +#define SDHCI_DATA_0_LVL_MASK BIT(20) #define SDHCI_HOST_CONTROL 0x28 #define SDHCI_CTRL_LED BIT(0) @@ -268,8 +270,20 @@ struct sdhci_ops { int (*set_ios_post)(struct sdhci_host *host); void (*set_clock)(struct sdhci_host *host, u32 div); int (*platform_execute_tuning)(struct mmc *host, u8 opcode); - void (*set_delay)(struct sdhci_host *host); + int (*set_delay)(struct sdhci_host *host); int (*deferred_probe)(struct sdhci_host *host); + + /** + * set_enhanced_strobe() - Set HS400 Enhanced Strobe config + * + * This is called after setting the card speed and mode to + * HS400 ES, and should set any host-specific configuration + * necessary for it. + * + * @host: SDHCI host structure + * Return: 0 if successful, -ve on error + */ + int (*set_enhanced_strobe)(struct sdhci_host *host); }; #define ADMA_MAX_LEN 65532 @@ -468,7 +482,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, * @cfg: Empty configuration structure (generally &plat->cfg). This is * normally all zeroes at this point. The only purpose of passing * this in is to set mmc->cfg to it. - * @return 0 if OK, -ve if the block device could not be created + * Return: 0 if OK, -ve if the block device could not be created */ int sdhci_bind(struct udevice *dev, struct mmc *mmc, struct mmc_config *cfg); #else @@ -481,7 +495,7 @@ int sdhci_bind(struct udevice *dev, struct mmc *mmc, struct mmc_config *cfg); * @host: SDHCI host structure * @f_max: Maximum supported clock frequency in HZ (0 for default) * @f_min: Minimum supported clock frequency in HZ (0 for default) - * @return 0 if OK, -ve on error + * Return: 0 if OK, -ve on error */ int add_sdhci(struct sdhci_host *host, u32 f_max, u32 f_min); #endif /* !CONFIG_BLK */ @@ -491,6 +505,16 @@ void sdhci_set_uhs_timing(struct sdhci_host *host); /* Export the operations to drivers */ int sdhci_probe(struct udevice *dev); int sdhci_set_clock(struct mmc *mmc, unsigned int clock); + +/** + * sdhci_set_control_reg - Set control registers + * + * This is used set up control registers for voltage level and UHS speed + * mode. + * + * @host: SDHCI host structure + */ +void sdhci_set_control_reg(struct sdhci_host *host); extern const struct dm_mmc_ops sdhci_ops; #else #endif