diff mbox

[U-Boot,2/2] ARM: tegra: fix Tegra186 SDHCI clock/reset names

Message ID 20160818170844.30714-2-swarren@wwwdotorg.org
State Accepted
Commit eb3f68afbc8b8b2bdb491f61c342aabb776c8321
Delegated to: Tom Warren
Headers show

Commit Message

Stephen Warren Aug. 18, 2016, 5:08 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

The Tegra SDHCI binding dictates that the reseet name for the Tegra SDHCI
clock be "sdhci" not "sdmmc", and that the clock is accessed by index
rather than by name. Fix the Tegra186 DT and MMC driver to honor this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/dts/tegra186.dtsi | 6 ++----
 drivers/mmc/tegra_mmc.c    | 6 +++---
 2 files changed, 5 insertions(+), 7 deletions(-)

Comments

Simon Glass Aug. 20, 2016, 11:52 p.m. UTC | #1
On 18 August 2016 at 11:08, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> The Tegra SDHCI binding dictates that the reseet name for the Tegra SDHCI
> clock be "sdhci" not "sdmmc", and that the clock is accessed by index
> rather than by name. Fix the Tegra186 DT and MMC driver to honor this.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
>  arch/arm/dts/tegra186.dtsi | 6 ++----
>  drivers/mmc/tegra_mmc.c    | 6 +++---
>  2 files changed, 5 insertions(+), 7 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/arch/arm/dts/tegra186.dtsi b/arch/arm/dts/tegra186.dtsi
index 54ef7e3e4adc..65ff4246c01e 100644
--- a/arch/arm/dts/tegra186.dtsi
+++ b/arch/arm/dts/tegra186.dtsi
@@ -120,9 +120,8 @@ 
 		compatible = "nvidia,tegra186-sdhci";
 		reg = <0x0 0x03400000 0x0 0x200>;
 		resets = <&bpmp TEGRA186_RESET_SDMMC1>;
-		reset-names = "sdmmc";
+		reset-names = "sdhci";
 		clocks = <&bpmp TEGRA186_CLK_SDMMC1>;
-		clock-names = "sdmmc";
 		interrupts = <GIC_SPI 62 0x04>;
 		status = "disabled";
 	};
@@ -131,9 +130,8 @@ 
 		compatible = "nvidia,tegra186-sdhci";
 		reg = <0x0 0x03460000 0x0 0x200>;
 		resets = <&bpmp TEGRA186_RESET_SDMMC4>;
-		reset-names = "sdmmc";
+		reset-names = "sdhci";
 		clocks = <&bpmp TEGRA186_CLK_SDMMC4>;
-		clock-names = "sdmmc";
 		interrupts = <GIC_SPI 31 0x04>;
 		status = "disabled";
 	};
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index f0a39a63c641..3d0845e31735 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -648,12 +648,12 @@  static int mmc_get_config(const void *blob, int node, struct mmc_host *host,
 		struct udevice dev;
 		int ret;
 		dev.of_offset = node;
-		ret = reset_get_by_name(&dev, "sdmmc", &host->reset_ctl);
+		ret = reset_get_by_name(&dev, "sdhci", &host->reset_ctl);
 		if (ret) {
-			debug("reset_get_by_index() failed: %d\n", ret);
+			debug("reset_get_by_name() failed: %d\n", ret);
 			return ret;
 		}
-		ret = clk_get_by_name(&dev, "sdmmc", &host->clk);
+		ret = clk_get_by_index(&dev, 0, &host->clk);
 		if (ret) {
 			debug("clk_get_by_index() failed: %d\n", ret);
 			return ret;