mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Merge tag 'mmc-9-6-2019' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Bug fixes to mmc_spi Add Aspeed SD driver Fix dw_mmc timeout calculation Fix timeout values passed to mmc_wait_dat0 sdhci dt caps/mask update [trini: Fix evb-ast2500_defconfig CONFIG_MMC line] Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -254,7 +254,7 @@ int ofnode_read_u64(ofnode node, const char *propname, u64 *outp);
|
||||
* @def: default value to return if the property has no value
|
||||
* @return property value, or @def if not found
|
||||
*/
|
||||
int ofnode_read_u64_default(ofnode node, const char *propname, u64 def);
|
||||
u64 ofnode_read_u64_default(ofnode node, const char *propname, u64 def);
|
||||
|
||||
/**
|
||||
* ofnode_read_string() - Read a string from a property
|
||||
|
||||
@@ -44,6 +44,7 @@ static inline bool dev_of_valid(struct udevice *dev)
|
||||
}
|
||||
|
||||
#ifndef CONFIG_DM_DEV_READ_INLINE
|
||||
|
||||
/**
|
||||
* dev_read_u32() - read a 32-bit integer from a device's DT property
|
||||
*
|
||||
@@ -96,6 +97,26 @@ int dev_read_s32_default(struct udevice *dev, const char *propname, int def);
|
||||
*/
|
||||
int dev_read_u32u(struct udevice *dev, const char *propname, uint *outp);
|
||||
|
||||
/**
|
||||
* dev_read_u64() - read a 64-bit integer from a device's DT property
|
||||
*
|
||||
* @dev: device to read DT property from
|
||||
* @propname: name of the property to read from
|
||||
* @outp: place to put value (if found)
|
||||
* @return 0 if OK, -ve on error
|
||||
*/
|
||||
int dev_read_u64(struct udevice *dev, const char *propname, u64 *outp);
|
||||
|
||||
/**
|
||||
* dev_read_u64_default() - read a 64-bit integer from a device's DT property
|
||||
*
|
||||
* @dev: device to read DT property from
|
||||
* @propname: name of the property to read from
|
||||
* @def: default value to return if the property has no value
|
||||
* @return property value, or @def if not found
|
||||
*/
|
||||
u64 dev_read_u64_default(struct udevice *dev, const char *propname, u64 def);
|
||||
|
||||
/**
|
||||
* dev_read_string() - Read a string from a device's DT property
|
||||
*
|
||||
@@ -601,6 +622,18 @@ static inline int dev_read_u32u(struct udevice *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int dev_read_u64(struct udevice *dev,
|
||||
const char *propname, u64 *outp)
|
||||
{
|
||||
return ofnode_read_u64(dev_ofnode(dev), propname, outp);
|
||||
}
|
||||
|
||||
static inline u64 dev_read_u64_default(struct udevice *dev,
|
||||
const char *propname, u64 def)
|
||||
{
|
||||
return ofnode_read_u64_default(dev_ofnode(dev), propname, def);
|
||||
}
|
||||
|
||||
static inline const char *dev_read_string(struct udevice *dev,
|
||||
const char *propname)
|
||||
{
|
||||
|
||||
@@ -457,10 +457,10 @@ struct dm_mmc_ops {
|
||||
*
|
||||
* @dev: Device to check
|
||||
* @state: target state
|
||||
* @timeout: timeout in us
|
||||
* @timeout_us: timeout in us
|
||||
* @return 0 if dat0 is in the target state, -ve on error
|
||||
*/
|
||||
int (*wait_dat0)(struct udevice *dev, int state, int timeout);
|
||||
int (*wait_dat0)(struct udevice *dev, int state, int timeout_us);
|
||||
|
||||
#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
|
||||
/* set_enhanced_strobe() - set HS400 enhanced strobe */
|
||||
@@ -476,14 +476,14 @@ int dm_mmc_set_ios(struct udevice *dev);
|
||||
int dm_mmc_get_cd(struct udevice *dev);
|
||||
int dm_mmc_get_wp(struct udevice *dev);
|
||||
int dm_mmc_execute_tuning(struct udevice *dev, uint opcode);
|
||||
int dm_mmc_wait_dat0(struct udevice *dev, int state, int timeout);
|
||||
int dm_mmc_wait_dat0(struct udevice *dev, int state, int timeout_us);
|
||||
|
||||
/* Transition functions for compatibility */
|
||||
int mmc_set_ios(struct mmc *mmc);
|
||||
int mmc_getcd(struct mmc *mmc);
|
||||
int mmc_getwp(struct mmc *mmc);
|
||||
int mmc_execute_tuning(struct mmc *mmc, uint opcode);
|
||||
int mmc_wait_dat0(struct mmc *mmc, int state, int timeout);
|
||||
int mmc_wait_dat0(struct mmc *mmc, int state, int timeout_us);
|
||||
int mmc_set_enhanced_strobe(struct mmc *mmc);
|
||||
|
||||
#else
|
||||
@@ -602,8 +602,8 @@ struct mmc {
|
||||
u8 part_attr;
|
||||
u8 wr_rel_set;
|
||||
u8 part_config;
|
||||
u8 gen_cmd6_time;
|
||||
u8 part_switch_time;
|
||||
u8 gen_cmd6_time; /* units: 10 ms */
|
||||
u8 part_switch_time; /* units: 10 ms */
|
||||
uint tran_speed;
|
||||
uint legacy_speed; /* speed for the legacy mode provided by the card */
|
||||
uint read_bl_len;
|
||||
|
||||
Reference in New Issue
Block a user