All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Jacques Hiblot <jjhiblot@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/11] arm: omap: sata: move enable sata clocks to enable_basic_clocks()
Date: Fri, 14 Apr 2017 13:07:59 +0200	[thread overview]
Message-ID: <1492168089-15437-2-git-send-email-jjhiblot@ti.com> (raw)
In-Reply-To: <1492168089-15437-1-git-send-email-jjhiblot@ti.com>

All the clocks which has to be enabled has to be done in
enable_basic_clocks(), so moving enable sata clock to common
clocks enable function.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/mach-omap2/omap5/hw_data.c | 12 ++++++++++++
 arch/arm/mach-omap2/sata.c          | 23 -----------------------
 2 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-omap2/omap5/hw_data.c b/arch/arm/mach-omap2/omap5/hw_data.c
index 5d956b5..a8a6b8a 100644
--- a/arch/arm/mach-omap2/omap5/hw_data.c
+++ b/arch/arm/mach-omap2/omap5/hw_data.c
@@ -361,6 +361,9 @@ void enable_basic_clocks(void)
 		(*prcm)->cm_l4per_gpio6_clkctrl,
 		(*prcm)->cm_l4per_gpio7_clkctrl,
 		(*prcm)->cm_l4per_gpio8_clkctrl,
+#ifdef CONFIG_SCSI_AHCI_PLAT
+		(*prcm)->cm_l3init_ocp2scp3_clkctrl,
+#endif
 		0
 	};
 
@@ -379,6 +382,9 @@ void enable_basic_clocks(void)
 #ifdef CONFIG_TI_QSPI
 		(*prcm)->cm_l4per_qspi_clkctrl,
 #endif
+#ifdef CONFIG_SCSI_AHCI_PLAT
+		(*prcm)->cm_l3init_sata_clkctrl,
+#endif
 		0
 	};
 
@@ -411,6 +417,12 @@ void enable_basic_clocks(void)
 	setbits_le32((*prcm)->cm_l4per_qspi_clkctrl, (1<<24));
 #endif
 
+#ifdef CONFIG_SCSI_AHCI_PLAT
+	/* Enable optional functional clock for SATA */
+	setbits_le32((*prcm)->cm_l3init_sata_clkctrl,
+		     SATA_CLKCTRL_OPTFCLKEN_MASK);
+#endif
+
 	/* Enable SCRM OPT clocks for PER and CORE dpll */
 	setbits_le32((*prcm)->cm_wkupaon_scrm_clkctrl,
 			OPTFCLKEN_SCRM_PER_MASK);
diff --git a/arch/arm/mach-omap2/sata.c b/arch/arm/mach-omap2/sata.c
index 2c2d1bc..0c82689 100644
--- a/arch/arm/mach-omap2/sata.c
+++ b/arch/arm/mach-omap2/sata.c
@@ -37,29 +37,6 @@ int init_sata(int dev)
 	int ret;
 	u32 val;
 
-	u32 const clk_domains_sata[] = {
-		0
-	};
-
-	u32 const clk_modules_hw_auto_sata[] = {
-		(*prcm)->cm_l3init_ocp2scp3_clkctrl,
-		0
-	};
-
-	u32 const clk_modules_explicit_en_sata[] = {
-		(*prcm)->cm_l3init_sata_clkctrl,
-		0
-	};
-
-	do_enable_clocks(clk_domains_sata,
-			 clk_modules_hw_auto_sata,
-			 clk_modules_explicit_en_sata,
-			 0);
-
-	/* Enable optional functional clock for SATA */
-	setbits_le32((*prcm)->cm_l3init_sata_clkctrl,
-		     SATA_CLKCTRL_OPTFCLKEN_MASK);
-
 	sata_phy.power_reg = (void __iomem *)(*ctrl)->control_phy_power_sata;
 
 	/* Power up the PHY */
-- 
1.9.1

  reply	other threads:[~2017-04-14 11:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-14 11:07 [U-Boot] [PATCH 00/11] OMAP: Move SATA to use block driver model Jean-Jacques Hiblot
2017-04-14 11:07 ` Jean-Jacques Hiblot [this message]
2017-04-14 11:08 ` [U-Boot] [PATCH 02/11] arm: omap: sata: compile out board-level sata code when CONFIG_DM_SCSI is defined Jean-Jacques Hiblot
2017-04-14 11:08 ` [U-Boot] [PATCH 03/11] drivers: phy: add generic PHY framework Jean-Jacques Hiblot
2017-04-15 17:10   ` Simon Glass
2017-04-18 13:32     ` Jean-Jacques Hiblot
2017-04-19  0:12       ` Simon Glass
2017-04-14 11:08 ` [U-Boot] [PATCH 04/11] dm: test: Add tests for the generic PHY uclass Jean-Jacques Hiblot
2017-04-15 17:10   ` Simon Glass
2017-04-14 11:08 ` [U-Boot] [PATCH 05/11] drivers: phy: add PIPE3 phy driver Jean-Jacques Hiblot
2017-04-14 11:08 ` [U-Boot] [PATCH 06/11] dra7: dtsi: mark ocp2scp bus compatible with "simple-bus" Jean-Jacques Hiblot
2017-04-14 20:06   ` Tom Rini
2017-04-14 11:08 ` [U-Boot] [PATCH 07/11] drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device Jean-Jacques Hiblot
2017-04-14 11:08 ` [U-Boot] [PATCH 08/11] scsi: make the LUN a parameter of scsi_detect_dev() Jean-Jacques Hiblot
2017-04-14 11:08 ` [U-Boot] [PATCH 09/11] scsi: move the partition initialization out of the scsi detection Jean-Jacques Hiblot
2017-04-14 11:08 ` [U-Boot] [PATCH 10/11] dm: scsi: fix divide-by-0 error in scsi_scan() Jean-Jacques Hiblot
2017-04-14 11:08 ` [U-Boot] [PATCH 11/11] defconfig: dra7xx_evm: enable CONFIG_BLK and disk driver model for SCSI Jean-Jacques Hiblot
2017-04-14 11:13 ` [U-Boot] [PATCH 00/11] OMAP: Move SATA to use block driver model Jean-Jacques Hiblot

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=1492168089-15437-2-git-send-email-jjhiblot@ti.com \
    --to=jjhiblot@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.