All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mugunthan V N <mugunthanvnm@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/6] arm: omap-common: sata: prepare driver for DM conversion
Date: Mon, 18 Jan 2016 14:17:40 +0530	[thread overview]
Message-ID: <1453106863-18128-4-git-send-email-mugunthanvnm@ti.com> (raw)
In-Reply-To: <1453106863-18128-1-git-send-email-mugunthanvnm@ti.com>

Prepare sata driver for DM conversion by abstracting sata phy
init to seperate function.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
 arch/arm/cpu/armv7/omap-common/sata.c | 13 +++++++++----
 include/sata.h                        |  2 ++
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/sata.c b/arch/arm/cpu/armv7/omap-common/sata.c
index 0c82689..5ebd799 100644
--- a/arch/arm/cpu/armv7/omap-common/sata.c
+++ b/arch/arm/cpu/armv7/omap-common/sata.c
@@ -32,15 +32,20 @@ struct omap_pipe3 sata_phy = {
 	.dpll_map = dpll_map_sata,
 };
 
+int enable_sata_phy(void)
+{
+	sata_phy.power_reg = (void __iomem *)(*ctrl)->control_phy_power_sata;
+
+	/* Power up the PHY */
+	return phy_pipe3_power_on(&sata_phy);
+}
+
 int init_sata(int dev)
 {
 	int ret;
 	u32 val;
 
-	sata_phy.power_reg = (void __iomem *)(*ctrl)->control_phy_power_sata;
-
-	/* Power up the PHY */
-	phy_pipe3_power_on(&sata_phy);
+	enable_sata_phy();
 
 	/* Enable SATA module, No Idle, No Standby */
 	val = TI_SATA_IDLE_NO | TI_SATA_STANDBY_NO;
diff --git a/include/sata.h b/include/sata.h
index fa61da8..c2b5360 100644
--- a/include/sata.h
+++ b/include/sata.h
@@ -16,4 +16,6 @@ int sata_port_status(int dev, int port);
 
 extern block_dev_desc_t sata_dev_desc[];
 
+int enable_sata_phy(void);
+
 #endif
-- 
2.7.0.rc3

  parent reply	other threads:[~2016-01-18  8:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18  8:47 [U-Boot] [PATCH 0/6] driver model bring-up of sata device on dra72 and dra74 evm Mugunthan V N
2016-01-18  8:47 ` [U-Boot] [PATCH 1/6] arm: omap: sata: move enable sata clocks to enable_basic_clocks() Mugunthan V N
2016-01-19 18:09   ` Tom Rini
2016-01-18  8:47 ` [U-Boot] [PATCH 2/6] dm: implement a SATA uclass Mugunthan V N
2016-01-18  9:23   ` Bin Meng
2016-01-19  5:09     ` Mugunthan V N
2016-01-20  4:35       ` Simon Glass
2016-01-18  8:47 ` Mugunthan V N [this message]
2016-01-19 18:10   ` [U-Boot] [PATCH 3/6] arm: omap-common: sata: prepare driver for DM conversion Tom Rini
2016-01-18  8:47 ` [U-Boot] [PATCH 4/6] drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device Mugunthan V N
2016-01-19 18:11   ` Tom Rini
2016-01-18  8:47 ` [U-Boot] [PATCH 5/6] defconfig: dra74_evm: enable sata driver model Mugunthan V N
2016-01-19 18:11   ` Tom Rini
2016-01-18  8:47 ` [U-Boot] [PATCH 6/6] defconfig: dra72_evm: " Mugunthan V N
2016-01-19 18:11   ` Tom Rini

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=1453106863-18128-4-git-send-email-mugunthanvnm@ti.com \
    --to=mugunthanvnm@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.