diff options
author | Vasily Khoruzhick | 2018-11-05 22:24:28 -0600 |
---|---|---|
committer | Jagan Teki | 2018-11-13 10:37:39 -0600 |
commit | 20940ef2a397446a209350900d3bd618c3fd5b94 (patch) | |
tree | 0b584459737f9b65585876e3ea3ca696933b66ac /arch | |
parent | 4f9d34e633c498b9f706a78f465d337c041f4a65 (diff) | |
download | u-boot-20940ef2a397446a209350900d3bd618c3fd5b94.tar.gz u-boot-20940ef2a397446a209350900d3bd618c3fd5b94.tar.xz u-boot-20940ef2a397446a209350900d3bd618c3fd5b94.zip |
mmc: sunxi: add support for automatic delay calibration
A64 and H6 support automatic delay calibration and Linux driver uses it
instead of hardcoded delays. Add support for it to u-boot driver.
Fixes eMMC instability on Pinebook
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cc: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/arch-sunxi/mmc.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h b/arch/arm/include/asm/arch-sunxi/mmc.h index d98c53faaa..f2deafddd2 100644 --- a/arch/arm/include/asm/arch-sunxi/mmc.h +++ b/arch/arm/include/asm/arch-sunxi/mmc.h | |||
@@ -46,7 +46,9 @@ struct sunxi_mmc { | |||
46 | u32 cbda; /* 0x94 */ | 46 | u32 cbda; /* 0x94 */ |
47 | u32 res2[26]; | 47 | u32 res2[26]; |
48 | #if defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6) | 48 | #if defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6) |
49 | u32 res3[64]; | 49 | u32 res3[17]; |
50 | u32 samp_dl; | ||
51 | u32 res4[46]; | ||
50 | #endif | 52 | #endif |
51 | u32 fifo; /* 0x100 / 0x200 FIFO access address */ | 53 | u32 fifo; /* 0x100 / 0x200 FIFO access address */ |
52 | }; | 54 | }; |
@@ -130,5 +132,7 @@ struct sunxi_mmc { | |||
130 | #define SUNXI_MMC_COMMON_CLK_GATE (1 << 16) | 132 | #define SUNXI_MMC_COMMON_CLK_GATE (1 << 16) |
131 | #define SUNXI_MMC_COMMON_RESET (1 << 18) | 133 | #define SUNXI_MMC_COMMON_RESET (1 << 18) |
132 | 134 | ||
135 | #define SUNXI_MMC_CAL_DL_SW_EN (0x1 << 7) | ||
136 | |||
133 | struct mmc *sunxi_mmc_init(int sdc_no); | 137 | struct mmc *sunxi_mmc_init(int sdc_no); |
134 | #endif /* _SUNXI_MMC_H */ | 138 | #endif /* _SUNXI_MMC_H */ |