All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 0/2] sata_rcar: Add Gen2 PHY support and document existing DT bindings
@ 2013-11-08 12:09 ` Valentine Barshak
  0 siblings, 0 replies; 26+ messages in thread
From: Valentine Barshak @ 2013-11-08 12:09 UTC (permalink / raw)
  To: linux-sh, linux-ide, devicetree
  Cc: Simon Horman, Magnus Damm, Kuninori Morimoto, Laurent Pinchart,
	Guennadi Liakhovetski, Kumar Gala, Tejun Heo, Vladimir Barinov,
	Sergei Shtylyov, Mark Rutland

This adds SATA R-Car Gen2 PHY support and documents existing DT bindings.

Changes in version 2:
* Minor whitespace clean-up to make both array terminators "{ },".

Changes in version 3:
* Used "address" instead of "offset" in DT bindings documentation
* Used "IRQ_TYPE_LEVEL_HIGH" instead of "0x4" in DT bindings documentation

Valentine Barshak (2):
  sata_rcar: Add R-Car Gen2 SATA PHY support
  dt: Document sata_rcar bindings

 .../devicetree/bindings/ata/sata_rcar.txt          |  18 ++++
 drivers/ata/sata_rcar.c                            | 118 ++++++++++++++++++---
 2 files changed, 120 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH V3 0/2] sata_rcar: Add Gen2 PHY support and document existing DT bindings
@ 2013-11-08 12:09 ` Valentine Barshak
  0 siblings, 0 replies; 26+ messages in thread
From: Valentine Barshak @ 2013-11-08 12:09 UTC (permalink / raw)
  To: linux-sh, linux-ide, devicetree
  Cc: Simon Horman, Magnus Damm, Kuninori Morimoto, Laurent Pinchart,
	Guennadi Liakhovetski, Kumar Gala, Tejun Heo, Vladimir Barinov,
	Sergei Shtylyov, Mark Rutland

This adds SATA R-Car Gen2 PHY support and documents existing DT bindings.

Changes in version 2:
* Minor whitespace clean-up to make both array terminators "{ },".

Changes in version 3:
* Used "address" instead of "offset" in DT bindings documentation
* Used "IRQ_TYPE_LEVEL_HIGH" instead of "0x4" in DT bindings documentation

Valentine Barshak (2):
  sata_rcar: Add R-Car Gen2 SATA PHY support
  dt: Document sata_rcar bindings

 .../devicetree/bindings/ata/sata_rcar.txt          |  18 ++++
 drivers/ata/sata_rcar.c                            | 118 ++++++++++++++++++---
 2 files changed, 120 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
  2013-11-08 12:09 ` Valentine Barshak
@ 2013-11-08 12:09   ` Valentine Barshak
  -1 siblings, 0 replies; 26+ messages in thread
From: Valentine Barshak @ 2013-11-08 12:09 UTC (permalink / raw)
  To: linux-sh, linux-ide, devicetree
  Cc: Simon Horman, Magnus Damm, Kuninori Morimoto, Laurent Pinchart,
	Guennadi Liakhovetski, Kumar Gala, Tejun Heo, Vladimir Barinov,
	Sergei Shtylyov, Mark Rutland

R-Car Gen2 SoCs have a different PHY which is not compatible
with the older R-Car H1 (R8A7779) version.
This adds OF/platform device id tables and PHY initialization
callbacks for the following Gen2 SoCs:
  * R-Car H2: R8A7790;
  * R-Car M2: R8A7791.

PHY initialization method is chosen based on the device id.
Default PHY settings are applied for Gen2 SoCs, which should
suit the Gen2 boards available.

While at it, this also adds "sata-r8a7779" compatibility string
for R8A7779 SATA, while keeping the old one for compatibility.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
---
 drivers/ata/sata_rcar.c | 118 +++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 102 insertions(+), 16 deletions(-)

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index c2d95e9..231559f 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -15,6 +15,7 @@
 #include <linux/module.h>
 #include <linux/ata.h>
 #include <linux/libata.h>
+#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/err.h>
@@ -123,12 +124,37 @@
 
 #define SATA_RCAR_DMA_BOUNDARY		0x1FFFFFFEUL
 
+/* Gen2 Physical Layer Control Registers */
+#define RCAR_GEN2_PHY_CTL1_REG		0x1704
+#define RCAR_GEN2_PHY_CTL1		0x34180002
+#define RCAR_GEN2_PHY_CTL1_SS		0xC180	/* Spread Spectrum */
+
+#define RCAR_GEN2_PHY_CTL2_REG		0x170C
+#define RCAR_GEN2_PHY_CTL2		0x00002303
+
+#define RCAR_GEN2_PHY_CTL3_REG		0x171C
+#define RCAR_GEN2_PHY_CTL3		0x000B0194
+
+#define RCAR_GEN2_PHY_CTL4_REG		0x1724
+#define RCAR_GEN2_PHY_CTL4		0x00030994
+
+#define RCAR_GEN2_PHY_CTL5_REG		0x1740
+#define RCAR_GEN2_PHY_CTL5		0x03004001
+#define RCAR_GEN2_PHY_CTL5_DC		BIT(1)	/* DC connection */
+#define RCAR_GEN2_PHY_CTL5_TR		BIT(2)	/* Termination Resistor */
+
+enum sata_rcar_type {
+	RCAR_GEN1_SATA,
+	RCAR_GEN2_SATA,
+};
+
 struct sata_rcar_priv {
 	void __iomem *base;
 	struct clk *clk;
+	enum sata_rcar_type type;
 };
 
-static void sata_rcar_phy_initialize(struct sata_rcar_priv *priv)
+static void sata_rcar_gen1_phy_preinit(struct sata_rcar_priv *priv)
 {
 	void __iomem *base = priv->base;
 
@@ -141,8 +167,8 @@ static void sata_rcar_phy_initialize(struct sata_rcar_priv *priv)
 	iowrite32(0, base + SATAPHYRESET_REG);
 }
 
-static void sata_rcar_phy_write(struct sata_rcar_priv *priv, u16 reg, u32 val,
-				int group)
+static void sata_rcar_gen1_phy_write(struct sata_rcar_priv *priv, u16 reg,
+				     u32 val, int group)
 {
 	void __iomem *base = priv->base;
 	int timeout;
@@ -170,6 +196,29 @@ static void sata_rcar_phy_write(struct sata_rcar_priv *priv, u16 reg, u32 val,
 	iowrite32(0, base + SATAPHYADDR_REG);
 }
 
+static void sata_rcar_gen1_phy_init(struct sata_rcar_priv *priv)
+{
+	sata_rcar_gen1_phy_preinit(priv);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 0);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 1);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR3_REG, 0x0000A061, 0);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 0);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 1);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR4_REG, 0x28E80000, 0);
+}
+
+static void sata_rcar_gen2_phy_init(struct sata_rcar_priv *priv)
+{
+	void __iomem *base = priv->base;
+
+	iowrite32(RCAR_GEN2_PHY_CTL1, base + RCAR_GEN2_PHY_CTL1_REG);
+	iowrite32(RCAR_GEN2_PHY_CTL2, base + RCAR_GEN2_PHY_CTL2_REG);
+	iowrite32(RCAR_GEN2_PHY_CTL3, base + RCAR_GEN2_PHY_CTL3_REG);
+	iowrite32(RCAR_GEN2_PHY_CTL4, base + RCAR_GEN2_PHY_CTL4_REG);
+	iowrite32(RCAR_GEN2_PHY_CTL5 | RCAR_GEN2_PHY_CTL5_DC |
+		  RCAR_GEN2_PHY_CTL5_TR, base + RCAR_GEN2_PHY_CTL5_REG);
+}
+
 static void sata_rcar_freeze(struct ata_port *ap)
 {
 	struct sata_rcar_priv *priv = ap->host->private_data;
@@ -738,13 +787,17 @@ static void sata_rcar_init_controller(struct ata_host *host)
 	u32 val;
 
 	/* reset and setup phy */
-	sata_rcar_phy_initialize(priv);
-	sata_rcar_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 0);
-	sata_rcar_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 1);
-	sata_rcar_phy_write(priv, SATAPCTLR3_REG, 0x0000A061, 0);
-	sata_rcar_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 0);
-	sata_rcar_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 1);
-	sata_rcar_phy_write(priv, SATAPCTLR4_REG, 0x28E80000, 0);
+	switch (priv->type) {
+	case RCAR_GEN1_SATA:
+		sata_rcar_gen1_phy_init(priv);
+		break;
+	case RCAR_GEN2_SATA:
+		sata_rcar_gen2_phy_init(priv);
+		break;
+	default:
+		dev_warn(host->dev, "SATA phy is not initialized\n");
+		break;
+	}
 
 	/* SATA-IP reset state */
 	val = ioread32(base + ATAPI_CONTROL1_REG);
