public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Faiz Abbas <faiz_abbas@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/8] mmc: am654_sdhci: Get Xin clock by name
Date: Tue, 19 Nov 2019 13:49:18 +0530	[thread overview]
Message-ID: <20191119081925.19497-2-faiz_abbas@ti.com> (raw)
In-Reply-To: <20191119081925.19497-1-faiz_abbas@ti.com>

Get clk_xin by name instead of by index to avoid having to put clocks in
the same order in all devices.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
 arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 3 ++-
 drivers/mmc/am654_sdhci.c                    | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
index 8589f76d23..8147e34ce3 100644
--- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
@@ -25,7 +25,8 @@
 		compatible = "ti,am654-sdhci-5.1";
 		reg = <0x0 0x4FA0000 0x0 0x1000>,
 		      <0x0 0x4FB0000 0x0 0x400>;
-		clocks = <&k3_clks 48 1>;
+		clocks =<&k3_clks 48 0>, <&k3_clks 48 1>;
+		clock-names = "clk_ahb", "clk_xin";
 		power-domains = <&k3_pds 48 TI_SCI_PD_EXCLUSIVE>;
 		max-frequency = <25000000>;
 		ti,otap-del-sel = <0x2>;
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index 7cd5516197..a4359fcc18 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -223,7 +223,7 @@ static int am654_sdhci_probe(struct udevice *dev)
 	unsigned long clock;
 	int ret;
 
-	ret = clk_get_by_index(dev, 0, &clk);
+	ret = clk_get_by_name(dev, "clk_xin", &clk);
 	if (ret) {
 		dev_err(dev, "failed to get clock\n");
 		return ret;
-- 
2.19.2

  reply	other threads:[~2019-11-19  8:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19  8:19 [U-Boot] [PATCH 0/8] Add Support for MMC/SD in J721e Faiz Abbas
2019-11-19  8:19 ` Faiz Abbas [this message]
2019-11-19  8:19 ` [U-Boot] [PATCH 2/8] mmc: am654_sdhci: Add Support for configuring PHY " Faiz Abbas
2019-11-19  8:19 ` [U-Boot] [PATCH 3/8] arm: dts: k3-j721e-common-proc-board: Remove voltage-ranges from sdhci nodes Faiz Abbas
2019-11-19  8:19 ` [U-Boot] [PATCH 4/8] arm: dts: k3-j721e-common-proc-board: Add pinmux for SD card Faiz Abbas
2019-11-19  8:19 ` [U-Boot] [PATCH 5/8] configs: j721e_evm: Add configs for ADMA Support Faiz Abbas
2019-11-19  8:19 ` [U-Boot] [PATCH 6/8] configs: j721e_evm_a72: Enable FAT_WRITE Faiz Abbas
2019-11-19  8:19 ` [U-Boot] [PATCH 7/8] configs: j721e_evm_a72: Add Support for GPT partitions Faiz Abbas
2019-11-19  8:19 ` [U-Boot] [PATCH 8/8] configs: j721e_evm_r5: Add configs for environment in eMMC Faiz Abbas
2020-01-07 11:22 ` [PATCH 0/8] Add Support for MMC/SD in J721e Faiz Abbas
2020-01-08  1:14   ` Peng Fan
2020-01-10  8:03     ` Faiz Abbas
2020-01-16 13:16       ` Lokesh Vutla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191119081925.19497-2-faiz_abbas@ti.com \
    --to=faiz_abbas@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox