From: Pratyush Anand <pratyush.anand@st.com>
To: arnd@arndb.de, shiraz.hashim@st.com, viresh.linux@gmail.com
Cc: spear-devel@list.st.com, linux-pci@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org, olof@lixom.net,
Pratyush Anand <pratyush.anand@st.com>
Subject: [PATCH 07/15] SPEAr1340: Add PCIe auxdata for miphy clock initialization
Date: Mon, 29 Oct 2012 12:31:21 +0530 [thread overview]
Message-ID: <d35d2da48beb1ca1e476ec861e4f58fe541f4e3c.1351492562.git.pratyush.anand@st.com> (raw)
In-Reply-To: <cover.1351492562.git.pratyush.anand@st.com>
Miphy Clock initialization is very specific to controller and its
instances. Pass this custom function using auxdata.
Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
---
arch/arm/mach-spear13xx/spear1340.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-spear13xx/spear1340.c b/arch/arm/mach-spear13xx/spear1340.c
index 223d9ef..194c3ac 100644
--- a/arch/arm/mach-spear13xx/spear1340.c
+++ b/arch/arm/mach-spear13xx/spear1340.c
@@ -29,6 +29,7 @@
#include <asm/mach/arch.h>
#include <mach/dma.h>
#include <mach/generic.h>
+#include <mach/pcie.h>
#include <mach/spdif.h>
#include <mach/spear.h>
#include <sound/designware_i2s.h>
@@ -42,6 +43,7 @@
#define SPEAR1340_CAM2_BASE UL(0xD0400000)
#define SPEAR1340_CAM3_BASE UL(0xD0500000)
#define SPEAR1340_SATA_BASE UL(0xB1000000)
+#define SPEAR1340_PCIE_BASE UL(0xB1000000)
#define SPEAR1340_UART1_BASE UL(0xB4100000)
#define SPEAR1340_I2S_PLAY_BASE UL(0xB2400000)
#define SPEAR1340_I2S_REC_BASE UL(0xB2000000)
@@ -358,6 +360,28 @@ static struct ahci_platform_data sata_pdata = {
.resume = sata_resume,
};
+static int spear1340_pcie_clk_init(struct pcie_port *pp)
+{
+ writel(SPEAR1340_PCIE_SATA_MIPHY_CFG_PCIE,
+ SPEAR1340_PCIE_MIPHY_CFG);
+ writel(SPEAR1340_PCIE_CFG_VAL, SPEAR1340_PCIE_SATA_CFG);
+
+ return 0;
+}
+
+static int spear1340_pcie_clk_exit(struct pcie_port *pp)
+{
+ writel(0, SPEAR1340_PCIE_SATA_CFG);
+ writel(0, SPEAR1340_PCIE_MIPHY_CFG);
+
+ return 0;
+}
+
+static struct pcie_port_info pcie_pdata = {
+ .clk_init = spear1340_pcie_clk_init,
+ .clk_exit = spear1340_pcie_clk_exit,
+};
+
/* camera sensor registeration */
static struct i2c_board_info vs6725_camera_sensor_info = {
I2C_BOARD_INFO("vs6725", 0x10),
@@ -609,6 +633,8 @@ static struct of_dev_auxdata spear1340_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("snps,spear-ahci", SPEAR1340_SATA_BASE, NULL,
&sata_pdata),
+ OF_DEV_AUXDATA("st,pcie-host", SPEAR1340_PCIE_BASE, NULL,
+ &pcie_pdata),
OF_DEV_AUXDATA("arm,pl011", SPEAR1340_UART1_BASE, NULL, &uart1_data),
OF_DEV_AUXDATA("st,spear600-gmac", SPEAR13XX_GETH_BASE, NULL,
ð_data),
--
1.7.5.4
next prev parent reply other threads:[~2012-10-29 7:01 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 7:01 [PATCH 00/15] SPEAr13xx PCIe patches Pratyush Anand
2012-10-29 7:01 ` [PATCH 01/15] arm: source drivers/pci/pcie/kconfig Pratyush Anand
2012-10-29 7:01 ` [PATCH 02/15] arm: Call pcie_bus_configure_settings for pcie devices Pratyush Anand
2012-10-29 7:01 ` [PATCH 03/15] SPEAr13xx: Add mach/io.h Pratyush Anand
2012-10-29 7:29 ` viresh kumar
2012-10-29 8:11 ` Pratyush Anand
[not found] ` <508E3A2E.3000204-qxv4g6HH51o@public.gmane.org>
2012-10-30 21:45 ` Arnd Bergmann
2012-10-31 11:24 ` Pratyush Anand
2012-10-31 22:05 ` Arnd Bergmann
2012-10-29 7:01 ` [PATCH 04/15] SPEAr13xx: Add PCIe Root Complex driver support Pratyush Anand
2012-10-30 22:20 ` Arnd Bergmann
2012-10-31 11:24 ` Pratyush Anand
2012-10-31 22:00 ` Arnd Bergmann
2012-11-01 7:25 ` Pratyush Anand
2012-10-29 7:01 ` [PATCH 05/15] clk: SPEAr1340: Fix pcie0 clock name Pratyush Anand
2012-10-29 7:01 ` [PATCH 06/15] clk: SPEAr1310: Fix pcie " Pratyush Anand
2012-10-29 13:11 ` viresh kumar
2012-10-29 7:01 ` Pratyush Anand [this message]
2012-10-29 7:01 ` [PATCH 08/15] SPEAr1310: Add PCIe auxdata for miphy clock initialization Pratyush Anand
2012-10-30 21:57 ` Arnd Bergmann
2012-10-29 7:01 ` [PATCH 09/15] SPEAr13xx: dts: Fix PCIe core address ranges Pratyush Anand
2012-10-29 13:23 ` viresh kumar
2012-10-30 3:23 ` Pratyush Anand
2012-10-30 21:55 ` Arnd Bergmann
2012-10-31 11:24 ` Pratyush Anand
2012-10-29 7:01 ` [PATCH 10/15] SPEAr13xx: DTS: Add auxiliary data for PCIe host Pratyush Anand
2012-10-29 13:24 ` viresh kumar
2012-10-30 3:24 ` Pratyush Anand
2012-10-30 5:47 ` Viresh Kumar
2012-10-29 7:01 ` [PATCH 11/15] SPEAr1340-evb: dts: Enable PCIe0 Pratyush Anand
2012-10-29 7:01 ` [PATCH 12/15] SPEAr1310-EVB: DTS: Fix PCIe1 enable Pratyush Anand
2012-10-29 7:01 ` [PATCH 13/15] SPEAr13xx: update kconfig for PCIe selection Pratyush Anand
2012-10-29 13:33 ` viresh kumar
2012-10-30 3:25 ` Pratyush Anand
2012-10-29 7:01 ` [PATCH 14/15] SPEAR13xx: Update makefile for PCIe inclusion Pratyush Anand
2012-10-29 13:34 ` viresh kumar
2012-10-29 7:01 ` [PATCH 15/15] SPEAR13xx: update defconfig for PCIe compilation Pratyush Anand
2012-10-29 7:16 ` [PATCH 00/15] SPEAr13xx PCIe patches viresh kumar
2012-10-29 7:22 ` Pratyush Anand
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=d35d2da48beb1ca1e476ec861e4f58fe541f4e3c.1351492562.git.pratyush.anand@st.com \
--to=pratyush.anand@st.com \
--cc=arnd@arndb.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-pci@vger.kernel.org \
--cc=olof@lixom.net \
--cc=shiraz.hashim@st.com \
--cc=spear-devel@list.st.com \
--cc=viresh.linux@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).