@@ -770,8 +823,40 @@ static void sata_rcar_init_controller(struct ata_host *host)
 	iowrite32(ATAPI_INT_ENABLE_SATAINT, base + ATAPI_INT_ENABLE_REG);
 }
 
+static struct of_device_id sata_rcar_match[] = {
+	{
+		/* Deprecated by "renesas,sata-r8a7779" */
+		.compatible = "renesas,rcar-sata",
+		.data = (void *)RCAR_GEN1_SATA,
+	},
+	{
+		.compatible = "renesas,sata-r8a7779",
+		.data = (void *)RCAR_GEN1_SATA,
+	},
+	{
+		.compatible = "renesas,sata-r8a7790",
+		.data = (void *)RCAR_GEN2_SATA
+	},
+	{
+		.compatible = "renesas,sata-r8a7791",
+		.data = (void *)RCAR_GEN2_SATA
+	},
+	{ },
+};
+MODULE_DEVICE_TABLE(of, sata_rcar_match);
+
+static const struct platform_device_id sata_rcar_id_table[] = {
+	{ "sata_rcar", RCAR_GEN1_SATA }, /* Deprecated by "sata-r8a7779" */
+	{ "sata-r8a7779", RCAR_GEN1_SATA },
+	{ "sata-r8a7790", RCAR_GEN2_SATA },
+	{ "sata-r8a7791", RCAR_GEN2_SATA },
+	{ },
+};
+MODULE_DEVICE_TABLE(platform, sata_rcar_id_table);
+
 static int sata_rcar_probe(struct platform_device *pdev)
 {
+	const struct of_device_id *of_id;
 	struct ata_host *host;
 	struct sata_rcar_priv *priv;
 	struct resource *mem;
@@ -787,6 +872,12 @@ static int sata_rcar_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
+	of_id = of_match_device(sata_rcar_match, &pdev->dev);
+	if (of_id)
+		priv->type = (enum sata_rcar_type)of_id->data;
+	else
+		priv->type = platform_get_device_id(pdev)->driver_data;
+
 	priv->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(priv->clk)) {
 		dev_err(&pdev->dev, "failed to get access to sata clock\n");
@@ -892,15 +983,10 @@ static const struct dev_pm_ops sata_rcar_pm_ops = {
 };
 #endif
 
-static struct of_device_id sata_rcar_match[] = {
-	{ .compatible = "renesas,rcar-sata", },
-	{},
-};
-MODULE_DEVICE_TABLE(of, sata_rcar_match);
-
 static struct platform_driver sata_rcar_driver = {
 	.probe		= sata_rcar_probe,
 	.remove		= sata_rcar_remove,
+	.id_table	= sata_rcar_id_table,
 	.driver = {
 		.name		= DRV_NAME,
 		.owner		= THIS_MODULE,
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
@ 2013-11-08 12:09   ` Valentine Barshak
  0 siblings, 0 replies; 26+ messages in thread
From: Valentine Barshak @ 2013-11-08 12:09 UTC (permalink / raw)
  To: linux-sh, linux-ide, devicetree
  Cc: Simon Horman, Magnus Damm, Kuninori Morimoto, Laurent Pinchart,
	Guennadi Liakhovetski, Kumar Gala, Tejun Heo, Vladimir Barinov,
	Sergei Shtylyov, Mark Rutland

R-Car Gen2 SoCs have a different PHY which is not compatible
with the older R-Car H1 (R8A7779) version.
This adds OF/platform device id tables and PHY initialization
callbacks for the following Gen2 SoCs:
  * R-Car H2: R8A7790;
  * R-Car M2: R8A7791.

PHY initialization method is chosen based on the device id.
Default PHY settings are applied for Gen2 SoCs, which should
suit the Gen2 boards available.

While at it, this also adds "sata-r8a7779" compatibility string
for R8A7779 SATA, while keeping the old one for compatibility.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
---
 drivers/ata/sata_rcar.c | 118 +++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 102 insertions(+), 16 deletions(-)

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index c2d95e9..231559f 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -15,6 +15,7 @@
 #include <linux/module.h>
 #include <linux/ata.h>
 #include <linux/libata.h>
+#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/err.h>
@@ -123,12 +124,37 @@
 
 #define SATA_RCAR_DMA_BOUNDARY		0x1FFFFFFEUL
 
+/* Gen2 Physical Layer Control Registers */
+#define RCAR_GEN2_PHY_CTL1_REG		0x1704
+#define RCAR_GEN2_PHY_CTL1		0x34180002
+#define RCAR_GEN2_PHY_CTL1_SS		0xC180	/* Spread Spectrum */
+
+#define RCAR_GEN2_PHY_CTL2_REG		0x170C
+#define RCAR_GEN2_PHY_CTL2		0x00002303
+
+#define RCAR_GEN2_PHY_CTL3_REG		0x171C
+#define RCAR_GEN2_PHY_CTL3		0x000B0194
+
+#define RCAR_GEN2_PHY_CTL4_REG		0x1724
+#define RCAR_GEN2_PHY_CTL4		0x00030994
+
+#define RCAR_GEN2_PHY_CTL5_REG		0x1740
+#define RCAR_GEN2_PHY_CTL5		0x03004001
+#define RCAR_GEN2_PHY_CTL5_DC		BIT(1)	/* DC connection */
+#define RCAR_GEN2_PHY_CTL5_TR		BIT(2)	/* Termination Resistor */
+
+enum sata_rcar_type {
+	RCAR_GEN1_SATA,
+	RCAR_GEN2_SATA,
+};
+
 struct sata_rcar_priv {
 	void __iomem *base;
 	struct clk *clk;
+	enum sata_rcar_type type;
 };
 
-static void sata_rcar_phy_initialize(struct sata_rcar_priv *priv)
+static void sata_rcar_gen1_phy_preinit(struct sata_rcar_priv *priv)
 {
 	void __iomem *base = priv->base;
 
@@ -141,8 +167,8 @@ static void sata_rcar_phy_initialize(struct sata_rcar_priv *priv)
 	iowrite32(0, base + SATAPHYRESET_REG);
 }
 
-static void sata_rcar_phy_write(struct sata_rcar_priv *priv, u16 reg, u32 val,
-				int group)
+static void sata_rcar_gen1_phy_write(struct sata_rcar_priv *priv, u16 reg,
+				     u32 val, int group)
 {
 	void __iomem *base = priv->base;
 	int timeout;
@@ -170,6 +196,29 @@ static void sata_rcar_phy_write(struct sata_rcar_priv *priv, u16 reg, u32 val,
 	iowrite32(0, base + SATAPHYADDR_REG);
 }
 
+static void sata_rcar_gen1_phy_init(struct sata_rcar_priv *priv)
+{
+	sata_rcar_gen1_phy_preinit(priv);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 0);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 1);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR3_REG, 0x0000A061, 0);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 0);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 1);
+	sata_rcar_gen1_phy_write(priv, SATAPCTLR4_REG, 0x28E80000, 0);
+}
+
+static void sata_rcar_gen2_phy_init(struct sata_rcar_priv *priv)
+{
+	void __iomem *base = priv->base;
+
+	iowrite32(RCAR_GEN2_PHY_CTL1, base + RCAR_GEN2_PHY_CTL1_REG);
+	iowrite32(RCAR_GEN2_PHY_CTL2, base + RCAR_GEN2_PHY_CTL2_REG);
+	iowrite32(RCAR_GEN2_PHY_CTL3, base + RCAR_GEN2_PHY_CTL3_REG);
+	iowrite32(RCAR_GEN2_PHY_CTL4, base + RCAR_GEN2_PHY_CTL4_REG);
+	iowrite32(RCAR_GEN2_PHY_CTL5 | RCAR_GEN2_PHY_CTL5_DC |
+		  RCAR_GEN2_PHY_CTL5_TR, base + RCAR_GEN2_PHY_CTL5_REG);
+}
+
 static void sata_rcar_freeze(struct ata_port *ap)
 {
 	struct sata_rcar_priv *priv = ap->host->private_data;
@@ -738,13 +787,17 @@ static void sata_rcar_init_controller(struct ata_host *host)
 	u32 val;
 
 	/* reset and setup phy */
-	sata_rcar_phy_initialize(priv);
-	sata_rcar_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 0);
-	sata_rcar_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 1);
-	sata_rcar_phy_write(priv, SATAPCTLR3_REG, 0x0000A061, 0);
-	sata_rcar_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 0);
-	sata_rcar_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 1);
-	sata_rcar_phy_write(priv, SATAPCTLR4_REG, 0x28E80000, 0);
+	switch (priv->type) {
+	case RCAR_GEN1_SATA:
+		sata_rcar_gen1_phy_init(priv);
+		break;
+	case RCAR_GEN2_SATA:
+		sata_rcar_gen2_phy_init(priv);
+		break;
+	default:
+		dev_warn(host->dev, "SATA phy is not initialized\n");
+		break;
+	}
 
 	/* SATA-IP reset state */
 	val = ioread32(base + ATAPI_CONTROL1_REG);
@@ -770,8 +823,40 @@ static void sata_rcar_init_controller(struct ata_host *host)
 	iowrite32(ATAPI_INT_ENABLE_SATAINT, base + ATAPI_INT_ENABLE_REG);
 }
 
+static struct of_device_id sata_rcar_match[] = {
+	{
+		/* Deprecated by "renesas,sata-r8a7779" */
+		.compatible = "renesas,rcar-sata",
+		.data = (void *)RCAR_GEN1_SATA,
+	},
+	{
+		.compatible = "renesas,sata-r8a7779",
+		.data = (void *)RCAR_GEN1_SATA,
+	},
+	{
+		.compatible = "renesas,sata-r8a7790",
+		.data = (void *)RCAR_GEN2_SATA
+	},
+	{
+		.compatible = "renesas,sata-r8a7791",
+		.data = (void *)RCAR_GEN2_SATA
+	},
+	{ },
+};
+MODULE_DEVICE_TABLE(of, sata_rcar_match);
+
+static const struct platform_device_id sata_rcar_id_table[] = {
+	{ "sata_rcar", RCAR_GEN1_SATA }, /* Deprecated by "sata-r8a7779" */
+	{ "sata-r8a7779", RCAR_GEN1_SATA },
+	{ "sata-r8a7790", RCAR_GEN2_SATA },
+	{ "sata-r8a7791", RCAR_GEN2_SATA },
+	{ },
+};
+MODULE_DEVICE_TABLE(platform, sata_rcar_id_table);
+
 static int sata_rcar_probe(struct platform_device *pdev)
 {
+	const struct of_device_id *of_id;
 	struct ata_host *host;
 	struct sata_rcar_priv *priv;
 	struct resource *mem;
@@ -787,6 +872,12 @@ static int sata_rcar_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
+	of_id = of_match_device(sata_rcar_match, &pdev->dev);
+	if (of_id)
+		priv->type = (enum sata_rcar_type)of_id->data;
+	else
+		priv->type = platform_get_device_id(pdev)->driver_data;
+
 	priv->clk = devm_clk_get(&pdev->dev, NULL);
 	if (IS_ERR(priv->clk)) {
 		dev_err(&pdev->dev, "failed to get access to sata clock\n");
@@ -892,15 +983,10 @@ static const struct dev_pm_ops sata_rcar_pm_ops = {
 };
 #endif
 
-static struct of_device_id sata_rcar_match[] = {
-	{ .compatible = "renesas,rcar-sata", },
-	{},
-};
-MODULE_DEVICE_TABLE(of, sata_rcar_match);
-
 static struct platform_driver sata_rcar_driver = {
 	.probe		= sata_rcar_probe,
 	.remove		= sata_rcar_remove,
+	.id_table	= sata_rcar_id_table,
 	.driver = {
 		.name		= DRV_NAME,
 		.owner		= THIS_MODULE,
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V3 2/2] dt: Document sata_rcar bindings
  2013-11-08 12:09 ` Valentine Barshak
@ 2013-11-08 12:09   ` Valentine Barshak
  -1 siblings, 0 replies; 26+ messages in thread
From: Valentine Barshak @ 2013-11-08 12:09 UTC (permalink / raw)
  To: linux-sh, linux-ide, devicetree
  Cc: Simon Horman, Magnus Damm, Kuninori Morimoto, Laurent Pinchart,
	Guennadi Liakhovetski, Kumar Gala, Tejun Heo, Vladimir Barinov,
	Sergei Shtylyov, Mark Rutland

These bindings can be used to register SATA devices found on R-Car SoC.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
---
 Documentation/devicetree/bindings/ata/sata_rcar.txt | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt

diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt
new file mode 100644
index 0000000..1e61113
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
@@ -0,0 +1,18 @@
+* Renesas R-Car SATA
+
+Required properties:
+- compatible		: should contain one of the following:
+			  - "renesas,sata-r8a7779" for R-Car H1
+			  - "renesas,sata-r8a7790" for R-Car H2
+			  - "renesas,sata-r8a7791" for R-Car M2
+- reg			: address and length of the SATA registers;
+- interrupts		: must consist of one interrupt specifier.
+
+Example:
+
+sata: sata@fc600000 {
+	compatible = "renesas,sata-r8a7779";
+	reg = <0xfc600000 0x2000>;
+	interrupt-parent = <&gic>;
+	interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
+};
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V3 2/2] dt: Document sata_rcar bindings
@ 2013-11-08 12:09   ` Valentine Barshak
  0 siblings, 0 replies; 26+ messages in thread
From: Valentine Barshak @ 2013-11-08 12:09 UTC (permalink / raw)
  To: linux-sh, linux-ide, devicetree
  Cc: Simon Horman, Magnus Damm, Kuninori Morimoto, Laurent Pinchart,
	Guennadi Liakhovetski, Kumar Gala, Tejun Heo, Vladimir Barinov,
	Sergei Shtylyov, Mark Rutland

These bindings can be used to register SATA devices found on R-Car SoC.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
---
 Documentation/devicetree/bindings/ata/sata_rcar.txt | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt

diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt
new file mode 100644
index 0000000..1e61113
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
@@ -0,0 +1,18 @@
+* Renesas R-Car SATA
+
+Required properties:
+- compatible		: should contain one of the following:
+			  - "renesas,sata-r8a7779" for R-Car H1
+			  - "renesas,sata-r8a7790" for R-Car H2
+			  - "renesas,sata-r8a7791" for R-Car M2
+- reg			: address and length of the SATA registers;
+- interrupts		: must consist of one interrupt specifier.
+
+Example:
+
+sata: sata@fc600000 {
+	compatible = "renesas,sata-r8a7779";
+	reg = <0xfc600000 0x2000>;
+	interrupt-parent = <&gic>;
+	interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
+};
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 2/2] dt: Document sata_rcar bindings
  2013-11-08 12:09   ` Valentine Barshak
@ 2013-11-08 14:26     ` Kumar Gala
  -1 siblings, 0 replies; 26+ messages in thread
From: Kumar Gala @ 2013-11-08 14:26 UTC (permalink / raw)
  To: Valentine Barshak
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Tejun Heo, Vladimir Barinov, Sergei Shtylyov, Mark Rutland


On Nov 8, 2013, at 6:09 AM, Valentine Barshak wrote:

> These bindings can be used to register SATA devices found on R-Car SoC.
> 
> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> ---
> Documentation/devicetree/bindings/ata/sata_rcar.txt | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt
> 
> diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> new file mode 100644
> index 0000000..1e61113
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> @@ -0,0 +1,18 @@
> +* Renesas R-Car SATA
> +
> +Required properties:
> +- compatible		: should contain one of the following:
> +			  - "renesas,sata-r8a7779" for R-Car H1
> +			  - "renesas,sata-r8a7790" for R-Car H2
> +			  - "renesas,sata-r8a7791" for R-Car M2
> +- reg			: address and length of the SATA registers;
> +- interrupts		: must consist of one interrupt specifier.
> +
> +Example:
> +
> +sata: sata@fc600000 {
> +	compatible = "renesas,sata-r8a7779";
> +	reg = <0xfc600000 0x2000>;
> +	interrupt-parent = <&gic>;
> +	interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;

Sorry, I missed the discussion on this, but I think it would be better in the example to leave this as 4.  There is no reference in the binding at all to figure out where IRQ_TYPE_LEVEL_HIGH is defined.

> +};
> -- 
> 1.8.3.1
> 

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 2/2] dt: Document sata_rcar bindings
@ 2013-11-08 14:26     ` Kumar Gala
  0 siblings, 0 replies; 26+ messages in thread
From: Kumar Gala @ 2013-11-08 14:26 UTC (permalink / raw)
  To: Valentine Barshak
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Tejun Heo, Vladimir Barinov, Sergei Shtylyov, Mark Rutland


On Nov 8, 2013, at 6:09 AM, Valentine Barshak wrote:

> These bindings can be used to register SATA devices found on R-Car SoC.
> 
> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> ---
> Documentation/devicetree/bindings/ata/sata_rcar.txt | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt
> 
> diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> new file mode 100644
> index 0000000..1e61113
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> @@ -0,0 +1,18 @@
> +* Renesas R-Car SATA
> +
> +Required properties:
> +- compatible		: should contain one of the following:
> +			  - "renesas,sata-r8a7779" for R-Car H1
> +			  - "renesas,sata-r8a7790" for R-Car H2
> +			  - "renesas,sata-r8a7791" for R-Car M2
> +- reg			: address and length of the SATA registers;
> +- interrupts		: must consist of one interrupt specifier.
> +
> +Example:
> +
> +sata: sata@fc600000 {
> +	compatible = "renesas,sata-r8a7779";
> +	reg = <0xfc600000 0x2000>;
> +	interrupt-parent = <&gic>;
> +	interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;

Sorry, I missed the discussion on this, but I think it would be better in the example to leave this as 4.  There is no reference in the binding at all to figure out where IRQ_TYPE_LEVEL_HIGH is defined.

> +};
> -- 
> 1.8.3.1
> 

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 2/2] dt: Document sata_rcar bindings
  2013-11-08 14:26     ` Kumar Gala
@ 2013-11-08 14:30       ` Laurent Pinchart
  -1 siblings, 0 replies; 26+ messages in thread
From: Laurent Pinchart @ 2013-11-08 14:30 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Valentine Barshak, linux-sh, linux-ide, devicetree, Simon Horman,
	Magnus Damm, Kuninori Morimoto, Guennadi Liakhovetski, Tejun Heo,
	Vladimir Barinov, Sergei Shtylyov, Mark Rutland

Hi Kumar,

On Friday 08 November 2013 08:26:47 Kumar Gala wrote:
> On Nov 8, 2013, at 6:09 AM, Valentine Barshak wrote:
> > These bindings can be used to register SATA devices found on R-Car SoC.
> > 
> > Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> > ---
> > Documentation/devicetree/bindings/ata/sata_rcar.txt | 18 +++++++++++++++++
> > 1 file changed, 18 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt
> > b/Documentation/devicetree/bindings/ata/sata_rcar.txt new file mode
> > 100644
> > index 0000000..1e61113
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> > @@ -0,0 +1,18 @@
> > +* Renesas R-Car SATA
> > +
> > +Required properties:
> > +- compatible		: should contain one of the following:
> > +			  - "renesas,sata-r8a7779" for R-Car H1
> > +			  - "renesas,sata-r8a7790" for R-Car H2
> > +			  - "renesas,sata-r8a7791" for R-Car M2
> > +- reg			: address and length of the SATA registers;
> > +- interrupts		: must consist of one interrupt specifier.
> > +
> > +Example:
> > +
> > +sata: sata@fc600000 {
> > +	compatible = "renesas,sata-r8a7779";
> > +	reg = <0xfc600000 0x2000>;
> > +	interrupt-parent = <&gic>;
> > +	interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
> 
> Sorry, I missed the discussion on this, but I think it would be better in
> the example to leave this as 4.  There is no reference in the binding at
> all to figure out where IRQ_TYPE_LEVEL_HIGH is defined.

Then I'd rather reference the interrupts binding document, otherwise people 
will blindly write device tree sources with 4 instead of IRQ_TYPE_LEVEL_HIGH, 
which I don't want to encourage.

> > +};
-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 2/2] dt: Document sata_rcar bindings
@ 2013-11-08 14:30       ` Laurent Pinchart
  0 siblings, 0 replies; 26+ messages in thread
From: Laurent Pinchart @ 2013-11-08 14:30 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Valentine Barshak, linux-sh, linux-ide, devicetree, Simon Horman,
	Magnus Damm, Kuninori Morimoto, Guennadi Liakhovetski, Tejun Heo,
	Vladimir Barinov, Sergei Shtylyov, Mark Rutland

Hi Kumar,

On Friday 08 November 2013 08:26:47 Kumar Gala wrote:
> On Nov 8, 2013, at 6:09 AM, Valentine Barshak wrote:
> > These bindings can be used to register SATA devices found on R-Car SoC.
> > 
> > Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> > ---
> > Documentation/devicetree/bindings/ata/sata_rcar.txt | 18 +++++++++++++++++
> > 1 file changed, 18 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt
> > b/Documentation/devicetree/bindings/ata/sata_rcar.txt new file mode
> > 100644
> > index 0000000..1e61113
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> > @@ -0,0 +1,18 @@
> > +* Renesas R-Car SATA
> > +
> > +Required properties:
> > +- compatible		: should contain one of the following:
> > +			  - "renesas,sata-r8a7779" for R-Car H1
> > +			  - "renesas,sata-r8a7790" for R-Car H2
> > +			  - "renesas,sata-r8a7791" for R-Car M2
> > +- reg			: address and length of the SATA registers;
> > +- interrupts		: must consist of one interrupt specifier.
> > +
> > +Example:
> > +
> > +sata: sata@fc600000 {
> > +	compatible = "renesas,sata-r8a7779";
> > +	reg = <0xfc600000 0x2000>;
> > +	interrupt-parent = <&gic>;
> > +	interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
> 
> Sorry, I missed the discussion on this, but I think it would be better in
> the example to leave this as 4.  There is no reference in the binding at
> all to figure out where IRQ_TYPE_LEVEL_HIGH is defined.

Then I'd rather reference the interrupts binding document, otherwise people 
will blindly write device tree sources with 4 instead of IRQ_TYPE_LEVEL_HIGH, 
which I don't want to encourage.

> > +};
-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 2/2] dt: Document sata_rcar bindings
  2013-11-08 14:30       ` Laurent Pinchart
@ 2013-11-08 20:30         ` Valentine
  -1 siblings, 0 replies; 26+ messages in thread
From: Valentine @ 2013-11-08 20:30 UTC (permalink / raw)
  To: Laurent Pinchart, Kumar Gala, Tejun Heo
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Guennadi Liakhovetski, Vladimir Barinov,
	Sergei Shtylyov, Mark Rutland

On 11/08/2013 06:30 PM, Laurent Pinchart wrote:
> Hi Kumar,
>
> On Friday 08 November 2013 08:26:47 Kumar Gala wrote:
>> On Nov 8, 2013, at 6:09 AM, Valentine Barshak wrote:
>>> These bindings can be used to register SATA devices found on R-Car SoC.
>>>
>>> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
>>> ---
>>> Documentation/devicetree/bindings/ata/sata_rcar.txt | 18 +++++++++++++++++
>>> 1 file changed, 18 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt
>>> b/Documentation/devicetree/bindings/ata/sata_rcar.txt new file mode
>>> 100644
>>> index 0000000..1e61113
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
>>> @@ -0,0 +1,18 @@
>>> +* Renesas R-Car SATA
>>> +
>>> +Required properties:
>>> +- compatible		: should contain one of the following:
>>> +			  - "renesas,sata-r8a7779" for R-Car H1
>>> +			  - "renesas,sata-r8a7790" for R-Car H2
>>> +			  - "renesas,sata-r8a7791" for R-Car M2
>>> +- reg			: address and length of the SATA registers;
>>> +- interrupts		: must consist of one interrupt specifier.
>>> +
>>> +Example:
>>> +
>>> +sata: sata@fc600000 {
>>> +	compatible = "renesas,sata-r8a7779";
>>> +	reg = <0xfc600000 0x2000>;
>>> +	interrupt-parent = <&gic>;
>>> +	interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
>>
>> Sorry, I missed the discussion on this, but I think it would be better in
>> the example to leave this as 4.  There is no reference in the binding at
>> all to figure out where IRQ_TYPE_LEVEL_HIGH is defined.
>
> Then I'd rather reference the interrupts binding document, otherwise people
> will blindly write device tree sources with 4 instead of IRQ_TYPE_LEVEL_HIGH,
> which I don't want to encourage.
>
>>> +};

