[U-Boot] [PATCH 05/11] pinctrl: uniphier: allow to have pinctrl node under syscon node

Masahiro Yamada yamada.masahiro at socionext.com
Wed Jun 29 12:38:57 CEST 2016


Currently, the UniPhier pinctrl driver itself is a syscon, but it
turned out much more reasonable to make it a child node of a syscon
because our syscon node consists of a bunch of system configuration
registers, not only pinctrl, but also phy, and misc registers.
It is difficult to split the node.  This commit allows to migrate to
the new DT structure.

Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
---

 drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 2 +-
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 4 ++--
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c  | 2 +-
 drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c | 2 +-
 drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 2 +-
 drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 2 +-
 drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 2 +-
 drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c | 2 +-
 drivers/pinctrl/uniphier/pinctrl-uniphier.h      | 6 +++---
 9 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index b8e26d9..fc8bbd2 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -173,7 +173,7 @@ int uniphier_pinctrl_probe(struct udevice *dev,
 	struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
 	fdt_addr_t addr;
 
-	addr = dev_get_addr(dev);
+	addr = dev_get_addr(dev->parent);
 	if (addr == FDT_ADDR_T_NONE)
 		return -EINVAL;
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
index 7bc0b28..a394081 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c
@@ -95,8 +95,8 @@ static int uniphier_ld20_pinctrl_probe(struct udevice *dev)
 }
 
 static const struct udevice_id uniphier_ld20_pinctrl_match[] = {
-	{ .compatible = "socionext,ph1-ld11-pinctrl" },
-	{ .compatible = "socionext,ph1-ld20-pinctrl" },
+	{ .compatible = "socionext,uniphier-ld11-pinctrl" },
+	{ .compatible = "socionext,uniphier-ld20-pinctrl" },
 	{ /* sentinel */ }
 };
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
index ca66dee..79bc540 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
@@ -115,7 +115,7 @@ static int uniphier_ld4_pinctrl_probe(struct udevice *dev)
 }
 
 static const struct udevice_id uniphier_ld4_pinctrl_match[] = {
-	{ .compatible = "socionext,ph1-ld4-pinctrl" },
+	{ .compatible = "socionext,uniphier-ld4-pinctrl" },
 	{ /* sentinel */ }
 };
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
index 0fd4dc4..861e741 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
@@ -115,7 +115,7 @@ static int uniphier_ld6b_pinctrl_probe(struct udevice *dev)
 }
 
 static const struct udevice_id uniphier_ld6b_pinctrl_match[] = {
-	{ .compatible = "socionext,ph1-ld6b-pinctrl" },
+	{ .compatible = "socionext,uniphier-ld6b-pinctrl" },
 	{ /* sentinel */ }
 };
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
index 9ed7c74..f5194b6 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
@@ -112,7 +112,7 @@ static int uniphier_pro4_pinctrl_probe(struct udevice *dev)
 }
 
 static const struct udevice_id uniphier_pro4_pinctrl_match[] = {
-	{ .compatible = "socionext,ph1-pro4-pinctrl" },
+	{ .compatible = "socionext,uniphier-pro4-pinctrl" },
 	{ /* sentinel */ }
 };
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
index 6597f1c..72b9b39 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
@@ -126,7 +126,7 @@ static int uniphier_pro5_pinctrl_probe(struct udevice *dev)
 }
 
 static const struct udevice_id uniphier_pro5_pinctrl_match[] = {
-	{ .compatible = "socionext,ph1-pro5-pinctrl" },
+	{ .compatible = "socionext,uniphier-pro5-pinctrl" },
 	{ /* sentinel */ }
 };
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
index 0dbfdc7..a1c4240 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
@@ -120,7 +120,7 @@ static int uniphier_pxs2_pinctrl_probe(struct udevice *dev)
 }
 
 static const struct udevice_id uniphier_pxs2_pinctrl_match[] = {
-	{ .compatible = "socionext,proxstream2-pinctrl" },
+	{ .compatible = "socionext,uniphier-pxs2-pinctrl" },
 	{ /* sentinel */ }
 };
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
index 5a733b3..6f4847a 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
@@ -123,7 +123,7 @@ static int uniphier_sld8_pinctrl_probe(struct udevice *dev)
 }
 
 static const struct udevice_id uniphier_sld8_pinctrl_match[] = {
-	{ .compatible = "socionext,ph1-sld8-pinctrl" },
+	{ .compatible = "socionext,uniphier-sld8-pinctrl" },
 	{ /* sentinel */ }
 };
 
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier.h b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
index 2b43848..200d743 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier.h
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier.h
@@ -12,9 +12,9 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 
-#define UNIPHIER_PINCTRL_PINMUX_BASE	0x0
-#define UNIPHIER_PINCTRL_LOAD_PINMUX	0x700
-#define UNIPHIER_PINCTRL_IECTRL		0xd00
+#define UNIPHIER_PINCTRL_PINMUX_BASE	0x1000
+#define UNIPHIER_PINCTRL_LOAD_PINMUX	0x1700
+#define UNIPHIER_PINCTRL_IECTRL		0x1d00
 
 #define UNIPHIER_PIN_ATTR_PACKED(iectrl)	(iectrl)
 
-- 
1.9.1



More information about the U-Boot mailing list