mmc: sdhci-of-aspeed: Fixes for AST2600 eMMC
Subsystems (4)
cover mmc: sdhci-of-aspeed: Fixes for AST2600 eMMC
Hello,
This series enables the eMMC onboard the AST2600 EVB. There's currently a limitation of running it at 52MHz, I'm still investigating that. Reads and writes are both functional.
The two critical patches (3/5 and 4/5) are on the linux-mmc list and can be found here:
https://patchwork.ozlabs.org/project/linux-aspeed/list/?series=128207&state=%2A&archive=both
Cheers,
Andrew
Andrew Jeffery (4):
mmc: sdhci-of-aspeed: Drop redundant assignment to host->clock
mmc: sdhci-of-aspeed: Uphold clocks-on post-condition of set_clock()
mmc: sdhci-of-aspeed: Allow max-frequency limitation of SDCLK
ARM: dts: ast2600-evb: eMMC configuration
Wei Yongjun (1):
mmc: sdhci-of-aspeed: Fix return value check in aspeed_sdc_probe()
arch/arm/boot/dts/aspeed-ast2600-evb.dts | 8 ++++++- arch/arm/boot/dts/aspeed-g6.dtsi | 4 ++-- drivers/mmc/host/sdhci-of-aspeed.c | 28 ++++++++++++++++-------- 3 files changed, 28 insertions(+), 12 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/5 mmc: sdhci-of-aspeed: Fix return value check in aspeed_sdc_probe()
From: Wei Yongjun <[email protected]>
In case of error, the function of_platform_device_create() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test.
--- drivers/mmc/host/sdhci-of-aspeed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci-of-aspeed.c +2 -2
@@ -261,9 +261,9 @@ static int aspeed_sdc_probe(struct platform_device *pdev)struct platform_device *cpdev; cpdev =of_platform_device_create (child,NULL , &pdev->dev); -if (IS_ERR (cpdev)) { +if (!cpdev) {of_node_put (child); - ret =PTR_ERR (cpdev); + ret = -ENODEV ; goto err_clk; } }
Signature · 1 line
2.20.1
PATCH 2/5 mmc: sdhci-of-aspeed: Drop redundant assignment to host->clock
In reply to Andrew Jefferyhost->clock is already managed by sdhci_set_ios().
--- drivers/mmc/host/sdhci-of-aspeed.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/mmc/host/sdhci-of-aspeed.c +1 -4
@@ -61,7 +61,7 @@ static void aspeed_sdhci_set_clock(struct sdhci_host *host, unsigned int clock)sdhci_writew (host,0 ,SDHCI_CLOCK_CONTROL );if (clock ==0 ) - goto out; +return ;for (div =1 ; div <256 ; div *=2 ) {if ((host->max_clk / div) <= clock)
@@ -72,9 +72,6 @@ static void aspeed_sdhci_set_clock(struct sdhci_host *host, unsigned int clock) clk = div <<SDHCI_DIVIDER_SHIFT ;sdhci_enable_clk (host, clk); - -out: - host->clock = clock; }static void aspeed_sdhci_set_bus_width (struct sdhci_host *host,int width)
Signature · 1 line
2.20.1