Is it possible to get the functional SATA phy changes from the first patch applied
and have a separate discussion regarding DT bindings?
This DT discussion is not related to the SATA PHY changes.
There were comments to keep both patches as a single series, but I don't see any reason
for that anymore.

Thanks,
Val.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 2/2] dt: Document sata_rcar bindings
@ 2013-11-08 20:30         ` Valentine
  0 siblings, 0 replies; 26+ messages in thread
From: Valentine @ 2013-11-08 20:30 UTC (permalink / raw)
  To: Laurent Pinchart, Kumar Gala, Tejun Heo
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Guennadi Liakhovetski, Vladimir Barinov,
	Sergei Shtylyov, Mark Rutland

On 11/08/2013 06:30 PM, Laurent Pinchart wrote:
> Hi Kumar,
>
> On Friday 08 November 2013 08:26:47 Kumar Gala wrote:
>> On Nov 8, 2013, at 6:09 AM, Valentine Barshak wrote:
>>> These bindings can be used to register SATA devices found on R-Car SoC.
>>>
>>> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
>>> ---
>>> Documentation/devicetree/bindings/ata/sata_rcar.txt | 18 +++++++++++++++++
>>> 1 file changed, 18 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt
>>> b/Documentation/devicetree/bindings/ata/sata_rcar.txt new file mode
>>> 100644
>>> index 0000000..1e61113
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
>>> @@ -0,0 +1,18 @@
>>> +* Renesas R-Car SATA
>>> +
>>> +Required properties:
>>> +- compatible		: should contain one of the following:
>>> +			  - "renesas,sata-r8a7779" for R-Car H1
>>> +			  - "renesas,sata-r8a7790" for R-Car H2
>>> +			  - "renesas,sata-r8a7791" for R-Car M2
>>> +- reg			: address and length of the SATA registers;
>>> +- interrupts		: must consist of one interrupt specifier.
>>> +
>>> +Example:
>>> +
>>> +sata: sata@fc600000 {
>>> +	compatible = "renesas,sata-r8a7779";
>>> +	reg = <0xfc600000 0x2000>;
>>> +	interrupt-parent = <&gic>;
>>> +	interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
>>
>> Sorry, I missed the discussion on this, but I think it would be better in
>> the example to leave this as 4.  There is no reference in the binding at
>> all to figure out where IRQ_TYPE_LEVEL_HIGH is defined.
>
> Then I'd rather reference the interrupts binding document, otherwise people
> will blindly write device tree sources with 4 instead of IRQ_TYPE_LEVEL_HIGH,
> which I don't want to encourage.
>
>>> +};

Is it possible to get the functional SATA phy changes from the first patch applied
and have a separate discussion regarding DT bindings?
This DT discussion is not related to the SATA PHY changes.
There were comments to keep both patches as a single series, but I don't see any reason
for that anymore.

Thanks,
Val.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
  2013-11-08 12:09   ` Valentine Barshak
@ 2013-11-26 22:06     ` Valentine
  -1 siblings, 0 replies; 26+ messages in thread
From: Valentine @ 2013-11-26 22:06 UTC (permalink / raw)
  To: linux-sh, linux-ide, Tejun Heo
  Cc: devicetree, Simon Horman, Magnus Damm, Kuninori Morimoto,
	Laurent Pinchart, Guennadi Liakhovetski, Kumar Gala,
	Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On 11/08/2013 04:09 PM, Valentine Barshak wrote:

Tejun,
are you OK with taking this?

> R-Car Gen2 SoCs have a different PHY which is not compatible
> with the older R-Car H1 (R8A7779) version.
> This adds OF/platform device id tables and PHY initialization
> callbacks for the following Gen2 SoCs:
>    * R-Car H2: R8A7790;
>    * R-Car M2: R8A7791.
>
> PHY initialization method is chosen based on the device id.
> Default PHY settings are applied for Gen2 SoCs, which should
> suit the Gen2 boards available.
>
> While at it, this also adds "sata-r8a7779" compatibility string
> for R8A7779 SATA, while keeping the old one for compatibility.

Thanks,
Val.

>
> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> ---
>   drivers/ata/sata_rcar.c | 118 +++++++++++++++++++++++++++++++++++++++++-------
>   1 file changed, 102 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
> index c2d95e9..231559f 100644
> --- a/drivers/ata/sata_rcar.c
> +++ b/drivers/ata/sata_rcar.c
> @@ -15,6 +15,7 @@
>   #include <linux/module.h>
>   #include <linux/ata.h>
>   #include <linux/libata.h>
> +#include <linux/of_device.h>
>   #include <linux/platform_device.h>
>   #include <linux/clk.h>
>   #include <linux/err.h>
> @@ -123,12 +124,37 @@
>
>   #define SATA_RCAR_DMA_BOUNDARY		0x1FFFFFFEUL
>
> +/* Gen2 Physical Layer Control Registers */
> +#define RCAR_GEN2_PHY_CTL1_REG		0x1704
> +#define RCAR_GEN2_PHY_CTL1		0x34180002
> +#define RCAR_GEN2_PHY_CTL1_SS		0xC180	/* Spread Spectrum */
> +
> +#define RCAR_GEN2_PHY_CTL2_REG		0x170C
> +#define RCAR_GEN2_PHY_CTL2		0x00002303
> +
> +#define RCAR_GEN2_PHY_CTL3_REG		0x171C
> +#define RCAR_GEN2_PHY_CTL3		0x000B0194
> +
> +#define RCAR_GEN2_PHY_CTL4_REG		0x1724
> +#define RCAR_GEN2_PHY_CTL4		0x00030994
> +
> +#define RCAR_GEN2_PHY_CTL5_REG		0x1740
> +#define RCAR_GEN2_PHY_CTL5		0x03004001
> +#define RCAR_GEN2_PHY_CTL5_DC		BIT(1)	/* DC connection */
> +#define RCAR_GEN2_PHY_CTL5_TR		BIT(2)	/* Termination Resistor */
> +
> +enum sata_rcar_type {
> +	RCAR_GEN1_SATA,
> +	RCAR_GEN2_SATA,
> +};
> +
>   struct sata_rcar_priv {
>   	void __iomem *base;
>   	struct clk *clk;
> +	enum sata_rcar_type type;
>   };
>
> -static void sata_rcar_phy_initialize(struct sata_rcar_priv *priv)
> +static void sata_rcar_gen1_phy_preinit(struct sata_rcar_priv *priv)
>   {
>   	void __iomem *base = priv->base;
>
> @@ -141,8 +167,8 @@ static void sata_rcar_phy_initialize(struct sata_rcar_priv *priv)
>   	iowrite32(0, base + SATAPHYRESET_REG);
>   }
>
> -static void sata_rcar_phy_write(struct sata_rcar_priv *priv, u16 reg, u32 val,
> -				int group)
> +static void sata_rcar_gen1_phy_write(struct sata_rcar_priv *priv, u16 reg,
> +				     u32 val, int group)
>   {
>   	void __iomem *base = priv->base;
>   	int timeout;
> @@ -170,6 +196,29 @@ static void sata_rcar_phy_write(struct sata_rcar_priv *priv, u16 reg, u32 val,
>   	iowrite32(0, base + SATAPHYADDR_REG);
>   }
>
> +static void sata_rcar_gen1_phy_init(struct sata_rcar_priv *priv)
> +{
> +	sata_rcar_gen1_phy_preinit(priv);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 0);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 1);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR3_REG, 0x0000A061, 0);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 0);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 1);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR4_REG, 0x28E80000, 0);
> +}
> +
> +static void sata_rcar_gen2_phy_init(struct sata_rcar_priv *priv)
> +{
> +	void __iomem *base = priv->base;
> +
> +	iowrite32(RCAR_GEN2_PHY_CTL1, base + RCAR_GEN2_PHY_CTL1_REG);
> +	iowrite32(RCAR_GEN2_PHY_CTL2, base + RCAR_GEN2_PHY_CTL2_REG);
> +	iowrite32(RCAR_GEN2_PHY_CTL3, base + RCAR_GEN2_PHY_CTL3_REG);
> +	iowrite32(RCAR_GEN2_PHY_CTL4, base + RCAR_GEN2_PHY_CTL4_REG);
> +	iowrite32(RCAR_GEN2_PHY_CTL5 | RCAR_GEN2_PHY_CTL5_DC |
> +		  RCAR_GEN2_PHY_CTL5_TR, base + RCAR_GEN2_PHY_CTL5_REG);
> +}
> +
>   static void sata_rcar_freeze(struct ata_port *ap)
>   {
>   	struct sata_rcar_priv *priv = ap->host->private_data;
> @@ -738,13 +787,17 @@ static void sata_rcar_init_controller(struct ata_host *host)
>   	u32 val;
>
>   	/* reset and setup phy */
> -	sata_rcar_phy_initialize(priv);
> -	sata_rcar_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 0);
> -	sata_rcar_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 1);
> -	sata_rcar_phy_write(priv, SATAPCTLR3_REG, 0x0000A061, 0);
> -	sata_rcar_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 0);
> -	sata_rcar_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 1);
> -	sata_rcar_phy_write(priv, SATAPCTLR4_REG, 0x28E80000, 0);
> +	switch (priv->type) {
> +	case RCAR_GEN1_SATA:
> +		sata_rcar_gen1_phy_init(priv);
> +		break;
> +	case RCAR_GEN2_SATA:
> +		sata_rcar_gen2_phy_init(priv);
> +		break;
> +	default:
> +		dev_warn(host->dev, "SATA phy is not initialized\n");
> +		break;
> +	}
>
>   	/* SATA-IP reset state */
>   	val = ioread32(base + ATAPI_CONTROL1_REG);
> @@ -770,8 +823,40 @@ static void sata_rcar_init_controller(struct ata_host *host)
>   	iowrite32(ATAPI_INT_ENABLE_SATAINT, base + ATAPI_INT_ENABLE_REG);
>   }
>
> +static struct of_device_id sata_rcar_match[] = {
> +	{
> +		/* Deprecated by "renesas,sata-r8a7779" */
> +		.compatible = "renesas,rcar-sata",
> +		.data = (void *)RCAR_GEN1_SATA,
> +	},
> +	{
> +		.compatible = "renesas,sata-r8a7779",
> +		.data = (void *)RCAR_GEN1_SATA,
> +	},
> +	{
> +		.compatible = "renesas,sata-r8a7790",
> +		.data = (void *)RCAR_GEN2_SATA
> +	},
> +	{
> +		.compatible = "renesas,sata-r8a7791",
> +		.data = (void *)RCAR_GEN2_SATA
> +	},
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(of, sata_rcar_match);
> +
> +static const struct platform_device_id sata_rcar_id_table[] = {
> +	{ "sata_rcar", RCAR_GEN1_SATA }, /* Deprecated by "sata-r8a7779" */
> +	{ "sata-r8a7779", RCAR_GEN1_SATA },
> +	{ "sata-r8a7790", RCAR_GEN2_SATA },
> +	{ "sata-r8a7791", RCAR_GEN2_SATA },
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(platform, sata_rcar_id_table);
> +
>   static int sata_rcar_probe(struct platform_device *pdev)
>   {
> +	const struct of_device_id *of_id;
>   	struct ata_host *host;
>   	struct sata_rcar_priv *priv;
>   	struct resource *mem;
> @@ -787,6 +872,12 @@ static int sata_rcar_probe(struct platform_device *pdev)
>   	if (!priv)
>   		return -ENOMEM;
>
> +	of_id = of_match_device(sata_rcar_match, &pdev->dev);
> +	if (of_id)
> +		priv->type = (enum sata_rcar_type)of_id->data;
> +	else
> +		priv->type = platform_get_device_id(pdev)->driver_data;
> +
>   	priv->clk = devm_clk_get(&pdev->dev, NULL);
>   	if (IS_ERR(priv->clk)) {
>   		dev_err(&pdev->dev, "failed to get access to sata clock\n");
> @@ -892,15 +983,10 @@ static const struct dev_pm_ops sata_rcar_pm_ops = {
>   };
>   #endif
>
> -static struct of_device_id sata_rcar_match[] = {
> -	{ .compatible = "renesas,rcar-sata", },
> -	{},
> -};
> -MODULE_DEVICE_TABLE(of, sata_rcar_match);
> -
>   static struct platform_driver sata_rcar_driver = {
>   	.probe		= sata_rcar_probe,
>   	.remove		= sata_rcar_remove,
> +	.id_table	= sata_rcar_id_table,
>   	.driver = {
>   		.name		= DRV_NAME,
>   		.owner		= THIS_MODULE,
>


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
@ 2013-11-26 22:06     ` Valentine
  0 siblings, 0 replies; 26+ messages in thread
From: Valentine @ 2013-11-26 22:06 UTC (permalink / raw)
  To: linux-sh, linux-ide, Tejun Heo
  Cc: devicetree, Simon Horman, Magnus Damm, Kuninori Morimoto,
	Laurent Pinchart, Guennadi Liakhovetski, Kumar Gala,
	Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On 11/08/2013 04:09 PM, Valentine Barshak wrote:

Tejun,
are you OK with taking this?

> R-Car Gen2 SoCs have a different PHY which is not compatible
> with the older R-Car H1 (R8A7779) version.
> This adds OF/platform device id tables and PHY initialization
> callbacks for the following Gen2 SoCs:
>    * R-Car H2: R8A7790;
>    * R-Car M2: R8A7791.
>
> PHY initialization method is chosen based on the device id.
> Default PHY settings are applied for Gen2 SoCs, which should
> suit the Gen2 boards available.
>
> While at it, this also adds "sata-r8a7779" compatibility string
> for R8A7779 SATA, while keeping the old one for compatibility.

Thanks,
Val.

>
> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> ---
>   drivers/ata/sata_rcar.c | 118 +++++++++++++++++++++++++++++++++++++++++-------
>   1 file changed, 102 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
> index c2d95e9..231559f 100644
> --- a/drivers/ata/sata_rcar.c
> +++ b/drivers/ata/sata_rcar.c
> @@ -15,6 +15,7 @@
>   #include <linux/module.h>
>   #include <linux/ata.h>
>   #include <linux/libata.h>
> +#include <linux/of_device.h>
>   #include <linux/platform_device.h>
>   #include <linux/clk.h>
>   #include <linux/err.h>
> @@ -123,12 +124,37 @@
>
>   #define SATA_RCAR_DMA_BOUNDARY		0x1FFFFFFEUL
>
> +/* Gen2 Physical Layer Control Registers */
> +#define RCAR_GEN2_PHY_CTL1_REG		0x1704
> +#define RCAR_GEN2_PHY_CTL1		0x34180002
> +#define RCAR_GEN2_PHY_CTL1_SS		0xC180	/* Spread Spectrum */
> +
> +#define RCAR_GEN2_PHY_CTL2_REG		0x170C
> +#define RCAR_GEN2_PHY_CTL2		0x00002303
> +
> +#define RCAR_GEN2_PHY_CTL3_REG		0x171C
> +#define RCAR_GEN2_PHY_CTL3		0x000B0194
> +
> +#define RCAR_GEN2_PHY_CTL4_REG		0x1724
> +#define RCAR_GEN2_PHY_CTL4		0x00030994
> +
> +#define RCAR_GEN2_PHY_CTL5_REG		0x1740
> +#define RCAR_GEN2_PHY_CTL5		0x03004001
> +#define RCAR_GEN2_PHY_CTL5_DC		BIT(1)	/* DC connection */
> +#define RCAR_GEN2_PHY_CTL5_TR		BIT(2)	/* Termination Resistor */
> +
> +enum sata_rcar_type {
> +	RCAR_GEN1_SATA,
> +	RCAR_GEN2_SATA,
> +};
> +
>   struct sata_rcar_priv {
>   	void __iomem *base;
>   	struct clk *clk;
> +	enum sata_rcar_type type;
>   };
>
> -static void sata_rcar_phy_initialize(struct sata_rcar_priv *priv)
> +static void sata_rcar_gen1_phy_preinit(struct sata_rcar_priv *priv)
>   {
>   	void __iomem *base = priv->base;
>
> @@ -141,8 +167,8 @@ static void sata_rcar_phy_initialize(struct sata_rcar_priv *priv)
>   	iowrite32(0, base + SATAPHYRESET_REG);
>   }
>
> -static void sata_rcar_phy_write(struct sata_rcar_priv *priv, u16 reg, u32 val,
> -				int group)
> +static void sata_rcar_gen1_phy_write(struct sata_rcar_priv *priv, u16 reg,
> +				     u32 val, int group)
>   {
>   	void __iomem *base = priv->base;
>   	int timeout;
> @@ -170,6 +196,29 @@ static void sata_rcar_phy_write(struct sata_rcar_priv *priv, u16 reg, u32 val,
>   	iowrite32(0, base + SATAPHYADDR_REG);
>   }
>
> +static void sata_rcar_gen1_phy_init(struct sata_rcar_priv *priv)
> +{
> +	sata_rcar_gen1_phy_preinit(priv);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 0);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 1);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR3_REG, 0x0000A061, 0);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 0);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 1);
> +	sata_rcar_gen1_phy_write(priv, SATAPCTLR4_REG, 0x28E80000, 0);
> +}
> +
> +static void sata_rcar_gen2_phy_init(struct sata_rcar_priv *priv)
> +{
> +	void __iomem *base = priv->base;
> +
> +	iowrite32(RCAR_GEN2_PHY_CTL1, base + RCAR_GEN2_PHY_CTL1_REG);
> +	iowrite32(RCAR_GEN2_PHY_CTL2, base + RCAR_GEN2_PHY_CTL2_REG);
> +	iowrite32(RCAR_GEN2_PHY_CTL3, base + RCAR_GEN2_PHY_CTL3_REG);
> +	iowrite32(RCAR_GEN2_PHY_CTL4, base + RCAR_GEN2_PHY_CTL4_REG);
> +	iowrite32(RCAR_GEN2_PHY_CTL5 | RCAR_GEN2_PHY_CTL5_DC |
> +		  RCAR_GEN2_PHY_CTL5_TR, base + RCAR_GEN2_PHY_CTL5_REG);
> +}
> +
>   static void sata_rcar_freeze(struct ata_port *ap)
>   {
>   	struct sata_rcar_priv *priv = ap->host->private_data;
> @@ -738,13 +787,17 @@ static void sata_rcar_init_controller(struct ata_host *host)
>   	u32 val;
>
>   	/* reset and setup phy */
> -	sata_rcar_phy_initialize(priv);
> -	sata_rcar_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 0);
> -	sata_rcar_phy_write(priv, SATAPCTLR1_REG, 0x00200188, 1);
> -	sata_rcar_phy_write(priv, SATAPCTLR3_REG, 0x0000A061, 0);
> -	sata_rcar_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 0);
> -	sata_rcar_phy_write(priv, SATAPCTLR2_REG, 0x20000000, 1);
> -	sata_rcar_phy_write(priv, SATAPCTLR4_REG, 0x28E80000, 0);
> +	switch (priv->type) {
> +	case RCAR_GEN1_SATA:
> +		sata_rcar_gen1_phy_init(priv);
> +		break;
> +	case RCAR_GEN2_SATA:
> +		sata_rcar_gen2_phy_init(priv);
> +		break;
> +	default:
> +		dev_warn(host->dev, "SATA phy is not initialized\n");
> +		break;
> +	}
>
>   	/* SATA-IP reset state */
>   	val = ioread32(base + ATAPI_CONTROL1_REG);
> @@ -770,8 +823,40 @@ static void sata_rcar_init_controller(struct ata_host *host)
>   	iowrite32(ATAPI_INT_ENABLE_SATAINT, base + ATAPI_INT_ENABLE_REG);
>   }
>
> +static struct of_device_id sata_rcar_match[] = {
> +	{
> +		/* Deprecated by "renesas,sata-r8a7779" */
> +		.compatible = "renesas,rcar-sata",
> +		.data = (void *)RCAR_GEN1_SATA,
> +	},
> +	{
> +		.compatible = "renesas,sata-r8a7779",
> +		.data = (void *)RCAR_GEN1_SATA,
> +	},
> +	{
> +		.compatible = "renesas,sata-r8a7790",
> +		.data = (void *)RCAR_GEN2_SATA
> +	},
> +	{
> +		.compatible = "renesas,sata-r8a7791",
> +		.data = (void *)RCAR_GEN2_SATA
> +	},
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(of, sata_rcar_match);
> +
> +static const struct platform_device_id sata_rcar_id_table[] = {
> +	{ "sata_rcar", RCAR_GEN1_SATA }, /* Deprecated by "sata-r8a7779" */
> +	{ "sata-r8a7779", RCAR_GEN1_SATA },
> +	{ "sata-r8a7790", RCAR_GEN2_SATA },
> +	{ "sata-r8a7791", RCAR_GEN2_SATA },
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(platform, sata_rcar_id_table);
> +
>   static int sata_rcar_probe(struct platform_device *pdev)
>   {
> +	const struct of_device_id *of_id;
>   	struct ata_host *host;
>   	struct sata_rcar_priv *priv;
>   	struct resource *mem;
> @@ -787,6 +872,12 @@ static int sata_rcar_probe(struct platform_device *pdev)
>   	if (!priv)
>   		return -ENOMEM;
>
> +	of_id = of_match_device(sata_rcar_match, &pdev->dev);
> +	if (of_id)
> +		priv->type = (enum sata_rcar_type)of_id->data;
> +	else
> +		priv->type = platform_get_device_id(pdev)->driver_data;
> +
>   	priv->clk = devm_clk_get(&pdev->dev, NULL);
>   	if (IS_ERR(priv->clk)) {
>   		dev_err(&pdev->dev, "failed to get access to sata clock\n");
> @@ -892,15 +983,10 @@ static const struct dev_pm_ops sata_rcar_pm_ops = {
>   };
>   #endif
>
> -static struct of_device_id sata_rcar_match[] = {
> -	{ .compatible = "renesas,rcar-sata", },
> -	{},
> -};
> -MODULE_DEVICE_TABLE(of, sata_rcar_match);
> -
>   static struct platform_driver sata_rcar_driver = {
>   	.probe		= sata_rcar_probe,
>   	.remove		= sata_rcar_remove,
> +	.id_table	= sata_rcar_id_table,
>   	.driver = {
>   		.name		= DRV_NAME,
>   		.owner		= THIS_MODULE,
>


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
  2013-11-26 22:06     ` Valentine
@ 2013-11-29 20:14       ` Tejun Heo
  -1 siblings, 0 replies; 26+ messages in thread
From: Tejun Heo @ 2013-11-29 20:14 UTC (permalink / raw)
  To: Valentine
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Kumar Gala, Vladimir Barinov, Sergei Shtylyov, Mark Rutland

Hello,

On Wed, Nov 27, 2013 at 02:06:05AM +0400, Valentine wrote:
> On 11/08/2013 04:09 PM, Valentine Barshak wrote:
> 
> Tejun,
> are you OK with taking this?

Yeah, the stat part looks okay to me.  How the two should be routed?
Both through libata or should I just take the first one?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
@ 2013-11-29 20:14       ` Tejun Heo
  0 siblings, 0 replies; 26+ messages in thread
From: Tejun Heo @ 2013-11-29 20:14 UTC (permalink / raw)
  To: Valentine
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Kumar Gala, Vladimir Barinov, Sergei Shtylyov, Mark Rutland

Hello,

On Wed, Nov 27, 2013 at 02:06:05AM +0400, Valentine wrote:
> On 11/08/2013 04:09 PM, Valentine Barshak wrote:
> 
> Tejun,
> are you OK with taking this?

Yeah, the stat part looks okay to me.  How the two should be routed?
Both through libata or should I just take the first one?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
  2013-11-29 20:14       ` Tejun Heo
@ 2013-11-29 20:35         ` Valentine
  -1 siblings, 0 replies; 26+ messages in thread
From: Valentine @ 2013-11-29 20:35 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Kumar Gala, Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On 11/30/2013 12:14 AM, Tejun Heo wrote:
> Hello,
>
> On Wed, Nov 27, 2013 at 02:06:05AM +0400, Valentine wrote:
>> On 11/08/2013 04:09 PM, Valentine Barshak wrote:
>>
>> Tejun,
>> are you OK with taking this?
>
> Yeah, the stat part looks okay to me.  How the two should be routed?
> Both through libata or should I just take the first one?

I'm not sure about that. I'm more concerned about the first one.
But I wouldn't mind if you take both.

>
> Thanks.
>

Thanks,
Val.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
@ 2013-11-29 20:35         ` Valentine
  0 siblings, 0 replies; 26+ messages in thread
From: Valentine @ 2013-11-29 20:35 UTC (permalink / raw)
  To: Tejun Heo
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Kumar Gala, Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On 11/30/2013 12:14 AM, Tejun Heo wrote:
> Hello,
>
> On Wed, Nov 27, 2013 at 02:06:05AM +0400, Valentine wrote:
>> On 11/08/2013 04:09 PM, Valentine Barshak wrote:
>>
>> Tejun,
>> are you OK with taking this?
>
> Yeah, the stat part looks okay to me.  How the two should be routed?
> Both through libata or should I just take the first one?

I'm not sure about that. I'm more concerned about the first one.
But I wouldn't mind if you take both.

>
> Thanks.
>

Thanks,
Val.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
  2013-11-29 20:35         ` Valentine
@ 2013-11-29 20:42           ` Tejun Heo
  -1 siblings, 0 replies; 26+ messages in thread
From: Tejun Heo @ 2013-11-29 20:42 UTC (permalink / raw)
  To: Valentine
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Kumar Gala, Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On Sat, Nov 30, 2013 at 12:35:52AM +0400, Valentine wrote:
> On 11/30/2013 12:14 AM, Tejun Heo wrote:
> >Hello,
> >
> >On Wed, Nov 27, 2013 at 02:06:05AM +0400, Valentine wrote:
> >>On 11/08/2013 04:09 PM, Valentine Barshak wrote:
> >>
> >>Tejun,
> >>are you OK with taking this?
> >
> >Yeah, the stat part looks okay to me.  How the two should be routed?
> >Both through libata or should I just take the first one?
> 
> I'm not sure about that. I'm more concerned about the first one.
> But I wouldn't mind if you take both.

Applied the first one to libata/for-3.14.  Are people happy with the
second one?  If so, I'll put route that through libata/for-3.14 too.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
@ 2013-11-29 20:42           ` Tejun Heo
  0 siblings, 0 replies; 26+ messages in thread
From: Tejun Heo @ 2013-11-29 20:42 UTC (permalink / raw)
  To: Valentine
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Kumar Gala, Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On Sat, Nov 30, 2013 at 12:35:52AM +0400, Valentine wrote:
> On 11/30/2013 12:14 AM, Tejun Heo wrote:
> >Hello,
> >
> >On Wed, Nov 27, 2013 at 02:06:05AM +0400, Valentine wrote:
> >>On 11/08/2013 04:09 PM, Valentine Barshak wrote:
> >>
> >>Tejun,
> >>are you OK with taking this?
> >
> >Yeah, the stat part looks okay to me.  How the two should be routed?
> >Both through libata or should I just take the first one?
> 
> I'm not sure about that. I'm more concerned about the first one.
> But I wouldn't mind if you take both.

Applied the first one to libata/for-3.14.  Are people happy with the
second one?  If so, I'll put route that through libata/for-3.14 too.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
  2013-11-29 20:42           ` Tejun Heo
@ 2013-12-02  0:02             ` Simon Horman
  -1 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2013-12-02  0:02 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Valentine, linux-sh, linux-ide, devicetree, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Kumar Gala, Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On Fri, Nov 29, 2013 at 03:42:31PM -0500, Tejun Heo wrote:
> On Sat, Nov 30, 2013 at 12:35:52AM +0400, Valentine wrote:
> > On 11/30/2013 12:14 AM, Tejun Heo wrote:
> > >Hello,
> > >
> > >On Wed, Nov 27, 2013 at 02:06:05AM +0400, Valentine wrote:
> > >>On 11/08/2013 04:09 PM, Valentine Barshak wrote:
> > >>
> > >>Tejun,
> > >>are you OK with taking this?
> > >
> > >Yeah, the stat part looks okay to me.  How the two should be routed?
> > >Both through libata or should I just take the first one?
> > 
> > I'm not sure about that. I'm more concerned about the first one.
> > But I wouldn't mind if you take both.
> 
> Applied the first one to libata/for-3.14.  Are people happy with the
> second one?  If so, I'll put route that through libata/for-3.14 too.

Hi,

Assuming that the second one is " [PATCH V3 2/2] dt: Document sata_rcar
bindings" then from my point of view it would be ideal if you took it.
However, it seems that there is still some discussion on the contents
between Valentine and Kumar Gala.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
@ 2013-12-02  0:02             ` Simon Horman
  0 siblings, 0 replies; 26+ messages in thread
From: Simon Horman @ 2013-12-02  0:02 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Valentine, linux-sh, linux-ide, devicetree, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Kumar Gala, Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On Fri, Nov 29, 2013 at 03:42:31PM -0500, Tejun Heo wrote:
> On Sat, Nov 30, 2013 at 12:35:52AM +0400, Valentine wrote:
> > On 11/30/2013 12:14 AM, Tejun Heo wrote:
> > >Hello,
> > >
> > >On Wed, Nov 27, 2013 at 02:06:05AM +0400, Valentine wrote:
> > >>On 11/08/2013 04:09 PM, Valentine Barshak wrote:
> > >>
> > >>Tejun,
> > >>are you OK with taking this?
> > >
> > >Yeah, the stat part looks okay to me.  How the two should be routed?
> > >Both through libata or should I just take the first one?
> > 
> > I'm not sure about that. I'm more concerned about the first one.
> > But I wouldn't mind if you take both.
> 
> Applied the first one to libata/for-3.14.  Are people happy with the
> second one?  If so, I'll put route that through libata/for-3.14 too.

Hi,

Assuming that the second one is " [PATCH V3 2/2] dt: Document sata_rcar
bindings" then from my point of view it would be ideal if you took it.
However, it seems that there is still some discussion on the contents
between Valentine and Kumar Gala.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
  2013-12-02  0:02             ` Simon Horman
@ 2013-12-02 10:07               ` Valentine
  -1 siblings, 0 replies; 26+ messages in thread
From: Valentine @ 2013-12-02 10:07 UTC (permalink / raw)
  To: Simon Horman, Tejun Heo
  Cc: linux-sh, linux-ide, devicetree, Magnus Damm, Kuninori Morimoto,
	Laurent Pinchart, Guennadi Liakhovetski, Kumar Gala,
	Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On 12/02/2013 04:02 AM, Simon Horman wrote:
> On Fri, Nov 29, 2013 at 03:42:31PM -0500, Tejun Heo wrote:
>> On Sat, Nov 30, 2013 at 12:35:52AM +0400, Valentine wrote:
>>> On 11/30/2013 12:14 AM, Tejun Heo wrote:
>>>> Hello,
>>>>
>>>> On Wed, Nov 27, 2013 at 02:06:05AM +0400, Valentine wrote:
>>>>> On 11/08/2013 04:09 PM, Valentine Barshak wrote:
>>>>>
>>>>> Tejun,
>>>>> are you OK with taking this?
>>>>
>>>> Yeah, the stat part looks okay to me.  How the two should be routed?
>>>> Both through libata or should I just take the first one?
>>>
>>> I'm not sure about that. I'm more concerned about the first one.
>>> But I wouldn't mind if you take both.
>>
>> Applied the first one to libata/for-3.14.  Are people happy with the
>> second one?  If so, I'll put route that through libata/for-3.14 too.
>
> Hi,
>
> Assuming that the second one is " [PATCH V3 2/2] dt: Document sata_rcar
> bindings" then from my point of view it would be ideal if you took it.
> However, it seems that there is still some discussion on the contents
> between Valentine and Kumar Gala.
>

Thanks, Simon.
Actually between Laurent and Kumar.
Since the R-Car Gen2 DTS file have been updated to include the IRQ macros,
I don't see any issues with applying the binding documentation from this
series.

Thanks,
Val.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support
@ 2013-12-02 10:07               ` Valentine
  0 siblings, 0 replies; 26+ messages in thread
From: Valentine @ 2013-12-02 10:07 UTC (permalink / raw)
  To: Simon Horman, Tejun Heo
  Cc: linux-sh, linux-ide, devicetree, Magnus Damm, Kuninori Morimoto,
	Laurent Pinchart, Guennadi Liakhovetski, Kumar Gala,
	Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On 12/02/2013 04:02 AM, Simon Horman wrote:
> On Fri, Nov 29, 2013 at 03:42:31PM -0500, Tejun Heo wrote:
>> On Sat, Nov 30, 2013 at 12:35:52AM +0400, Valentine wrote:
>>> On 11/30/2013 12:14 AM, Tejun Heo wrote:
>>>> Hello,
>>>>
>>>> On Wed, Nov 27, 2013 at 02:06:05AM +0400, Valentine wrote:
>>>>> On 11/08/2013 04:09 PM, Valentine Barshak wrote:
>>>>>
>>>>> Tejun,
>>>>> are you OK with taking this?
>>>>
>>>> Yeah, the stat part looks okay to me.  How the two should be routed?
>>>> Both through libata or should I just take the first one?
>>>
>>> I'm not sure about that. I'm more concerned about the first one.
>>> But I wouldn't mind if you take both.
>>
>> Applied the first one to libata/for-3.14.  Are people happy with the
>> second one?  If so, I'll put route that through libata/for-3.14 too.
>
> Hi,
>
> Assuming that the second one is " [PATCH V3 2/2] dt: Document sata_rcar
> bindings" then from my point of view it would be ideal if you took it.
> However, it seems that there is still some discussion on the contents
> between Valentine and Kumar Gala.
>

Thanks, Simon.
Actually between Laurent and Kumar.
Since the R-Car Gen2 DTS file have been updated to include the IRQ macros,
I don't see any issues with applying the binding documentation from this
series.

Thanks,
Val.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 2/2] dt: Document sata_rcar bindings
  2013-11-08 12:09   ` Valentine Barshak
@ 2013-12-02 19:55     ` Tejun Heo
  -1 siblings, 0 replies; 26+ messages in thread
From: Tejun Heo @ 2013-12-02 19:55 UTC (permalink / raw)
  To: Valentine Barshak
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Kumar Gala, Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On Fri, Nov 08, 2013 at 04:09:30PM +0400, Valentine Barshak wrote:
> These bindings can be used to register SATA devices found on R-Car SoC.
> 
> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>

Applied to libata/for-3.14.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH V3 2/2] dt: Document sata_rcar bindings
@ 2013-12-02 19:55     ` Tejun Heo
  0 siblings, 0 replies; 26+ messages in thread
From: Tejun Heo @ 2013-12-02 19:55 UTC (permalink / raw)
  To: Valentine Barshak
  Cc: linux-sh, linux-ide, devicetree, Simon Horman, Magnus Damm,
	Kuninori Morimoto, Laurent Pinchart, Guennadi Liakhovetski,
	Kumar Gala, Vladimir Barinov, Sergei Shtylyov, Mark Rutland

On Fri, Nov 08, 2013 at 04:09:30PM +0400, Valentine Barshak wrote:
> These bindings can be used to register SATA devices found on R-Car SoC.
> 
> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>

Applied to libata/for-3.14.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2013-12-02 19:55 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-08 12:09 [PATCH V3 0/2] sata_rcar: Add Gen2 PHY support and document existing DT bindings Valentine Barshak
2013-11-08 12:09 ` Valentine Barshak
2013-11-08 12:09 ` [PATCH V3 1/2] sata_rcar: Add R-Car Gen2 SATA PHY support Valentine Barshak
2013-11-08 12:09   ` Valentine Barshak
2013-11-26 22:06   ` Valentine
2013-11-26 22:06     ` Valentine
2013-11-29 20:14     ` Tejun Heo
2013-11-29 20:14       ` Tejun Heo
2013-11-29 20:35       ` Valentine
2013-11-29 20:35         ` Valentine
2013-11-29 20:42         ` Tejun Heo
2013-11-29 20:42           ` Tejun Heo
2013-12-02  0:02           ` Simon Horman
2013-12-02  0:02             ` Simon Horman
2013-12-02 10:07             ` Valentine
2013-12-02 10:07               ` Valentine
2013-11-08 12:09 ` [PATCH V3 2/2] dt: Document sata_rcar bindings Valentine Barshak
2013-11-08 12:09   ` Valentine Barshak
2013-11-08 14:26   ` Kumar Gala
2013-11-08 14:26     ` Kumar Gala
2013-11-08 14:30     ` Laurent Pinchart
2013-11-08 14:30       ` Laurent Pinchart
2013-11-08 20:30       ` Valentine
2013-11-08 20:30         ` Valentine
2013-12-02 19:55   ` Tejun Heo
2013-12-02 19:55     ` Tejun Heo

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.