All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-22  4:47 ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: tomasz.figa, naveenkrishna.ch, kesavan.abhilash

Changes since v4:
- Fixed comments from Tomasz Figa:
	- Changed the namespace prefix from exynos to samsung
	- Defined bindings to take all input clocks
	- Sorted the Kconfig entries alphabetically in clock Makefile
	- Used consistent 1 tab line breaks across the clock file
	- Statically initialized the samsung_cmu_info struct
- Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
- Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.

Changes since v3:
- Removed aliases for serial controllers from dtsi file and moved it
  into board specific dts file as suggested by Arnd.
- Based this series on Robert Richter's patches for adding vendor
  device tree sub-directories for arm64.
  http://comments.gmane.org/gmane.linux.kbuild.devel/12131

This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
processor.

The following patches are tested based on linux-next tree (20140919).
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/

Following patches are required for this series:
1- "tty/serial: fix config dependencies for samsung serial"
   https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset 
   http://comments.gmane.org/gmane.linux.kbuild.devel/12131

Alim Akhtar (2):
  arm64: exynos7: Enable ARMv8 based Exynos7 (SoC) support
  arm64: Enable Exynos7 SOC in the defconfig

Naveen Krishna Ch (5):
  clk: samsung: add support for 145xx and 1460x PLLs
  clk: samsung: Factor out the common code to clk.c
  clk: samsung: Add fixed_factor_clocks field to struct exynos_cmu_info
  clk: samsung: add initial clock support for Exynos7 SoC
  arm64: dts: Add initial device tree support for EXYNOS7

Pankaj Dubey (1):
  arm64: dts: add <dt-bindings/> symlink

 .../devicetree/bindings/clock/exynos7-clock.txt    |  67 ++++
 arch/arm64/Kconfig                                 |  12 +
 arch/arm64/boot/dts/Makefile                       |   1 +
 arch/arm64/boot/dts/exynos/Makefile                |   5 +
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts    |  39 ++
 arch/arm64/boot/dts/exynos/exynos7.dtsi            | 183 +++++++++
 arch/arm64/boot/dts/include/dt-bindings            |   1 +
 arch/arm64/configs/defconfig                       |   4 +
 drivers/clk/samsung/Makefile                       |   1 +
 drivers/clk/samsung/clk-exynos5260.c               | 185 ++-------
 drivers/clk/samsung/clk-exynos7.c                  | 425 +++++++++++++++++++++
 drivers/clk/samsung/clk-pll.c                      |  25 +-
 drivers/clk/samsung/clk-pll.h                      |   4 +
 drivers/clk/samsung/clk.c                          |  98 +++++
 drivers/clk/samsung/clk.h                          |  37 ++
 include/dt-bindings/clock/exynos7-clk.h            |  49 +++
 16 files changed, 972 insertions(+), 164 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/exynos7-clock.txt
 create mode 100644 arch/arm64/boot/dts/exynos/Makefile
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7-espresso.dts
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7.dtsi
 create mode 120000 arch/arm64/boot/dts/include/dt-bindings
 create mode 100644 drivers/clk/samsung/clk-exynos7.c
 create mode 100644 include/dt-bindings/clock/exynos7-clk.h

-- 
2.1.0

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-22  4:47 ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-arm-kernel

Changes since v4:
- Fixed comments from Tomasz Figa:
	- Changed the namespace prefix from exynos to samsung
	- Defined bindings to take all input clocks
	- Sorted the Kconfig entries alphabetically in clock Makefile
	- Used consistent 1 tab line breaks across the clock file
	- Statically initialized the samsung_cmu_info struct
- Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
- Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.

Changes since v3:
- Removed aliases for serial controllers from dtsi file and moved it
  into board specific dts file as suggested by Arnd.
- Based this series on Robert Richter's patches for adding vendor
  device tree sub-directories for arm64.
  http://comments.gmane.org/gmane.linux.kbuild.devel/12131

This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
processor.

The following patches are tested based on linux-next tree (20140919).
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/

Following patches are required for this series:
1- "tty/serial: fix config dependencies for samsung serial"
   https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset 
   http://comments.gmane.org/gmane.linux.kbuild.devel/12131

Alim Akhtar (2):
  arm64: exynos7: Enable ARMv8 based Exynos7 (SoC) support
  arm64: Enable Exynos7 SOC in the defconfig

Naveen Krishna Ch (5):
  clk: samsung: add support for 145xx and 1460x PLLs
  clk: samsung: Factor out the common code to clk.c
  clk: samsung: Add fixed_factor_clocks field to struct exynos_cmu_info
  clk: samsung: add initial clock support for Exynos7 SoC
  arm64: dts: Add initial device tree support for EXYNOS7

Pankaj Dubey (1):
  arm64: dts: add <dt-bindings/> symlink

 .../devicetree/bindings/clock/exynos7-clock.txt    |  67 ++++
 arch/arm64/Kconfig                                 |  12 +
 arch/arm64/boot/dts/Makefile                       |   1 +
 arch/arm64/boot/dts/exynos/Makefile                |   5 +
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts    |  39 ++
 arch/arm64/boot/dts/exynos/exynos7.dtsi            | 183 +++++++++
 arch/arm64/boot/dts/include/dt-bindings            |   1 +
 arch/arm64/configs/defconfig                       |   4 +
 drivers/clk/samsung/Makefile                       |   1 +
 drivers/clk/samsung/clk-exynos5260.c               | 185 ++-------
 drivers/clk/samsung/clk-exynos7.c                  | 425 +++++++++++++++++++++
 drivers/clk/samsung/clk-pll.c                      |  25 +-
 drivers/clk/samsung/clk-pll.h                      |   4 +
 drivers/clk/samsung/clk.c                          |  98 +++++
 drivers/clk/samsung/clk.h                          |  37 ++
 include/dt-bindings/clock/exynos7-clk.h            |  49 +++
 16 files changed, 972 insertions(+), 164 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/exynos7-clock.txt
 create mode 100644 arch/arm64/boot/dts/exynos/Makefile
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7-espresso.dts
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7.dtsi
 create mode 120000 arch/arm64/boot/dts/include/dt-bindings
 create mode 100644 drivers/clk/samsung/clk-exynos7.c
 create mode 100644 include/dt-bindings/clock/exynos7-clk.h

-- 
2.1.0

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

* [PATCH v5 1/8] clk: samsung: add support for 145xx and 1460x PLLs
  2014-09-22  4:47 ` Abhilash Kesavan
@ 2014-09-22  4:47   ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: tomasz.figa, naveenkrishna.ch, kesavan.abhilash

From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>

PLL145xx is similar to PLL35xx and PLL1460x is almost similar
to PLL46xx with minor differences in bit positions. Hence,
reuse the functions defined for pll_35xx and pll_46xx to
support 145xx and 1460x PLLs respectively.

Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>
---
 drivers/clk/samsung/clk-pll.c | 25 ++++++++++++++++++++-----
 drivers/clk/samsung/clk-pll.h |  4 ++++
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c
index b07fad2..9d70e5c 100644
--- a/drivers/clk/samsung/clk-pll.c
+++ b/drivers/clk/samsung/clk-pll.c
@@ -482,6 +482,8 @@ static const struct clk_ops samsung_pll45xx_clk_min_ops = {
 
 #define PLL46XX_VSEL_MASK	(1)
 #define PLL46XX_MDIV_MASK	(0x1FF)
+#define PLL1460X_MDIV_MASK	(0x3FF)
+
 #define PLL46XX_PDIV_MASK	(0x3F)
 #define PLL46XX_SDIV_MASK	(0x7)
 #define PLL46XX_VSEL_SHIFT	(27)
@@ -511,13 +513,15 @@ static unsigned long samsung_pll46xx_recalc_rate(struct clk_hw *hw,
 
 	pll_con0 = __raw_readl(pll->con_reg);
 	pll_con1 = __raw_readl(pll->con_reg + 4);
-	mdiv = (pll_con0 >> PLL46XX_MDIV_SHIFT) & PLL46XX_MDIV_MASK;
+	mdiv = (pll_con0 >> PLL46XX_MDIV_SHIFT) & ((pll->type == pll_1460x) ?
+				PLL1460X_MDIV_MASK : PLL46XX_MDIV_MASK);
 	pdiv = (pll_con0 >> PLL46XX_PDIV_SHIFT) & PLL46XX_PDIV_MASK;
 	sdiv = (pll_con0 >> PLL46XX_SDIV_SHIFT) & PLL46XX_SDIV_MASK;
 	kdiv = pll->type == pll_4650c ? pll_con1 & PLL4650C_KDIV_MASK :
 					pll_con1 & PLL46XX_KDIV_MASK;
 
-	shift = pll->type == pll_4600 ? 16 : 10;
+	shift = ((pll->type == pll_4600) || (pll->type == pll_1460x)) ? 16 : 10;
+
 	fvco *= (mdiv << shift) + kdiv;
 	do_div(fvco, (pdiv << sdiv));
 	fvco >>= shift;
@@ -573,14 +577,21 @@ static int samsung_pll46xx_set_rate(struct clk_hw *hw, unsigned long drate,
 		lock = 0xffff;
 
 	/* Set PLL PMS and VSEL values. */
-	con0 &= ~((PLL46XX_MDIV_MASK << PLL46XX_MDIV_SHIFT) |
+	if (pll->type == pll_1460x) {
+		con0 &= ~((PLL1460X_MDIV_MASK << PLL46XX_MDIV_SHIFT) |
+			(PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT) |
+			(PLL46XX_SDIV_MASK << PLL46XX_SDIV_SHIFT));
+	} else {
+		con0 &= ~((PLL46XX_MDIV_MASK << PLL46XX_MDIV_SHIFT) |
 			(PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT) |
 			(PLL46XX_SDIV_MASK << PLL46XX_SDIV_SHIFT) |
 			(PLL46XX_VSEL_MASK << PLL46XX_VSEL_SHIFT));
+		con0 |=	rate->vsel << PLL46XX_VSEL_SHIFT;
+	}
+
 	con0 |= (rate->mdiv << PLL46XX_MDIV_SHIFT) |
 			(rate->pdiv << PLL46XX_PDIV_SHIFT) |
-			(rate->sdiv << PLL46XX_SDIV_SHIFT) |
-			(rate->vsel << PLL46XX_VSEL_SHIFT);
+			(rate->sdiv << PLL46XX_SDIV_SHIFT);
 
 	/* Set PLL K, MFR and MRR values. */
 	con1 = __raw_readl(pll->con_reg + 0x4);
@@ -1190,6 +1201,9 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
 	/* clk_ops for 35xx and 2550 are similar */
 	case pll_35xx:
 	case pll_2550:
+	case pll_1450x:
+	case pll_1451x:
+	case pll_1452x:
 		if (!pll->rate_table)
 			init.ops = &samsung_pll35xx_clk_min_ops;
 		else
@@ -1223,6 +1237,7 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
 	case pll_4600:
 	case pll_4650:
 	case pll_4650c:
+	case pll_1460x:
 		if (!pll->rate_table)
 			init.ops = &samsung_pll46xx_clk_min_ops;
 		else
diff --git a/drivers/clk/samsung/clk-pll.h b/drivers/clk/samsung/clk-pll.h
index c0ed4d4..213de9a 100644
--- a/drivers/clk/samsung/clk-pll.h
+++ b/drivers/clk/samsung/clk-pll.h
@@ -33,6 +33,10 @@ enum samsung_pll_type {
 	pll_s3c2440_mpll,
 	pll_2550xx,
 	pll_2650xx,
+	pll_1450x,
+	pll_1451x,
+	pll_1452x,
+	pll_1460x,
 };
 
 #define PLL_35XX_RATE(_rate, _m, _p, _s)			\
-- 
2.1.0

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

* [PATCH v5 1/8] clk: samsung: add support for 145xx and 1460x PLLs
@ 2014-09-22  4:47   ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-arm-kernel

From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>

PLL145xx is similar to PLL35xx and PLL1460x is almost similar
to PLL46xx with minor differences in bit positions. Hence,
reuse the functions defined for pll_35xx and pll_46xx to
support 145xx and 1460x PLLs respectively.

Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>
---
 drivers/clk/samsung/clk-pll.c | 25 ++++++++++++++++++++-----
 drivers/clk/samsung/clk-pll.h |  4 ++++
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c
index b07fad2..9d70e5c 100644
--- a/drivers/clk/samsung/clk-pll.c
+++ b/drivers/clk/samsung/clk-pll.c
@@ -482,6 +482,8 @@ static const struct clk_ops samsung_pll45xx_clk_min_ops = {
 
 #define PLL46XX_VSEL_MASK	(1)
 #define PLL46XX_MDIV_MASK	(0x1FF)
+#define PLL1460X_MDIV_MASK	(0x3FF)
+
 #define PLL46XX_PDIV_MASK	(0x3F)
 #define PLL46XX_SDIV_MASK	(0x7)
 #define PLL46XX_VSEL_SHIFT	(27)
@@ -511,13 +513,15 @@ static unsigned long samsung_pll46xx_recalc_rate(struct clk_hw *hw,
 
 	pll_con0 = __raw_readl(pll->con_reg);
 	pll_con1 = __raw_readl(pll->con_reg + 4);
-	mdiv = (pll_con0 >> PLL46XX_MDIV_SHIFT) & PLL46XX_MDIV_MASK;
+	mdiv = (pll_con0 >> PLL46XX_MDIV_SHIFT) & ((pll->type == pll_1460x) ?
+				PLL1460X_MDIV_MASK : PLL46XX_MDIV_MASK);
 	pdiv = (pll_con0 >> PLL46XX_PDIV_SHIFT) & PLL46XX_PDIV_MASK;
 	sdiv = (pll_con0 >> PLL46XX_SDIV_SHIFT) & PLL46XX_SDIV_MASK;
 	kdiv = pll->type == pll_4650c ? pll_con1 & PLL4650C_KDIV_MASK :
 					pll_con1 & PLL46XX_KDIV_MASK;
 
-	shift = pll->type == pll_4600 ? 16 : 10;
+	shift = ((pll->type == pll_4600) || (pll->type == pll_1460x)) ? 16 : 10;
+
 	fvco *= (mdiv << shift) + kdiv;
 	do_div(fvco, (pdiv << sdiv));
 	fvco >>= shift;
@@ -573,14 +577,21 @@ static int samsung_pll46xx_set_rate(struct clk_hw *hw, unsigned long drate,
 		lock = 0xffff;
 
 	/* Set PLL PMS and VSEL values. */
-	con0 &= ~((PLL46XX_MDIV_MASK << PLL46XX_MDIV_SHIFT) |
+	if (pll->type == pll_1460x) {
+		con0 &= ~((PLL1460X_MDIV_MASK << PLL46XX_MDIV_SHIFT) |
+			(PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT) |
+			(PLL46XX_SDIV_MASK << PLL46XX_SDIV_SHIFT));
+	} else {
+		con0 &= ~((PLL46XX_MDIV_MASK << PLL46XX_MDIV_SHIFT) |
 			(PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT) |
 			(PLL46XX_SDIV_MASK << PLL46XX_SDIV_SHIFT) |
 			(PLL46XX_VSEL_MASK << PLL46XX_VSEL_SHIFT));
+		con0 |=	rate->vsel << PLL46XX_VSEL_SHIFT;
+	}
+
 	con0 |= (rate->mdiv << PLL46XX_MDIV_SHIFT) |
 			(rate->pdiv << PLL46XX_PDIV_SHIFT) |
-			(rate->sdiv << PLL46XX_SDIV_SHIFT) |
-			(rate->vsel << PLL46XX_VSEL_SHIFT);
+			(rate->sdiv << PLL46XX_SDIV_SHIFT);
 
 	/* Set PLL K, MFR and MRR values. */
 	con1 = __raw_readl(pll->con_reg + 0x4);
@@ -1190,6 +1201,9 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
 	/* clk_ops for 35xx and 2550 are similar */
 	case pll_35xx:
 	case pll_2550:
+	case pll_1450x:
+	case pll_1451x:
+	case pll_1452x:
 		if (!pll->rate_table)
 			init.ops = &samsung_pll35xx_clk_min_ops;
 		else
@@ -1223,6 +1237,7 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
 	case pll_4600:
 	case pll_4650:
 	case pll_4650c:
+	case pll_1460x:
 		if (!pll->rate_table)
 			init.ops = &samsung_pll46xx_clk_min_ops;
 		else
diff --git a/drivers/clk/samsung/clk-pll.h b/drivers/clk/samsung/clk-pll.h
index c0ed4d4..213de9a 100644
--- a/drivers/clk/samsung/clk-pll.h
+++ b/drivers/clk/samsung/clk-pll.h
@@ -33,6 +33,10 @@ enum samsung_pll_type {
 	pll_s3c2440_mpll,
 	pll_2550xx,
 	pll_2650xx,
+	pll_1450x,
+	pll_1451x,
+	pll_1452x,
+	pll_1460x,
 };
 
 #define PLL_35XX_RATE(_rate, _m, _p, _s)			\
-- 
2.1.0

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

* [PATCH v5 2/8] clk: samsung: Factor out the common code to clk.c
  2014-09-22  4:47 ` Abhilash Kesavan
@ 2014-09-22  4:47   ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: tomasz.figa, naveenkrishna.ch, kesavan.abhilash

From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>

While adding clock support for Exynos5260, the infrastructure to
register multiple clock controllers was introduced. Factor out the
support for registering multiple clock controller from Exynos5260
clock code to common samsung clock code so that it can be used by
other Exynos SoC which have multiple clock controllers.

Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>
---
 drivers/clk/samsung/clk-exynos5260.c | 185 +++++------------------------------
 drivers/clk/samsung/clk.c            |  95 ++++++++++++++++++
 drivers/clk/samsung/clk.h            |  34 +++++++
 3 files changed, 155 insertions(+), 159 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5260.c b/drivers/clk/samsung/clk-exynos5260.c
index ce3de97..64aeadf 100644
--- a/drivers/clk/samsung/clk-exynos5260.c
+++ b/drivers/clk/samsung/clk-exynos5260.c
@@ -11,10 +11,8 @@
 
 #include <linux/clk.h>
 #include <linux/clkdev.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/syscore_ops.h>
 
 #include "clk-exynos5260.h"
 #include "clk.h"
@@ -22,39 +20,6 @@
 
 #include <dt-bindings/clock/exynos5260-clk.h>
 
-static LIST_HEAD(clock_reg_cache_list);
-
-struct exynos5260_clock_reg_cache {
-	struct list_head node;
-	void __iomem *reg_base;
-	struct samsung_clk_reg_dump *rdump;
-	unsigned int rd_num;
-};
-
-struct exynos5260_cmu_info {
-	/* list of pll clocks and respective count */
-	struct samsung_pll_clock *pll_clks;
-	unsigned int nr_pll_clks;
-	/* list of mux clocks and respective count */
-	struct samsung_mux_clock *mux_clks;
-	unsigned int nr_mux_clks;
-	/* list of div clocks and respective count */
-	struct samsung_div_clock *div_clks;
-	unsigned int nr_div_clks;
-	/* list of gate clocks and respective count */
-	struct samsung_gate_clock *gate_clks;
-	unsigned int nr_gate_clks;
-	/* list of fixed clocks and respective count */
-	struct samsung_fixed_rate_clock *fixed_clks;
-	unsigned int nr_fixed_clks;
-	/* total number of clocks with IDs assigned*/
-	unsigned int nr_clk_ids;
-
-	/* list and number of clocks registers */
-	unsigned long *clk_regs;
-	unsigned int nr_clk_regs;
-};
-
 /*
  * Applicable for all 2550 Type PLLS for Exynos5260, listed below
  * DISP_PLL, EGL_PLL, KFC_PLL, MEM_PLL, BUS_PLL, MEDIA_PLL, G3D_PLL.
@@ -113,104 +78,6 @@ static struct samsung_pll_rate_table pll2650_24mhz_tbl[] __initdata = {
 	PLL_36XX_RATE(66000000, 176, 2, 5, 0),
 };
 
-#ifdef CONFIG_PM_SLEEP
-
-static int exynos5260_clk_suspend(void)
-{
-	struct exynos5260_clock_reg_cache *cache;
-
-	list_for_each_entry(cache, &clock_reg_cache_list, node)
-		samsung_clk_save(cache->reg_base, cache->rdump,
-				cache->rd_num);
-
-	return 0;
-}
-
-static void exynos5260_clk_resume(void)
-{
-	struct exynos5260_clock_reg_cache *cache;
-
-	list_for_each_entry(cache, &clock_reg_cache_list, node)
-		samsung_clk_restore(cache->reg_base, cache->rdump,
-				cache->rd_num);
-}
-
-static struct syscore_ops exynos5260_clk_syscore_ops = {
-	.suspend = exynos5260_clk_suspend,
-	.resume = exynos5260_clk_resume,
-};
-
-static void exynos5260_clk_sleep_init(void __iomem *reg_base,
-			unsigned long *rdump,
-			unsigned long nr_rdump)
-{
-	struct exynos5260_clock_reg_cache *reg_cache;
-
-	reg_cache = kzalloc(sizeof(struct exynos5260_clock_reg_cache),
-			GFP_KERNEL);
-	if (!reg_cache)
-		panic("could not allocate register cache.\n");
-
-	reg_cache->rdump = samsung_clk_alloc_reg_dump(rdump, nr_rdump);
-
-	if (!reg_cache->rdump)
-		panic("could not allocate register dump storage.\n");
-
-	if (list_empty(&clock_reg_cache_list))
-		register_syscore_ops(&exynos5260_clk_syscore_ops);
-
-	reg_cache->rd_num = nr_rdump;
-	reg_cache->reg_base = reg_base;
-	list_add_tail(&reg_cache->node, &clock_reg_cache_list);
-}
-
-#else
-static void exynos5260_clk_sleep_init(void __iomem *reg_base,
-			unsigned long *rdump,
-			unsigned long nr_rdump){}
-#endif
-
-/*
- * Common function which registers plls, muxes, dividers and gates
- * for each CMU. It also add CMU register list to register cache.
- */
-
-void __init exynos5260_cmu_register_one(struct device_node *np,
-			struct exynos5260_cmu_info *cmu)
-{
-	void __iomem *reg_base;
-	struct samsung_clk_provider *ctx;
-
-	reg_base = of_iomap(np, 0);
-	if (!reg_base)
-		panic("%s: failed to map registers\n", __func__);
-
-	ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
-	if (!ctx)
-		panic("%s: unable to alllocate ctx\n", __func__);
-
-	if (cmu->pll_clks)
-		samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_pll_clks,
-			reg_base);
-	if (cmu->mux_clks)
-		samsung_clk_register_mux(ctx,  cmu->mux_clks,
-			cmu->nr_mux_clks);
-	if (cmu->div_clks)
-		samsung_clk_register_div(ctx, cmu->div_clks, cmu->nr_div_clks);
-	if (cmu->gate_clks)
-		samsung_clk_register_gate(ctx, cmu->gate_clks,
-			cmu->nr_gate_clks);
-	if (cmu->fixed_clks)
-		samsung_clk_register_fixed_rate(ctx, cmu->fixed_clks,
-			cmu->nr_fixed_clks);
-	if (cmu->clk_regs)
-		exynos5260_clk_sleep_init(reg_base, cmu->clk_regs,
-			cmu->nr_clk_regs);
-
-	samsung_clk_of_add_provider(np, ctx);
-}
-
-
 /* CMU_AUD */
 
 static unsigned long aud_clk_regs[] __initdata = {
@@ -268,7 +135,7 @@ struct samsung_gate_clock aud_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_aud_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = aud_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(aud_mux_clks);
@@ -280,7 +147,7 @@ static void __init exynos5260_clk_aud_init(struct device_node *np)
 	cmu.clk_regs = aud_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(aud_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_aud, "samsung,exynos5260-clock-aud",
@@ -458,7 +325,7 @@ struct samsung_gate_clock disp_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_disp_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = disp_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(disp_mux_clks);
@@ -470,7 +337,7 @@ static void __init exynos5260_clk_disp_init(struct device_node *np)
 	cmu.clk_regs = disp_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(disp_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_disp, "samsung,exynos5260-clock-disp",
@@ -522,7 +389,7 @@ static struct samsung_pll_clock egl_pll_clks[] __initdata = {
 
 static void __init exynos5260_clk_egl_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.pll_clks = egl_pll_clks;
 	cmu.nr_pll_clks =  ARRAY_SIZE(egl_pll_clks);
@@ -534,7 +401,7 @@ static void __init exynos5260_clk_egl_init(struct device_node *np)
 	cmu.clk_regs = egl_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(egl_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_egl, "samsung,exynos5260-clock-egl",
@@ -624,7 +491,7 @@ struct samsung_gate_clock fsys_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_fsys_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = fsys_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(fsys_mux_clks);
@@ -634,7 +501,7 @@ static void __init exynos5260_clk_fsys_init(struct device_node *np)
 	cmu.clk_regs = fsys_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(fsys_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_fsys, "samsung,exynos5260-clock-fsys",
@@ -713,7 +580,7 @@ struct samsung_gate_clock g2d_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_g2d_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = g2d_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(g2d_mux_clks);
@@ -725,7 +592,7 @@ static void __init exynos5260_clk_g2d_init(struct device_node *np)
 	cmu.clk_regs = g2d_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(g2d_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_g2d, "samsung,exynos5260-clock-g2d",
@@ -774,7 +641,7 @@ static struct samsung_pll_clock g3d_pll_clks[] __initdata = {
 
 static void __init exynos5260_clk_g3d_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.pll_clks = g3d_pll_clks;
 	cmu.nr_pll_clks =  ARRAY_SIZE(g3d_pll_clks);
@@ -788,7 +655,7 @@ static void __init exynos5260_clk_g3d_init(struct device_node *np)
 	cmu.clk_regs = g3d_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(g3d_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_g3d, "samsung,exynos5260-clock-g3d",
@@ -909,7 +776,7 @@ struct samsung_gate_clock gscl_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_gscl_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = gscl_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(gscl_mux_clks);
@@ -921,7 +788,7 @@ static void __init exynos5260_clk_gscl_init(struct device_node *np)
 	cmu.clk_regs = gscl_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(gscl_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_gscl, "samsung,exynos5260-clock-gscl",
@@ -1028,7 +895,7 @@ struct samsung_gate_clock isp_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_isp_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = isp_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(isp_mux_clks);
@@ -1040,7 +907,7 @@ static void __init exynos5260_clk_isp_init(struct device_node *np)
 	cmu.clk_regs = isp_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(isp_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_isp, "samsung,exynos5260-clock-isp",
@@ -1092,7 +959,7 @@ static struct samsung_pll_clock kfc_pll_clks[] __initdata = {
 
 static void __init exynos5260_clk_kfc_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.pll_clks = kfc_pll_clks;
 	cmu.nr_pll_clks =  ARRAY_SIZE(kfc_pll_clks);
@@ -1104,7 +971,7 @@ static void __init exynos5260_clk_kfc_init(struct device_node *np)
 	cmu.clk_regs = kfc_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(kfc_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_kfc, "samsung,exynos5260-clock-kfc",
@@ -1148,7 +1015,7 @@ struct samsung_gate_clock mfc_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_mfc_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = mfc_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(mfc_mux_clks);
@@ -1160,7 +1027,7 @@ static void __init exynos5260_clk_mfc_init(struct device_node *np)
 	cmu.clk_regs = mfc_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(mfc_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_mfc, "samsung,exynos5260-clock-mfc",
@@ -1295,7 +1162,7 @@ static struct samsung_pll_clock mif_pll_clks[] __initdata = {
 
 static void __init exynos5260_clk_mif_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.pll_clks = mif_pll_clks;
 	cmu.nr_pll_clks =  ARRAY_SIZE(mif_pll_clks);
@@ -1309,7 +1176,7 @@ static void __init exynos5260_clk_mif_init(struct device_node *np)
 	cmu.clk_regs = mif_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(mif_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_mif, "samsung,exynos5260-clock-mif",
@@ -1503,7 +1370,7 @@ struct samsung_gate_clock peri_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_peri_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = peri_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(peri_mux_clks);
@@ -1515,7 +1382,7 @@ static void __init exynos5260_clk_peri_init(struct device_node *np)
 	cmu.clk_regs = peri_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(peri_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_peri, "samsung,exynos5260-clock-peri",
@@ -1959,7 +1826,7 @@ static struct samsung_pll_clock top_pll_clks[] __initdata = {
 
 static void __init exynos5260_clk_top_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.pll_clks = top_pll_clks;
 	cmu.nr_pll_clks =  ARRAY_SIZE(top_pll_clks);
@@ -1975,7 +1842,7 @@ static void __init exynos5260_clk_top_init(struct device_node *np)
 	cmu.clk_regs = top_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(top_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_top, "samsung,exynos5260-clock-top",
diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index deab84d..a648236 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -14,6 +14,8 @@
 #include <linux/syscore_ops.h>
 #include "clk.h"
 
+static LIST_HEAD(clock_reg_cache_list);
+
 void samsung_clk_save(void __iomem *base,
 				    struct samsung_clk_reg_dump *rd,
 				    unsigned int num_regs)
@@ -313,3 +315,96 @@ unsigned long _get_rate(const char *clk_name)
 
 	return clk_get_rate(clk);
 }
+
+#ifdef CONFIG_PM_SLEEP
+static int samsung_clk_suspend(void)
+{
+	struct samsung_clock_reg_cache *reg_cache;
+
+	list_for_each_entry(reg_cache, &clock_reg_cache_list, node)
+		samsung_clk_save(reg_cache->reg_base, reg_cache->rdump,
+				reg_cache->rd_num);
+	return 0;
+}
+
+static void samsung_clk_resume(void)
+{
+	struct samsung_clock_reg_cache *reg_cache;
+
+	list_for_each_entry(reg_cache, &clock_reg_cache_list, node)
+		samsung_clk_restore(reg_cache->reg_base, reg_cache->rdump,
+				reg_cache->rd_num);
+}
+
+static struct syscore_ops samsung_clk_syscore_ops = {
+	.suspend = samsung_clk_suspend,
+	.resume = samsung_clk_resume,
+};
+
+static void samsung_clk_sleep_init(void __iomem *reg_base,
+		const unsigned long *rdump,
+		unsigned long nr_rdump)
+{
+	struct samsung_clock_reg_cache *reg_cache;
+
+	reg_cache = kzalloc(sizeof(struct samsung_clock_reg_cache),
+			GFP_KERNEL);
+	if (!reg_cache)
+		panic("could not allocate register reg_cache.\n");
+	reg_cache->rdump = samsung_clk_alloc_reg_dump(rdump, nr_rdump);
+
+	if (!reg_cache->rdump)
+		panic("could not allocate register dump storage.\n");
+
+	if (list_empty(&clock_reg_cache_list))
+		register_syscore_ops(&samsung_clk_syscore_ops);
+
+	reg_cache->reg_base = reg_base;
+	reg_cache->rd_num = nr_rdump;
+	list_add_tail(&reg_cache->node, &clock_reg_cache_list);
+}
+
+#else
+static void samsung_clk_sleep_init(void __iomem *reg_base,
+		const unsigned long *rdump,
+		unsigned long nr_rdump) {}
+#endif
+
+/*
+ * Common function which registers plls, muxes, dividers and gates
+ * for each CMU. It also add CMU register list to register cache.
+ */
+void __init samsung_cmu_register_one(struct device_node *np,
+			struct samsung_cmu_info *cmu)
+{
+	void __iomem *reg_base;
+	struct samsung_clk_provider *ctx;
+
+	reg_base = of_iomap(np, 0);
+	if (!reg_base)
+		panic("%s: failed to map registers\n", __func__);
+
+	ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
+	if (!ctx)
+		panic("%s: unable to alllocate ctx\n", __func__);
+
+	if (cmu->pll_clks)
+		samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_pll_clks,
+			reg_base);
+	if (cmu->mux_clks)
+		samsung_clk_register_mux(ctx, cmu->mux_clks,
+			cmu->nr_mux_clks);
+	if (cmu->div_clks)
+		samsung_clk_register_div(ctx, cmu->div_clks, cmu->nr_div_clks);
+	if (cmu->gate_clks)
+		samsung_clk_register_gate(ctx, cmu->gate_clks,
+			cmu->nr_gate_clks);
+	if (cmu->fixed_clks)
+		samsung_clk_register_fixed_rate(ctx, cmu->fixed_clks,
+			cmu->nr_fixed_clks);
+	if (cmu->clk_regs)
+		samsung_clk_sleep_init(reg_base, cmu->clk_regs,
+			cmu->nr_clk_regs);
+
+	samsung_clk_of_add_provider(np, ctx);
+}
diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
index 66ab36b..b3d0f4d 100644
--- a/drivers/clk/samsung/clk.h
+++ b/drivers/clk/samsung/clk.h
@@ -324,6 +324,37 @@ struct samsung_pll_clock {
 	__PLL(_typ, _id, NULL, _name, _pname, CLK_GET_RATE_NOCACHE,	\
 		_lock, _con, _rtable, _alias)
 
+struct samsung_clock_reg_cache {
+	struct list_head node;
+	void __iomem *reg_base;
+	struct samsung_clk_reg_dump *rdump;
+	unsigned int rd_num;
+};
+
+struct samsung_cmu_info {
+	/* list of pll clocks and respective count */
+	struct samsung_pll_clock *pll_clks;
+	unsigned int nr_pll_clks;
+	/* list of mux clocks and respective count */
+	struct samsung_mux_clock *mux_clks;
+	unsigned int nr_mux_clks;
+	/* list of div clocks and respective count */
+	struct samsung_div_clock *div_clks;
+	unsigned int nr_div_clks;
+	/* list of gate clocks and respective count */
+	struct samsung_gate_clock *gate_clks;
+	unsigned int nr_gate_clks;
+	/* list of fixed clocks and respective count */
+	struct samsung_fixed_rate_clock *fixed_clks;
+	unsigned int nr_fixed_clks;
+	/* total number of clocks with IDs assigned*/
+	unsigned int nr_clk_ids;
+
+	/* list and number of clocks registers */
+	unsigned long *clk_regs;
+	unsigned int nr_clk_regs;
+};
+
 extern struct samsung_clk_provider *__init samsung_clk_init(
 			struct device_node *np, void __iomem *base,
 			unsigned long nr_clks);
@@ -362,6 +393,9 @@ extern void __init samsung_clk_register_pll(struct samsung_clk_provider *ctx,
 			struct samsung_pll_clock *pll_list,
 			unsigned int nr_clk, void __iomem *base);
 
+extern void __init samsung_cmu_register_one(struct device_node *,
+			struct samsung_cmu_info *);
+
 extern unsigned long _get_rate(const char *clk_name);
 
 extern void samsung_clk_save(void __iomem *base,
-- 
2.1.0

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

* [PATCH v5 2/8] clk: samsung: Factor out the common code to clk.c
@ 2014-09-22  4:47   ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-arm-kernel

From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>

While adding clock support for Exynos5260, the infrastructure to
register multiple clock controllers was introduced. Factor out the
support for registering multiple clock controller from Exynos5260
clock code to common samsung clock code so that it can be used by
other Exynos SoC which have multiple clock controllers.

Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>
---
 drivers/clk/samsung/clk-exynos5260.c | 185 +++++------------------------------
 drivers/clk/samsung/clk.c            |  95 ++++++++++++++++++
 drivers/clk/samsung/clk.h            |  34 +++++++
 3 files changed, 155 insertions(+), 159 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5260.c b/drivers/clk/samsung/clk-exynos5260.c
index ce3de97..64aeadf 100644
--- a/drivers/clk/samsung/clk-exynos5260.c
+++ b/drivers/clk/samsung/clk-exynos5260.c
@@ -11,10 +11,8 @@
 
 #include <linux/clk.h>
 #include <linux/clkdev.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/syscore_ops.h>
 
 #include "clk-exynos5260.h"
 #include "clk.h"
@@ -22,39 +20,6 @@
 
 #include <dt-bindings/clock/exynos5260-clk.h>
 
-static LIST_HEAD(clock_reg_cache_list);
-
-struct exynos5260_clock_reg_cache {
-	struct list_head node;
-	void __iomem *reg_base;
-	struct samsung_clk_reg_dump *rdump;
-	unsigned int rd_num;
-};
-
-struct exynos5260_cmu_info {
-	/* list of pll clocks and respective count */
-	struct samsung_pll_clock *pll_clks;
-	unsigned int nr_pll_clks;
-	/* list of mux clocks and respective count */
-	struct samsung_mux_clock *mux_clks;
-	unsigned int nr_mux_clks;
-	/* list of div clocks and respective count */
-	struct samsung_div_clock *div_clks;
-	unsigned int nr_div_clks;
-	/* list of gate clocks and respective count */
-	struct samsung_gate_clock *gate_clks;
-	unsigned int nr_gate_clks;
-	/* list of fixed clocks and respective count */
-	struct samsung_fixed_rate_clock *fixed_clks;
-	unsigned int nr_fixed_clks;
-	/* total number of clocks with IDs assigned*/
-	unsigned int nr_clk_ids;
-
-	/* list and number of clocks registers */
-	unsigned long *clk_regs;
-	unsigned int nr_clk_regs;
-};
-
 /*
  * Applicable for all 2550 Type PLLS for Exynos5260, listed below
  * DISP_PLL, EGL_PLL, KFC_PLL, MEM_PLL, BUS_PLL, MEDIA_PLL, G3D_PLL.
@@ -113,104 +78,6 @@ static struct samsung_pll_rate_table pll2650_24mhz_tbl[] __initdata = {
 	PLL_36XX_RATE(66000000, 176, 2, 5, 0),
 };
 
-#ifdef CONFIG_PM_SLEEP
-
-static int exynos5260_clk_suspend(void)
-{
-	struct exynos5260_clock_reg_cache *cache;
-
-	list_for_each_entry(cache, &clock_reg_cache_list, node)
-		samsung_clk_save(cache->reg_base, cache->rdump,
-				cache->rd_num);
-
-	return 0;
-}
-
-static void exynos5260_clk_resume(void)
-{
-	struct exynos5260_clock_reg_cache *cache;
-
-	list_for_each_entry(cache, &clock_reg_cache_list, node)
-		samsung_clk_restore(cache->reg_base, cache->rdump,
-				cache->rd_num);
-}
-
-static struct syscore_ops exynos5260_clk_syscore_ops = {
-	.suspend = exynos5260_clk_suspend,
-	.resume = exynos5260_clk_resume,
-};
-
-static void exynos5260_clk_sleep_init(void __iomem *reg_base,
-			unsigned long *rdump,
-			unsigned long nr_rdump)
-{
-	struct exynos5260_clock_reg_cache *reg_cache;
-
-	reg_cache = kzalloc(sizeof(struct exynos5260_clock_reg_cache),
-			GFP_KERNEL);
-	if (!reg_cache)
-		panic("could not allocate register cache.\n");
-
-	reg_cache->rdump = samsung_clk_alloc_reg_dump(rdump, nr_rdump);
-
-	if (!reg_cache->rdump)
-		panic("could not allocate register dump storage.\n");
-
-	if (list_empty(&clock_reg_cache_list))
-		register_syscore_ops(&exynos5260_clk_syscore_ops);
-
-	reg_cache->rd_num = nr_rdump;
-	reg_cache->reg_base = reg_base;
-	list_add_tail(&reg_cache->node, &clock_reg_cache_list);
-}
-
-#else
-static void exynos5260_clk_sleep_init(void __iomem *reg_base,
-			unsigned long *rdump,
-			unsigned long nr_rdump){}
-#endif
-
-/*
- * Common function which registers plls, muxes, dividers and gates
- * for each CMU. It also add CMU register list to register cache.
- */
-
-void __init exynos5260_cmu_register_one(struct device_node *np,
-			struct exynos5260_cmu_info *cmu)
-{
-	void __iomem *reg_base;
-	struct samsung_clk_provider *ctx;
-
-	reg_base = of_iomap(np, 0);
-	if (!reg_base)
-		panic("%s: failed to map registers\n", __func__);
-
-	ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
-	if (!ctx)
-		panic("%s: unable to alllocate ctx\n", __func__);
-
-	if (cmu->pll_clks)
-		samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_pll_clks,
-			reg_base);
-	if (cmu->mux_clks)
-		samsung_clk_register_mux(ctx,  cmu->mux_clks,
-			cmu->nr_mux_clks);
-	if (cmu->div_clks)
-		samsung_clk_register_div(ctx, cmu->div_clks, cmu->nr_div_clks);
-	if (cmu->gate_clks)
-		samsung_clk_register_gate(ctx, cmu->gate_clks,
-			cmu->nr_gate_clks);
-	if (cmu->fixed_clks)
-		samsung_clk_register_fixed_rate(ctx, cmu->fixed_clks,
-			cmu->nr_fixed_clks);
-	if (cmu->clk_regs)
-		exynos5260_clk_sleep_init(reg_base, cmu->clk_regs,
-			cmu->nr_clk_regs);
-
-	samsung_clk_of_add_provider(np, ctx);
-}
-
-
 /* CMU_AUD */
 
 static unsigned long aud_clk_regs[] __initdata = {
@@ -268,7 +135,7 @@ struct samsung_gate_clock aud_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_aud_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = aud_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(aud_mux_clks);
@@ -280,7 +147,7 @@ static void __init exynos5260_clk_aud_init(struct device_node *np)
 	cmu.clk_regs = aud_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(aud_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_aud, "samsung,exynos5260-clock-aud",
@@ -458,7 +325,7 @@ struct samsung_gate_clock disp_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_disp_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = disp_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(disp_mux_clks);
@@ -470,7 +337,7 @@ static void __init exynos5260_clk_disp_init(struct device_node *np)
 	cmu.clk_regs = disp_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(disp_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_disp, "samsung,exynos5260-clock-disp",
@@ -522,7 +389,7 @@ static struct samsung_pll_clock egl_pll_clks[] __initdata = {
 
 static void __init exynos5260_clk_egl_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.pll_clks = egl_pll_clks;
 	cmu.nr_pll_clks =  ARRAY_SIZE(egl_pll_clks);
@@ -534,7 +401,7 @@ static void __init exynos5260_clk_egl_init(struct device_node *np)
 	cmu.clk_regs = egl_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(egl_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_egl, "samsung,exynos5260-clock-egl",
@@ -624,7 +491,7 @@ struct samsung_gate_clock fsys_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_fsys_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = fsys_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(fsys_mux_clks);
@@ -634,7 +501,7 @@ static void __init exynos5260_clk_fsys_init(struct device_node *np)
 	cmu.clk_regs = fsys_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(fsys_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_fsys, "samsung,exynos5260-clock-fsys",
@@ -713,7 +580,7 @@ struct samsung_gate_clock g2d_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_g2d_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = g2d_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(g2d_mux_clks);
@@ -725,7 +592,7 @@ static void __init exynos5260_clk_g2d_init(struct device_node *np)
 	cmu.clk_regs = g2d_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(g2d_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_g2d, "samsung,exynos5260-clock-g2d",
@@ -774,7 +641,7 @@ static struct samsung_pll_clock g3d_pll_clks[] __initdata = {
 
 static void __init exynos5260_clk_g3d_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.pll_clks = g3d_pll_clks;
 	cmu.nr_pll_clks =  ARRAY_SIZE(g3d_pll_clks);
@@ -788,7 +655,7 @@ static void __init exynos5260_clk_g3d_init(struct device_node *np)
 	cmu.clk_regs = g3d_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(g3d_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_g3d, "samsung,exynos5260-clock-g3d",
@@ -909,7 +776,7 @@ struct samsung_gate_clock gscl_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_gscl_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = gscl_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(gscl_mux_clks);
@@ -921,7 +788,7 @@ static void __init exynos5260_clk_gscl_init(struct device_node *np)
 	cmu.clk_regs = gscl_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(gscl_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_gscl, "samsung,exynos5260-clock-gscl",
@@ -1028,7 +895,7 @@ struct samsung_gate_clock isp_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_isp_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = isp_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(isp_mux_clks);
@@ -1040,7 +907,7 @@ static void __init exynos5260_clk_isp_init(struct device_node *np)
 	cmu.clk_regs = isp_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(isp_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_isp, "samsung,exynos5260-clock-isp",
@@ -1092,7 +959,7 @@ static struct samsung_pll_clock kfc_pll_clks[] __initdata = {
 
 static void __init exynos5260_clk_kfc_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.pll_clks = kfc_pll_clks;
 	cmu.nr_pll_clks =  ARRAY_SIZE(kfc_pll_clks);
@@ -1104,7 +971,7 @@ static void __init exynos5260_clk_kfc_init(struct device_node *np)
 	cmu.clk_regs = kfc_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(kfc_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_kfc, "samsung,exynos5260-clock-kfc",
@@ -1148,7 +1015,7 @@ struct samsung_gate_clock mfc_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_mfc_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = mfc_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(mfc_mux_clks);
@@ -1160,7 +1027,7 @@ static void __init exynos5260_clk_mfc_init(struct device_node *np)
 	cmu.clk_regs = mfc_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(mfc_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_mfc, "samsung,exynos5260-clock-mfc",
@@ -1295,7 +1162,7 @@ static struct samsung_pll_clock mif_pll_clks[] __initdata = {
 
 static void __init exynos5260_clk_mif_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.pll_clks = mif_pll_clks;
 	cmu.nr_pll_clks =  ARRAY_SIZE(mif_pll_clks);
@@ -1309,7 +1176,7 @@ static void __init exynos5260_clk_mif_init(struct device_node *np)
 	cmu.clk_regs = mif_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(mif_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_mif, "samsung,exynos5260-clock-mif",
@@ -1503,7 +1370,7 @@ struct samsung_gate_clock peri_gate_clks[] __initdata = {
 
 static void __init exynos5260_clk_peri_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.mux_clks = peri_mux_clks;
 	cmu.nr_mux_clks = ARRAY_SIZE(peri_mux_clks);
@@ -1515,7 +1382,7 @@ static void __init exynos5260_clk_peri_init(struct device_node *np)
 	cmu.clk_regs = peri_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(peri_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_peri, "samsung,exynos5260-clock-peri",
@@ -1959,7 +1826,7 @@ static struct samsung_pll_clock top_pll_clks[] __initdata = {
 
 static void __init exynos5260_clk_top_init(struct device_node *np)
 {
-	struct exynos5260_cmu_info cmu = {0};
+	struct samsung_cmu_info cmu = {0};
 
 	cmu.pll_clks = top_pll_clks;
 	cmu.nr_pll_clks =  ARRAY_SIZE(top_pll_clks);
@@ -1975,7 +1842,7 @@ static void __init exynos5260_clk_top_init(struct device_node *np)
 	cmu.clk_regs = top_clk_regs;
 	cmu.nr_clk_regs = ARRAY_SIZE(top_clk_regs);
 
-	exynos5260_cmu_register_one(np, &cmu);
+	samsung_cmu_register_one(np, &cmu);
 }
 
 CLK_OF_DECLARE(exynos5260_clk_top, "samsung,exynos5260-clock-top",
diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index deab84d..a648236 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -14,6 +14,8 @@
 #include <linux/syscore_ops.h>
 #include "clk.h"
 
+static LIST_HEAD(clock_reg_cache_list);
+
 void samsung_clk_save(void __iomem *base,
 				    struct samsung_clk_reg_dump *rd,
 				    unsigned int num_regs)
@@ -313,3 +315,96 @@ unsigned long _get_rate(const char *clk_name)
 
 	return clk_get_rate(clk);
 }
+
+#ifdef CONFIG_PM_SLEEP
+static int samsung_clk_suspend(void)
+{
+	struct samsung_clock_reg_cache *reg_cache;
+
+	list_for_each_entry(reg_cache, &clock_reg_cache_list, node)
+		samsung_clk_save(reg_cache->reg_base, reg_cache->rdump,
+				reg_cache->rd_num);
+	return 0;
+}
+
+static void samsung_clk_resume(void)
+{
+	struct samsung_clock_reg_cache *reg_cache;
+
+	list_for_each_entry(reg_cache, &clock_reg_cache_list, node)
+		samsung_clk_restore(reg_cache->reg_base, reg_cache->rdump,
+				reg_cache->rd_num);
+}
+
+static struct syscore_ops samsung_clk_syscore_ops = {
+	.suspend = samsung_clk_suspend,
+	.resume = samsung_clk_resume,
+};
+
+static void samsung_clk_sleep_init(void __iomem *reg_base,
+		const unsigned long *rdump,
+		unsigned long nr_rdump)
+{
+	struct samsung_clock_reg_cache *reg_cache;
+
+	reg_cache = kzalloc(sizeof(struct samsung_clock_reg_cache),
+			GFP_KERNEL);
+	if (!reg_cache)
+		panic("could not allocate register reg_cache.\n");
+	reg_cache->rdump = samsung_clk_alloc_reg_dump(rdump, nr_rdump);
+
+	if (!reg_cache->rdump)
+		panic("could not allocate register dump storage.\n");
+
+	if (list_empty(&clock_reg_cache_list))
+		register_syscore_ops(&samsung_clk_syscore_ops);
+
+	reg_cache->reg_base = reg_base;
+	reg_cache->rd_num = nr_rdump;
+	list_add_tail(&reg_cache->node, &clock_reg_cache_list);
+}
+
+#else
+static void samsung_clk_sleep_init(void __iomem *reg_base,
+		const unsigned long *rdump,
+		unsigned long nr_rdump) {}
+#endif
+
+/*
+ * Common function which registers plls, muxes, dividers and gates
+ * for each CMU. It also add CMU register list to register cache.
+ */
+void __init samsung_cmu_register_one(struct device_node *np,
+			struct samsung_cmu_info *cmu)
+{
+	void __iomem *reg_base;
+	struct samsung_clk_provider *ctx;
+
+	reg_base = of_iomap(np, 0);
+	if (!reg_base)
+		panic("%s: failed to map registers\n", __func__);
+
+	ctx = samsung_clk_init(np, reg_base, cmu->nr_clk_ids);
+	if (!ctx)
+		panic("%s: unable to alllocate ctx\n", __func__);
+
+	if (cmu->pll_clks)
+		samsung_clk_register_pll(ctx, cmu->pll_clks, cmu->nr_pll_clks,
+			reg_base);
+	if (cmu->mux_clks)
+		samsung_clk_register_mux(ctx, cmu->mux_clks,
+			cmu->nr_mux_clks);
+	if (cmu->div_clks)
+		samsung_clk_register_div(ctx, cmu->div_clks, cmu->nr_div_clks);
+	if (cmu->gate_clks)
+		samsung_clk_register_gate(ctx, cmu->gate_clks,
+			cmu->nr_gate_clks);
+	if (cmu->fixed_clks)
+		samsung_clk_register_fixed_rate(ctx, cmu->fixed_clks,
+			cmu->nr_fixed_clks);
+	if (cmu->clk_regs)
+		samsung_clk_sleep_init(reg_base, cmu->clk_regs,
+			cmu->nr_clk_regs);
+
+	samsung_clk_of_add_provider(np, ctx);
+}
diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
index 66ab36b..b3d0f4d 100644
--- a/drivers/clk/samsung/clk.h
+++ b/drivers/clk/samsung/clk.h
@@ -324,6 +324,37 @@ struct samsung_pll_clock {
 	__PLL(_typ, _id, NULL, _name, _pname, CLK_GET_RATE_NOCACHE,	\
 		_lock, _con, _rtable, _alias)
 
+struct samsung_clock_reg_cache {
+	struct list_head node;
+	void __iomem *reg_base;
+	struct samsung_clk_reg_dump *rdump;
+	unsigned int rd_num;
+};
+
+struct samsung_cmu_info {
+	/* list of pll clocks and respective count */
+	struct samsung_pll_clock *pll_clks;
+	unsigned int nr_pll_clks;
+	/* list of mux clocks and respective count */
+	struct samsung_mux_clock *mux_clks;
+	unsigned int nr_mux_clks;
+	/* list of div clocks and respective count */
+	struct samsung_div_clock *div_clks;
+	unsigned int nr_div_clks;
+	/* list of gate clocks and respective count */
+	struct samsung_gate_clock *gate_clks;
+	unsigned int nr_gate_clks;
+	/* list of fixed clocks and respective count */
+	struct samsung_fixed_rate_clock *fixed_clks;
+	unsigned int nr_fixed_clks;
+	/* total number of clocks with IDs assigned*/
+	unsigned int nr_clk_ids;
+
+	/* list and number of clocks registers */
+	unsigned long *clk_regs;
+	unsigned int nr_clk_regs;
+};
+
 extern struct samsung_clk_provider *__init samsung_clk_init(
 			struct device_node *np, void __iomem *base,
 			unsigned long nr_clks);
@@ -362,6 +393,9 @@ extern void __init samsung_clk_register_pll(struct samsung_clk_provider *ctx,
 			struct samsung_pll_clock *pll_list,
 			unsigned int nr_clk, void __iomem *base);
 
+extern void __init samsung_cmu_register_one(struct device_node *,
+			struct samsung_cmu_info *);
+
 extern unsigned long _get_rate(const char *clk_name);
 
 extern void samsung_clk_save(void __iomem *base,
-- 
2.1.0

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

* [PATCH v5 3/8] clk: samsung: Add fixed_factor_clocks field to struct exynos_cmu_info
  2014-09-22  4:47 ` Abhilash Kesavan
@ 2014-09-22  4:47   ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: tomasz.figa, naveenkrishna.ch, kesavan.abhilash

From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>

Add the fields "fixed_factor_clks" and "nr_fixed_factor_clks" to
"struct exynos_cmu_info" to allow registering of fixed factor
clocks as well with exynos_cmu_register_one().

Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>
---
 drivers/clk/samsung/clk.c | 3 +++
 drivers/clk/samsung/clk.h | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index a648236..dd1f7c9 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -402,6 +402,9 @@ void __init samsung_cmu_register_one(struct device_node *np,
 	if (cmu->fixed_clks)
 		samsung_clk_register_fixed_rate(ctx, cmu->fixed_clks,
 			cmu->nr_fixed_clks);
+	if (cmu->fixed_factor_clks)
+		samsung_clk_register_fixed_factor(ctx, cmu->fixed_factor_clks,
+			cmu->nr_fixed_factor_clks);
 	if (cmu->clk_regs)
 		samsung_clk_sleep_init(reg_base, cmu->clk_regs,
 			cmu->nr_clk_regs);
diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
index b3d0f4d..3f471e9 100644
--- a/drivers/clk/samsung/clk.h
+++ b/drivers/clk/samsung/clk.h
@@ -347,6 +347,9 @@ struct samsung_cmu_info {
 	/* list of fixed clocks and respective count */
 	struct samsung_fixed_rate_clock *fixed_clks;
 	unsigned int nr_fixed_clks;
+	/* list of fixed factor clocks and respective count */
+	struct samsung_fixed_factor_clock *fixed_factor_clks;
+	unsigned int nr_fixed_factor_clks;
 	/* total number of clocks with IDs assigned*/
 	unsigned int nr_clk_ids;
 
-- 
2.1.0

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

* [PATCH v5 3/8] clk: samsung: Add fixed_factor_clocks field to struct exynos_cmu_info
@ 2014-09-22  4:47   ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-arm-kernel

From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>

Add the fields "fixed_factor_clks" and "nr_fixed_factor_clks" to
"struct exynos_cmu_info" to allow registering of fixed factor
clocks as well with exynos_cmu_register_one().

Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>
---
 drivers/clk/samsung/clk.c | 3 +++
 drivers/clk/samsung/clk.h | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index a648236..dd1f7c9 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -402,6 +402,9 @@ void __init samsung_cmu_register_one(struct device_node *np,
 	if (cmu->fixed_clks)
 		samsung_clk_register_fixed_rate(ctx, cmu->fixed_clks,
 			cmu->nr_fixed_clks);
+	if (cmu->fixed_factor_clks)
+		samsung_clk_register_fixed_factor(ctx, cmu->fixed_factor_clks,
+			cmu->nr_fixed_factor_clks);
 	if (cmu->clk_regs)
 		samsung_clk_sleep_init(reg_base, cmu->clk_regs,
 			cmu->nr_clk_regs);
diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
index b3d0f4d..3f471e9 100644
--- a/drivers/clk/samsung/clk.h
+++ b/drivers/clk/samsung/clk.h
@@ -347,6 +347,9 @@ struct samsung_cmu_info {
 	/* list of fixed clocks and respective count */
 	struct samsung_fixed_rate_clock *fixed_clks;
 	unsigned int nr_fixed_clks;
+	/* list of fixed factor clocks and respective count */
+	struct samsung_fixed_factor_clock *fixed_factor_clks;
+	unsigned int nr_fixed_factor_clks;
 	/* total number of clocks with IDs assigned*/
 	unsigned int nr_clk_ids;
 
-- 
2.1.0

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

* [PATCH v5 4/8] clk: samsung: add initial clock support for Exynos7 SoC
  2014-09-22  4:47 ` Abhilash Kesavan
@ 2014-09-22  4:47   ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: tomasz.figa, naveenkrishna.ch, kesavan.abhilash

From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>

Add initial clock support for Exynos7 SoC which is required
to bring up platforms based on Exynos7.

Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>
---
 .../devicetree/bindings/clock/exynos7-clock.txt    |  67 ++++
 drivers/clk/samsung/Makefile                       |   1 +
 drivers/clk/samsung/clk-exynos7.c                  | 425 +++++++++++++++++++++
 include/dt-bindings/clock/exynos7-clk.h            |  49 +++
 4 files changed, 542 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/exynos7-clock.txt
 create mode 100644 drivers/clk/samsung/clk-exynos7.c
 create mode 100644 include/dt-bindings/clock/exynos7-clk.h

diff --git a/Documentation/devicetree/bindings/clock/exynos7-clock.txt b/Documentation/devicetree/bindings/clock/exynos7-clock.txt
new file mode 100644
index 0000000..789f761
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/exynos7-clock.txt
@@ -0,0 +1,67 @@
+* Samsung Exynos7 Clock Controller
+
+Exynos7 clock controller has various blocks which are instantiated
+independently from the device-tree. These clock controllers
+generate and supply clocks to various hardware blocks within
+the SoC.
+
+Each clock is assigned an identifier and client nodes can use
+this identifier to specify the clock which they consume. All
+available clocks are defined as preprocessor macros in
+dt-bindings/clock/exynos7-clk.h header and can be used in
+device tree sources.
+
+External clocks:
+
+There are several clocks that are generated outside the SoC. It
+is expected that they are defined using standard clock bindings
+with following clock-output-names:
+
+ - "fin_pll" - PLL input clock from XXTI
+
+Required Properties for Clock Controller:
+
+ - compatible: clock controllers will use one of the following
+	compatible strings to indicate the clock controller
+	functionality.
+
+	- "samsung,exynos7-clock-topc"
+	- "samsung,exynos7-clock-top0"
+	- "samsung,exynos7-clock-peric0"
+	- "samsung,exynos7-clock-peric1"
+	- "samsung,exynos7-clock-peris"
+
+ - reg: physical base address of the controller and the length of
+	memory mapped region.
+
+ - #clock-cells: should be 1.
+
+ - clocks: list of clock identifiers which are fed as the input to
+	the given clock controller. Please refer the next section to
+	find the input clocks for a given controller.
+
+- clock-names: list of names of clocks which are fed as the input
+	to the given clock controller.
+
+Input clocks for top0 clock controller:
+	- fin_pll
+	- dout_sclk_bus0_pll
+	- dout_sclk_bus1_pll
+	- dout_sclk_cc_pll
+	- dout_sclk_mfc_pll
+
+Input clocks for peric0 clock controller:
+	- fin_pll
+	- dout_aclk_peric0_66
+	- sclk_uart0
+
+Input clocks for peric1 clock controller:
+	- fin_pll
+	- dout_aclk_peric1_66
+	- sclk_uart1
+	- sclk_uart2
+	- sclk_uart3
+
+Input clocks for peris clock controller:
+	- fin_pll
+	- dout_aclk_peris_66
diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile
index 6fb4bc6..137bf9b 100644
--- a/drivers/clk/samsung/Makefile
+++ b/drivers/clk/samsung/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_SOC_EXYNOS5420)	+= clk-exynos5420.o
 obj-$(CONFIG_SOC_EXYNOS5440)	+= clk-exynos5440.o
 obj-$(CONFIG_ARCH_EXYNOS)	+= clk-exynos-audss.o
 obj-$(CONFIG_ARCH_EXYNOS)	+= clk-exynos-clkout.o
+obj-$(CONFIG_ARCH_EXYNOS7)	+= clk-exynos7.o
 obj-$(CONFIG_S3C2410_COMMON_CLK)+= clk-s3c2410.o
 obj-$(CONFIG_S3C2410_COMMON_DCLK)+= clk-s3c2410-dclk.o
 obj-$(CONFIG_S3C2412_COMMON_CLK)+= clk-s3c2412.o
diff --git a/drivers/clk/samsung/clk-exynos7.c b/drivers/clk/samsung/clk-exynos7.c
new file mode 100644
index 0000000..57712b0
--- /dev/null
+++ b/drivers/clk/samsung/clk-exynos7.c
@@ -0,0 +1,425 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Author: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+*/
+
+#include <linux/clk.h>
+#include <linux/clkdev.h>
+#include <linux/clk-provider.h>
+#include <linux/of.h>
+
+#include "clk.h"
+#include <dt-bindings/clock/exynos7-clk.h>
+
+/* Register Offset definitions for CMU_TOPC (0x10570000) */
+#define CC_PLL_LOCK		0x0000
+#define BUS0_PLL_LOCK		0x0004
+#define BUS1_DPLL_LOCK		0x0008
+#define MFC_PLL_LOCK		0x000C
+#define AUD_PLL_LOCK		0x0010
+#define CC_PLL_CON0		0x0100
+#define BUS0_PLL_CON0		0x0110
+#define BUS1_DPLL_CON0		0x0120
+#define MFC_PLL_CON0		0x0130
+#define AUD_PLL_CON0		0x0140
+#define MUX_SEL_TOPC0		0x0200
+#define MUX_SEL_TOPC1		0x0204
+#define MUX_SEL_TOPC3		0x020C
+#define DIV_TOPC1		0x0604
+#define DIV_TOPC3		0x060C
+
+static struct samsung_fixed_factor_clock topc_fixed_factor_clks[] __initdata = {
+	FFACTOR(0, "ffac_topc_bus0_pll_div2", "mout_bus0_pll_ctrl", 1, 2, 0),
+	FFACTOR(0, "ffac_topc_bus0_pll_div4",
+		"ffac_topc_bus0_pll_div2", 1, 2, 0),
+	FFACTOR(0, "ffac_topc_bus1_pll_div2", "mout_bus1_pll_ctrl", 1, 2, 0),
+	FFACTOR(0, "ffac_topc_cc_pll_div2", "mout_cc_pll_ctrl", 1, 2, 0),
+	FFACTOR(0, "ffac_topc_mfc_pll_div2", "mout_mfc_pll_ctrl", 1, 2, 0),
+};
+
+/* List of parent clocks for Muxes in CMU_TOPC */
+PNAME(mout_bus0_pll_ctrl_p)	= { "fin_pll", "fout_bus0_pll" };
+PNAME(mout_bus1_pll_ctrl_p)	= { "fin_pll", "fout_bus1_pll" };
+PNAME(mout_cc_pll_ctrl_p)	= { "fin_pll", "fout_cc_pll" };
+PNAME(mout_mfc_pll_ctrl_p)	= { "fin_pll", "fout_mfc_pll" };
+
+PNAME(mout_topc_group2) = { "mout_sclk_bus0_pll_cmuc",
+	"mout_sclk_bus1_pll_cmuc", "mout_sclk_cc_pll_cmuc",
+	"mout_sclk_mfc_pll_cmuc" };
+
+PNAME(mout_sclk_bus0_pll_cmuc_p) = { "mout_bus0_pll_ctrl",
+	"ffac_topc_bus0_pll_div2", "ffac_topc_bus0_pll_div4"};
+PNAME(mout_sclk_bus1_pll_cmuc_p) = { "mout_bus1_pll_ctrl",
+	"ffac_topc_bus1_pll_div2"};
+PNAME(mout_sclk_cc_pll_cmuc_p) = { "mout_cc_pll_ctrl",
+	"ffac_topc_cc_pll_div2"};
+PNAME(mout_sclk_mfc_pll_cmuc_p) = { "mout_mfc_pll_ctrl",
+	"ffac_topc_mfc_pll_div2"};
+
+
+PNAME(mout_sclk_bus0_pll_out_p) = {"mout_bus0_pll_ctrl",
+	"ffac_topc_bus0_pll_div2"};
+
+static unsigned long topc_clk_regs[] __initdata = {
+	CC_PLL_LOCK,
+	BUS0_PLL_LOCK,
+	BUS1_DPLL_LOCK,
+	MFC_PLL_LOCK,
+	AUD_PLL_LOCK,
+	CC_PLL_CON0,
+	BUS0_PLL_CON0,
+	BUS1_DPLL_CON0,
+	MFC_PLL_CON0,
+	AUD_PLL_CON0,
+	MUX_SEL_TOPC0,
+	MUX_SEL_TOPC1,
+	MUX_SEL_TOPC3,
+	DIV_TOPC1,
+	DIV_TOPC3,
+};
+
+static struct samsung_mux_clock topc_mux_clks[] __initdata = {
+	MUX(0, "mout_bus0_pll_ctrl", mout_bus0_pll_ctrl_p, MUX_SEL_TOPC0, 0, 1),
+	MUX(0, "mout_bus1_pll_ctrl", mout_bus1_pll_ctrl_p, MUX_SEL_TOPC0, 4, 1),
+	MUX(0, "mout_cc_pll_ctrl", mout_cc_pll_ctrl_p, MUX_SEL_TOPC0, 8, 1),
+	MUX(0, "mout_mfc_pll_ctrl", mout_mfc_pll_ctrl_p, MUX_SEL_TOPC0, 12, 1),
+
+	MUX(0, "mout_sclk_bus0_pll_cmuc", mout_sclk_bus0_pll_cmuc_p,
+		MUX_SEL_TOPC0, 16, 2),
+	MUX(0, "mout_sclk_bus1_pll_cmuc", mout_sclk_bus1_pll_cmuc_p,
+		MUX_SEL_TOPC0, 20, 1),
+	MUX(0, "mout_sclk_cc_pll_cmuc", mout_sclk_cc_pll_cmuc_p,
+		MUX_SEL_TOPC0, 24, 1),
+	MUX(0, "mout_sclk_mfc_pll_cmuc", mout_sclk_mfc_pll_cmuc_p,
+		MUX_SEL_TOPC0, 28, 1),
+
+	MUX(0, "mout_sclk_bus0_pll_out", mout_sclk_bus0_pll_out_p,
+		MUX_SEL_TOPC1, 16, 1),
+
+	MUX(0, "mout_aclk_peris_66", mout_topc_group2, MUX_SEL_TOPC3, 24, 2),
+};
+
+static struct samsung_div_clock topc_div_clks[] __initdata = {
+	DIV(DOUT_ACLK_PERIS, "dout_aclk_peris_66", "mout_aclk_peris_66",
+		DIV_TOPC1, 24, 4),
+
+	DIV(DOUT_SCLK_BUS0_PLL, "dout_sclk_bus0_pll", "mout_sclk_bus0_pll_out",
+		DIV_TOPC3, 0, 3),
+	DIV(DOUT_SCLK_BUS1_PLL, "dout_sclk_bus1_pll", "mout_bus1_pll_ctrl",
+		DIV_TOPC3, 8, 3),
+	DIV(DOUT_SCLK_CC_PLL, "dout_sclk_cc_pll", "mout_cc_pll_ctrl",
+		DIV_TOPC3, 12, 3),
+	DIV(DOUT_SCLK_MFC_PLL, "dout_sclk_mfc_pll", "mout_mfc_pll_ctrl",
+		DIV_TOPC3, 16, 3),
+};
+
+static struct samsung_pll_clock topc_pll_clks[] __initdata = {
+	PLL(pll_1451x, 0, "fout_bus0_pll", "fin_pll", BUS0_PLL_LOCK,
+		BUS0_PLL_CON0, NULL),
+	PLL(pll_1452x, 0, "fout_cc_pll", "fin_pll", CC_PLL_LOCK,
+		CC_PLL_CON0, NULL),
+	PLL(pll_1452x, 0, "fout_bus1_pll", "fin_pll", BUS1_DPLL_LOCK,
+		BUS1_DPLL_CON0, NULL),
+	PLL(pll_1452x, 0, "fout_mfc_pll", "fin_pll", MFC_PLL_LOCK,
+		MFC_PLL_CON0, NULL),
+	PLL(pll_1460x, 0, "fout_aud_pll", "fin_pll", AUD_PLL_LOCK,
+		AUD_PLL_CON0, NULL),
+};
+
+static struct samsung_cmu_info topc_cmu_info __initdata = {
+	.pll_clks		= topc_pll_clks,
+	.nr_pll_clks		= ARRAY_SIZE(topc_pll_clks),
+	.mux_clks		= topc_mux_clks,
+	.nr_mux_clks		= ARRAY_SIZE(topc_mux_clks),
+	.div_clks		= topc_div_clks,
+	.nr_div_clks		= ARRAY_SIZE(topc_div_clks),
+	.fixed_factor_clks	= topc_fixed_factor_clks,
+	.nr_fixed_factor_clks	= ARRAY_SIZE(topc_fixed_factor_clks),
+	.nr_clk_ids		= TOPC_NR_CLK,
+	.clk_regs		= topc_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(topc_clk_regs),
+};
+
+static void __init exynos7_clk_topc_init(struct device_node *np)
+{
+	samsung_cmu_register_one(np, &topc_cmu_info);
+}
+
+CLK_OF_DECLARE(exynos7_clk_topc, "samsung,exynos7-clock-topc",
+	exynos7_clk_topc_init);
+
+/* Register Offset definitions for CMU_TOP0 (0x105D0000) */
+#define MUX_SEL_TOP00			0x0200
+#define MUX_SEL_TOP01			0x0204
+#define MUX_SEL_TOP03			0x020C
+#define MUX_SEL_TOP0_PERIC3		0x023C
+#define DIV_TOP03			0x060C
+#define DIV_TOP0_PERIC3			0x063C
+#define ENABLE_SCLK_TOP0_PERIC3		0x0A3C
+
+/* List of parent clocks for Muxes in CMU_TOP0 */
+PNAME(mout_bus0_pll_p)	= { "fin_pll", "dout_sclk_bus0_pll" };
+PNAME(mout_bus1_pll_p)	= { "fin_pll", "dout_sclk_bus1_pll" };
+PNAME(mout_cc_pll_p)	= { "fin_pll", "dout_sclk_cc_pll" };
+PNAME(mout_mfc_pll_p)	= { "fin_pll", "dout_sclk_mfc_pll" };
+
+PNAME(mout_top0_half_bus0_pll_p) = {"mout_top0_bus0_pll",
+	"ffac_top0_bus0_pll_div2"};
+PNAME(mout_top0_half_bus1_pll_p) = {"mout_top0_bus1_pll",
+	"ffac_top0_bus1_pll_div2"};
+PNAME(mout_top0_half_cc_pll_p) = {"mout_top0_cc_pll",
+	"ffac_top0_cc_pll_div2"};
+PNAME(mout_top0_half_mfc_pll_p) = {"mout_top0_mfc_pll",
+	"ffac_top0_mfc_pll_div2"};
+
+PNAME(mout_top0_group1) = {"mout_top0_half_bus0_pll",
+	"mout_top0_half_bus1_pll", "mout_top0_half_cc_pll",
+	"mout_top0_half_mfc_pll"};
+
+static unsigned long top0_clk_regs[] __initdata = {
+	MUX_SEL_TOP00,
+	MUX_SEL_TOP01,
+	MUX_SEL_TOP03,
+	MUX_SEL_TOP0_PERIC3,
+	DIV_TOP03,
+	DIV_TOP0_PERIC3,
+	ENABLE_SCLK_TOP0_PERIC3,
+};
+
+static struct samsung_mux_clock top0_mux_clks[] __initdata = {
+	MUX(0, "mout_top0_mfc_pll", mout_mfc_pll_p, MUX_SEL_TOP00, 4, 1),
+	MUX(0, "mout_top0_cc_pll", mout_cc_pll_p, MUX_SEL_TOP00, 8, 1),
+	MUX(0, "mout_top0_bus1_pll", mout_bus1_pll_p, MUX_SEL_TOP00, 12, 1),
+	MUX(0, "mout_top0_bus0_pll", mout_bus0_pll_p, MUX_SEL_TOP00, 16, 1),
+
+	MUX(0, "mout_top0_half_mfc_pll", mout_top0_half_mfc_pll_p,
+		MUX_SEL_TOP01, 4, 1),
+	MUX(0, "mout_top0_half_cc_pll", mout_top0_half_cc_pll_p,
+		MUX_SEL_TOP01, 8, 1),
+	MUX(0, "mout_top0_half_bus1_pll", mout_top0_half_bus1_pll_p,
+		MUX_SEL_TOP01, 12, 1),
+	MUX(0, "mout_top0_half_bus0_pll", mout_top0_half_bus0_pll_p,
+		MUX_SEL_TOP01, 16, 1),
+
+	MUX(0, "mout_aclk_peric1_66", mout_top0_group1, MUX_SEL_TOP03, 12, 2),
+	MUX(0, "mout_aclk_peric0_66", mout_top0_group1, MUX_SEL_TOP03, 20, 2),
+
+	MUX(0, "mout_sclk_uart3", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 4, 2),
+	MUX(0, "mout_sclk_uart2", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 8, 2),
+	MUX(0, "mout_sclk_uart1", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 12, 2),
+	MUX(0, "mout_sclk_uart0", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 16, 2),
+};
+
+static struct samsung_div_clock top0_div_clks[] __initdata = {
+	DIV(DOUT_ACLK_PERIC1, "dout_aclk_peric1_66", "mout_aclk_peric1_66",
+		DIV_TOP03, 12, 6),
+	DIV(DOUT_ACLK_PERIC0, "dout_aclk_peric0_66", "mout_aclk_peric0_66",
+		DIV_TOP03, 20, 6),
+
+	DIV(0, "dout_sclk_uart3", "mout_sclk_uart3", DIV_TOP0_PERIC3, 4, 4),
+	DIV(0, "dout_sclk_uart2", "mout_sclk_uart2", DIV_TOP0_PERIC3, 8, 4),
+	DIV(0, "dout_sclk_uart1", "mout_sclk_uart1", DIV_TOP0_PERIC3, 12, 4),
+	DIV(0, "dout_sclk_uart0", "mout_sclk_uart0", DIV_TOP0_PERIC3, 16, 4),
+};
+
+static struct samsung_gate_clock top0_gate_clks[] __initdata = {
+	GATE(CLK_SCLK_UART3, "sclk_uart3", "dout_sclk_uart3",
+		ENABLE_SCLK_TOP0_PERIC3, 4, 0, 0),
+	GATE(CLK_SCLK_UART2, "sclk_uart2", "dout_sclk_uart2",
+		ENABLE_SCLK_TOP0_PERIC3, 8, 0, 0),
+	GATE(CLK_SCLK_UART1, "sclk_uart1", "dout_sclk_uart1",
+		ENABLE_SCLK_TOP0_PERIC3, 12, 0, 0),
+	GATE(CLK_SCLK_UART0, "sclk_uart0", "dout_sclk_uart0",
+		ENABLE_SCLK_TOP0_PERIC3, 16, 0, 0),
+};
+
+static struct samsung_fixed_factor_clock top0_fixed_factor_clks[] __initdata = {
+	FFACTOR(0, "ffac_top0_bus0_pll_div2", "mout_top0_bus0_pll", 1, 2, 0),
+	FFACTOR(0, "ffac_top0_bus1_pll_div2", "mout_top0_bus1_pll", 1, 2, 0),
+	FFACTOR(0, "ffac_top0_cc_pll_div2", "mout_top0_cc_pll", 1, 2, 0),
+	FFACTOR(0, "ffac_top0_mfc_pll_div2", "mout_top0_mfc_pll", 1, 2, 0),
+};
+
+static struct samsung_cmu_info top0_cmu_info __initdata = {
+	.mux_clks		= top0_mux_clks,
+	.nr_mux_clks		= ARRAY_SIZE(top0_mux_clks),
+	.div_clks		= top0_div_clks,
+	.nr_div_clks		= ARRAY_SIZE(top0_div_clks),
+	.gate_clks		= top0_gate_clks,
+	.nr_gate_clks		= ARRAY_SIZE(top0_gate_clks),
+	.fixed_factor_clks	= top0_fixed_factor_clks,
+	.nr_fixed_factor_clks	= ARRAY_SIZE(top0_fixed_factor_clks),
+	.nr_clk_ids		= TOP0_NR_CLK,
+	.clk_regs		= top0_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(top0_clk_regs),
+};
+
+static void __init exynos7_clk_top0_init(struct device_node *np)
+{
+	samsung_cmu_register_one(np, &top0_cmu_info);
+}
+
+CLK_OF_DECLARE(exynos7_clk_top0, "samsung,exynos7-clock-top0",
+	exynos7_clk_top0_init);
+
+/* Register Offset definitions for CMU_PERIC0 (0x13610000) */
+#define MUX_SEL_PERIC0			0x0200
+#define ENABLE_PCLK_PERIC0		0x0900
+#define ENABLE_SCLK_PERIC0		0x0A00
+
+/* List of parent clocks for Muxes in CMU_PERIC0 */
+PNAME(mout_aclk_peric0_66_p)	= { "fin_pll", "dout_aclk_peric0_66" };
+PNAME(mout_sclk_uart0_p)	= { "fin_pll", "sclk_uart0" };
+
+static unsigned long peric0_clk_regs[] __initdata = {
+	MUX_SEL_PERIC0,
+	ENABLE_PCLK_PERIC0,
+	ENABLE_SCLK_PERIC0,
+};
+
+static struct samsung_mux_clock peric0_mux_clks[] __initdata = {
+	MUX(0, "mout_aclk_peric0_66_user", mout_aclk_peric0_66_p,
+		MUX_SEL_PERIC0, 0, 1),
+	MUX(0, "mout_sclk_uart0_user", mout_sclk_uart0_p,
+		MUX_SEL_PERIC0, 16, 1),
+};
+
+static struct samsung_gate_clock peric0_gate_clks[] __initdata = {
+	GATE(PCLK_UART0, "pclk_uart0", "mout_aclk_peric0_66_user",
+		ENABLE_PCLK_PERIC0, 16, 0, 0),
+
+	GATE(SCLK_UART0, "sclk_uart0_user", "mout_sclk_uart0_user",
+		ENABLE_SCLK_PERIC0, 16, 0, 0),
+};
+
+static struct samsung_cmu_info peric0_cmu_info __initdata = {
+	.mux_clks		= peric0_mux_clks,
+	.nr_mux_clks		= ARRAY_SIZE(peric0_mux_clks),
+	.gate_clks		= peric0_gate_clks,
+	.nr_gate_clks		= ARRAY_SIZE(peric0_gate_clks),
+	.nr_clk_ids		= PERIC0_NR_CLK,
+	.clk_regs		= peric0_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(peric0_clk_regs),
+};
+
+static void __init exynos7_clk_peric0_init(struct device_node *np)
+{
+	samsung_cmu_register_one(np, &peric0_cmu_info);
+}
+
+/* Register Offset definitions for CMU_PERIC1 (0x14C80000) */
+#define MUX_SEL_PERIC10			0x0200
+#define MUX_SEL_PERIC11			0x0204
+#define ENABLE_PCLK_PERIC1		0x0900
+#define ENABLE_SCLK_PERIC10		0x0A00
+
+CLK_OF_DECLARE(exynos7_clk_peric0, "samsung,exynos7-clock-peric0",
+	exynos7_clk_peric0_init);
+
+/* List of parent clocks for Muxes in CMU_PERIC1 */
+PNAME(mout_aclk_peric1_66_p)	= { "fin_pll", "dout_aclk_peric1_66" };
+PNAME(mout_sclk_uart1_p)	= { "fin_pll", "sclk_uart1" };
+PNAME(mout_sclk_uart2_p)	= { "fin_pll", "sclk_uart2" };
+PNAME(mout_sclk_uart3_p)	= { "fin_pll", "sclk_uart3" };
+
+static unsigned long peric1_clk_regs[] __initdata = {
+	MUX_SEL_PERIC10,
+	MUX_SEL_PERIC11,
+	ENABLE_PCLK_PERIC1,
+	ENABLE_SCLK_PERIC10,
+};
+
+static struct samsung_mux_clock peric1_mux_clks[] __initdata = {
+	MUX(0, "mout_aclk_peric1_66_user", mout_aclk_peric1_66_p,
+		MUX_SEL_PERIC10, 0, 1),
+
+	MUX(0, "mout_sclk_uart1_user", mout_sclk_uart1_p,
+		MUX_SEL_PERIC11, 20, 1),
+	MUX(0, "mout_sclk_uart2_user", mout_sclk_uart2_p,
+		MUX_SEL_PERIC11, 24, 1),
+	MUX(0, "mout_sclk_uart3_user", mout_sclk_uart3_p,
+		MUX_SEL_PERIC11, 28, 1),
+};
+
+static struct samsung_gate_clock peric1_gate_clks[] __initdata = {
+	GATE(PCLK_UART1, "pclk_uart1", "mout_aclk_peric1_66_user",
+		ENABLE_PCLK_PERIC1, 9, 0, 0),
+	GATE(PCLK_UART2, "pclk_uart2", "mout_aclk_peric1_66_user",
+		ENABLE_PCLK_PERIC1, 10, 0, 0),
+	GATE(PCLK_UART3, "pclk_uart3", "mout_aclk_peric1_66_user",
+		ENABLE_PCLK_PERIC1, 11, 0, 0),
+
+	GATE(SCLK_UART1, "sclk_uart1_user", "mout_sclk_uart1_user",
+		ENABLE_SCLK_PERIC10, 9, 0, 0),
+	GATE(SCLK_UART2, "sclk_uart2_user", "mout_sclk_uart2_user",
+		ENABLE_SCLK_PERIC10, 10, 0, 0),
+	GATE(SCLK_UART3, "sclk_uart3_user", "mout_sclk_uart3_user",
+		ENABLE_SCLK_PERIC10, 11, 0, 0),
+};
+
+static struct samsung_cmu_info peric1_cmu_info __initdata = {
+	.mux_clks		= peric1_mux_clks,
+	.nr_mux_clks		= ARRAY_SIZE(peric1_mux_clks),
+	.gate_clks		= peric1_gate_clks,
+	.nr_gate_clks		= ARRAY_SIZE(peric1_gate_clks),
+	.nr_clk_ids		= PERIC1_NR_CLK,
+	.clk_regs		= peric1_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(peric1_clk_regs),
+};
+
+static void __init exynos7_clk_peric1_init(struct device_node *np)
+{
+	samsung_cmu_register_one(np, &peric1_cmu_info);
+}
+
+CLK_OF_DECLARE(exynos7_clk_peric1, "samsung,exynos7-clock-peric1",
+	exynos7_clk_peric1_init);
+
+/* Register Offset definitions for CMU_PERIS (0x10040000) */
+#define MUX_SEL_PERIS			0x0200
+#define ENABLE_PCLK_PERIS_SECURE_CHIPID	0x0910
+#define ENABLE_SCLK_PERIS_SECURE_CHIPID	0x0A10
+
+/* List of parent clocks for Muxes in CMU_PERIS */
+PNAME(mout_aclk_peris_66_p) = { "fin_pll", "dout_aclk_peris_66" };
+
+static unsigned long peris_clk_regs[] __initdata = {
+	MUX_SEL_PERIS,
+	ENABLE_PCLK_PERIS_SECURE_CHIPID,
+	ENABLE_SCLK_PERIS_SECURE_CHIPID,
+};
+
+static struct samsung_mux_clock peris_mux_clks[] __initdata = {
+	MUX(0, "mout_aclk_peris_66_user",
+		mout_aclk_peris_66_p, MUX_SEL_PERIS, 0, 1),
+};
+
+static struct samsung_gate_clock peris_gate_clks[] __initdata = {
+	GATE(PCLK_CHIPID, "pclk_chipid", "mout_aclk_peris_66_user",
+		ENABLE_PCLK_PERIS_SECURE_CHIPID, 0, 0, 0),
+	GATE(SCLK_CHIPID, "sclk_chipid", "fin_pll",
+		ENABLE_SCLK_PERIS_SECURE_CHIPID, 0, 0, 0),
+};
+
+static struct samsung_cmu_info peris_cmu_info __initdata = {
+	.mux_clks		= peris_mux_clks,
+	.nr_mux_clks		= ARRAY_SIZE(peris_mux_clks),
+	.gate_clks		= peris_gate_clks,
+	.nr_gate_clks		= ARRAY_SIZE(peris_gate_clks),
+	.nr_clk_ids		= PERIS_NR_CLK,
+	.clk_regs		= peris_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(peris_clk_regs),
+};
+
+static void __init exynos7_clk_peris_init(struct device_node *np)
+{
+	samsung_cmu_register_one(np, &peris_cmu_info);
+}
+
+CLK_OF_DECLARE(exynos7_clk_peris, "samsung,exynos7-clock-peris",
+	exynos7_clk_peris_init);
diff --git a/include/dt-bindings/clock/exynos7-clk.h b/include/dt-bindings/clock/exynos7-clk.h
new file mode 100644
index 0000000..7620058
--- /dev/null
+++ b/include/dt-bindings/clock/exynos7-clk.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Author: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#ifndef _DT_BINDINGS_CLOCK_EXYNOS7_H
+#define _DT_BINDINGS_CLOCK_EXYNOS7_H
+
+/* TOPC */
+#define DOUT_ACLK_PERIS			1
+#define DOUT_SCLK_BUS0_PLL		2
+#define DOUT_SCLK_BUS1_PLL		3
+#define DOUT_SCLK_CC_PLL		4
+#define DOUT_SCLK_MFC_PLL		5
+#define TOPC_NR_CLK			6
+
+/* TOP0 */
+#define DOUT_ACLK_PERIC1		1
+#define DOUT_ACLK_PERIC0		2
+#define CLK_SCLK_UART0			3
+#define CLK_SCLK_UART1			4
+#define CLK_SCLK_UART2			5
+#define CLK_SCLK_UART3			6
+#define TOP0_NR_CLK			7
+
+/* PERIC0 */
+#define PCLK_UART0			1
+#define SCLK_UART0			2
+#define PERIC0_NR_CLK			3
+
+/* PERIC1 */
+#define PCLK_UART1			1
+#define PCLK_UART2			2
+#define PCLK_UART3			3
+#define SCLK_UART1			4
+#define SCLK_UART2			5
+#define SCLK_UART3			6
+#define PERIC1_NR_CLK			7
+
+/* PERIS */
+#define PCLK_CHIPID			1
+#define SCLK_CHIPID			2
+#define PERIS_NR_CLK			3
+
+#endif /* _DT_BINDINGS_CLOCK_EXYNOS7_H */
-- 
2.1.0

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

* [PATCH v5 4/8] clk: samsung: add initial clock support for Exynos7 SoC
@ 2014-09-22  4:47   ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-arm-kernel

From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>

Add initial clock support for Exynos7 SoC which is required
to bring up platforms based on Exynos7.

Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>
---
 .../devicetree/bindings/clock/exynos7-clock.txt    |  67 ++++
 drivers/clk/samsung/Makefile                       |   1 +
 drivers/clk/samsung/clk-exynos7.c                  | 425 +++++++++++++++++++++
 include/dt-bindings/clock/exynos7-clk.h            |  49 +++
 4 files changed, 542 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/exynos7-clock.txt
 create mode 100644 drivers/clk/samsung/clk-exynos7.c
 create mode 100644 include/dt-bindings/clock/exynos7-clk.h

diff --git a/Documentation/devicetree/bindings/clock/exynos7-clock.txt b/Documentation/devicetree/bindings/clock/exynos7-clock.txt
new file mode 100644
index 0000000..789f761
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/exynos7-clock.txt
@@ -0,0 +1,67 @@
+* Samsung Exynos7 Clock Controller
+
+Exynos7 clock controller has various blocks which are instantiated
+independently from the device-tree. These clock controllers
+generate and supply clocks to various hardware blocks within
+the SoC.
+
+Each clock is assigned an identifier and client nodes can use
+this identifier to specify the clock which they consume. All
+available clocks are defined as preprocessor macros in
+dt-bindings/clock/exynos7-clk.h header and can be used in
+device tree sources.
+
+External clocks:
+
+There are several clocks that are generated outside the SoC. It
+is expected that they are defined using standard clock bindings
+with following clock-output-names:
+
+ - "fin_pll" - PLL input clock from XXTI
+
+Required Properties for Clock Controller:
+
+ - compatible: clock controllers will use one of the following
+	compatible strings to indicate the clock controller
+	functionality.
+
+	- "samsung,exynos7-clock-topc"
+	- "samsung,exynos7-clock-top0"
+	- "samsung,exynos7-clock-peric0"
+	- "samsung,exynos7-clock-peric1"
+	- "samsung,exynos7-clock-peris"
+
+ - reg: physical base address of the controller and the length of
+	memory mapped region.
+
+ - #clock-cells: should be 1.
+
+ - clocks: list of clock identifiers which are fed as the input to
+	the given clock controller. Please refer the next section to
+	find the input clocks for a given controller.
+
+- clock-names: list of names of clocks which are fed as the input
+	to the given clock controller.
+
+Input clocks for top0 clock controller:
+	- fin_pll
+	- dout_sclk_bus0_pll
+	- dout_sclk_bus1_pll
+	- dout_sclk_cc_pll
+	- dout_sclk_mfc_pll
+
+Input clocks for peric0 clock controller:
+	- fin_pll
+	- dout_aclk_peric0_66
+	- sclk_uart0
+
+Input clocks for peric1 clock controller:
+	- fin_pll
+	- dout_aclk_peric1_66
+	- sclk_uart1
+	- sclk_uart2
+	- sclk_uart3
+
+Input clocks for peris clock controller:
+	- fin_pll
+	- dout_aclk_peris_66
diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile
index 6fb4bc6..137bf9b 100644
--- a/drivers/clk/samsung/Makefile
+++ b/drivers/clk/samsung/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_SOC_EXYNOS5420)	+= clk-exynos5420.o
 obj-$(CONFIG_SOC_EXYNOS5440)	+= clk-exynos5440.o
 obj-$(CONFIG_ARCH_EXYNOS)	+= clk-exynos-audss.o
 obj-$(CONFIG_ARCH_EXYNOS)	+= clk-exynos-clkout.o
+obj-$(CONFIG_ARCH_EXYNOS7)	+= clk-exynos7.o
 obj-$(CONFIG_S3C2410_COMMON_CLK)+= clk-s3c2410.o
 obj-$(CONFIG_S3C2410_COMMON_DCLK)+= clk-s3c2410-dclk.o
 obj-$(CONFIG_S3C2412_COMMON_CLK)+= clk-s3c2412.o
diff --git a/drivers/clk/samsung/clk-exynos7.c b/drivers/clk/samsung/clk-exynos7.c
new file mode 100644
index 0000000..57712b0
--- /dev/null
+++ b/drivers/clk/samsung/clk-exynos7.c
@@ -0,0 +1,425 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Author: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+*/
+
+#include <linux/clk.h>
+#include <linux/clkdev.h>
+#include <linux/clk-provider.h>
+#include <linux/of.h>
+
+#include "clk.h"
+#include <dt-bindings/clock/exynos7-clk.h>
+
+/* Register Offset definitions for CMU_TOPC (0x10570000) */
+#define CC_PLL_LOCK		0x0000
+#define BUS0_PLL_LOCK		0x0004
+#define BUS1_DPLL_LOCK		0x0008
+#define MFC_PLL_LOCK		0x000C
+#define AUD_PLL_LOCK		0x0010
+#define CC_PLL_CON0		0x0100
+#define BUS0_PLL_CON0		0x0110
+#define BUS1_DPLL_CON0		0x0120
+#define MFC_PLL_CON0		0x0130
+#define AUD_PLL_CON0		0x0140
+#define MUX_SEL_TOPC0		0x0200
+#define MUX_SEL_TOPC1		0x0204
+#define MUX_SEL_TOPC3		0x020C
+#define DIV_TOPC1		0x0604
+#define DIV_TOPC3		0x060C
+
+static struct samsung_fixed_factor_clock topc_fixed_factor_clks[] __initdata = {
+	FFACTOR(0, "ffac_topc_bus0_pll_div2", "mout_bus0_pll_ctrl", 1, 2, 0),
+	FFACTOR(0, "ffac_topc_bus0_pll_div4",
+		"ffac_topc_bus0_pll_div2", 1, 2, 0),
+	FFACTOR(0, "ffac_topc_bus1_pll_div2", "mout_bus1_pll_ctrl", 1, 2, 0),
+	FFACTOR(0, "ffac_topc_cc_pll_div2", "mout_cc_pll_ctrl", 1, 2, 0),
+	FFACTOR(0, "ffac_topc_mfc_pll_div2", "mout_mfc_pll_ctrl", 1, 2, 0),
+};
+
+/* List of parent clocks for Muxes in CMU_TOPC */
+PNAME(mout_bus0_pll_ctrl_p)	= { "fin_pll", "fout_bus0_pll" };
+PNAME(mout_bus1_pll_ctrl_p)	= { "fin_pll", "fout_bus1_pll" };
+PNAME(mout_cc_pll_ctrl_p)	= { "fin_pll", "fout_cc_pll" };
+PNAME(mout_mfc_pll_ctrl_p)	= { "fin_pll", "fout_mfc_pll" };
+
+PNAME(mout_topc_group2) = { "mout_sclk_bus0_pll_cmuc",
+	"mout_sclk_bus1_pll_cmuc", "mout_sclk_cc_pll_cmuc",
+	"mout_sclk_mfc_pll_cmuc" };
+
+PNAME(mout_sclk_bus0_pll_cmuc_p) = { "mout_bus0_pll_ctrl",
+	"ffac_topc_bus0_pll_div2", "ffac_topc_bus0_pll_div4"};
+PNAME(mout_sclk_bus1_pll_cmuc_p) = { "mout_bus1_pll_ctrl",
+	"ffac_topc_bus1_pll_div2"};
+PNAME(mout_sclk_cc_pll_cmuc_p) = { "mout_cc_pll_ctrl",
+	"ffac_topc_cc_pll_div2"};
+PNAME(mout_sclk_mfc_pll_cmuc_p) = { "mout_mfc_pll_ctrl",
+	"ffac_topc_mfc_pll_div2"};
+
+
+PNAME(mout_sclk_bus0_pll_out_p) = {"mout_bus0_pll_ctrl",
+	"ffac_topc_bus0_pll_div2"};
+
+static unsigned long topc_clk_regs[] __initdata = {
+	CC_PLL_LOCK,
+	BUS0_PLL_LOCK,
+	BUS1_DPLL_LOCK,
+	MFC_PLL_LOCK,
+	AUD_PLL_LOCK,
+	CC_PLL_CON0,
+	BUS0_PLL_CON0,
+	BUS1_DPLL_CON0,
+	MFC_PLL_CON0,
+	AUD_PLL_CON0,
+	MUX_SEL_TOPC0,
+	MUX_SEL_TOPC1,
+	MUX_SEL_TOPC3,
+	DIV_TOPC1,
+	DIV_TOPC3,
+};
+
+static struct samsung_mux_clock topc_mux_clks[] __initdata = {
+	MUX(0, "mout_bus0_pll_ctrl", mout_bus0_pll_ctrl_p, MUX_SEL_TOPC0, 0, 1),
+	MUX(0, "mout_bus1_pll_ctrl", mout_bus1_pll_ctrl_p, MUX_SEL_TOPC0, 4, 1),
+	MUX(0, "mout_cc_pll_ctrl", mout_cc_pll_ctrl_p, MUX_SEL_TOPC0, 8, 1),
+	MUX(0, "mout_mfc_pll_ctrl", mout_mfc_pll_ctrl_p, MUX_SEL_TOPC0, 12, 1),
+
+	MUX(0, "mout_sclk_bus0_pll_cmuc", mout_sclk_bus0_pll_cmuc_p,
+		MUX_SEL_TOPC0, 16, 2),
+	MUX(0, "mout_sclk_bus1_pll_cmuc", mout_sclk_bus1_pll_cmuc_p,
+		MUX_SEL_TOPC0, 20, 1),
+	MUX(0, "mout_sclk_cc_pll_cmuc", mout_sclk_cc_pll_cmuc_p,
+		MUX_SEL_TOPC0, 24, 1),
+	MUX(0, "mout_sclk_mfc_pll_cmuc", mout_sclk_mfc_pll_cmuc_p,
+		MUX_SEL_TOPC0, 28, 1),
+
+	MUX(0, "mout_sclk_bus0_pll_out", mout_sclk_bus0_pll_out_p,
+		MUX_SEL_TOPC1, 16, 1),
+
+	MUX(0, "mout_aclk_peris_66", mout_topc_group2, MUX_SEL_TOPC3, 24, 2),
+};
+
+static struct samsung_div_clock topc_div_clks[] __initdata = {
+	DIV(DOUT_ACLK_PERIS, "dout_aclk_peris_66", "mout_aclk_peris_66",
+		DIV_TOPC1, 24, 4),
+
+	DIV(DOUT_SCLK_BUS0_PLL, "dout_sclk_bus0_pll", "mout_sclk_bus0_pll_out",
+		DIV_TOPC3, 0, 3),
+	DIV(DOUT_SCLK_BUS1_PLL, "dout_sclk_bus1_pll", "mout_bus1_pll_ctrl",
+		DIV_TOPC3, 8, 3),
+	DIV(DOUT_SCLK_CC_PLL, "dout_sclk_cc_pll", "mout_cc_pll_ctrl",
+		DIV_TOPC3, 12, 3),
+	DIV(DOUT_SCLK_MFC_PLL, "dout_sclk_mfc_pll", "mout_mfc_pll_ctrl",
+		DIV_TOPC3, 16, 3),
+};
+
+static struct samsung_pll_clock topc_pll_clks[] __initdata = {
+	PLL(pll_1451x, 0, "fout_bus0_pll", "fin_pll", BUS0_PLL_LOCK,
+		BUS0_PLL_CON0, NULL),
+	PLL(pll_1452x, 0, "fout_cc_pll", "fin_pll", CC_PLL_LOCK,
+		CC_PLL_CON0, NULL),
+	PLL(pll_1452x, 0, "fout_bus1_pll", "fin_pll", BUS1_DPLL_LOCK,
+		BUS1_DPLL_CON0, NULL),
+	PLL(pll_1452x, 0, "fout_mfc_pll", "fin_pll", MFC_PLL_LOCK,
+		MFC_PLL_CON0, NULL),
+	PLL(pll_1460x, 0, "fout_aud_pll", "fin_pll", AUD_PLL_LOCK,
+		AUD_PLL_CON0, NULL),
+};
+
+static struct samsung_cmu_info topc_cmu_info __initdata = {
+	.pll_clks		= topc_pll_clks,
+	.nr_pll_clks		= ARRAY_SIZE(topc_pll_clks),
+	.mux_clks		= topc_mux_clks,
+	.nr_mux_clks		= ARRAY_SIZE(topc_mux_clks),
+	.div_clks		= topc_div_clks,
+	.nr_div_clks		= ARRAY_SIZE(topc_div_clks),
+	.fixed_factor_clks	= topc_fixed_factor_clks,
+	.nr_fixed_factor_clks	= ARRAY_SIZE(topc_fixed_factor_clks),
+	.nr_clk_ids		= TOPC_NR_CLK,
+	.clk_regs		= topc_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(topc_clk_regs),
+};
+
+static void __init exynos7_clk_topc_init(struct device_node *np)
+{
+	samsung_cmu_register_one(np, &topc_cmu_info);
+}
+
+CLK_OF_DECLARE(exynos7_clk_topc, "samsung,exynos7-clock-topc",
+	exynos7_clk_topc_init);
+
+/* Register Offset definitions for CMU_TOP0 (0x105D0000) */
+#define MUX_SEL_TOP00			0x0200
+#define MUX_SEL_TOP01			0x0204
+#define MUX_SEL_TOP03			0x020C
+#define MUX_SEL_TOP0_PERIC3		0x023C
+#define DIV_TOP03			0x060C
+#define DIV_TOP0_PERIC3			0x063C
+#define ENABLE_SCLK_TOP0_PERIC3		0x0A3C
+
+/* List of parent clocks for Muxes in CMU_TOP0 */
+PNAME(mout_bus0_pll_p)	= { "fin_pll", "dout_sclk_bus0_pll" };
+PNAME(mout_bus1_pll_p)	= { "fin_pll", "dout_sclk_bus1_pll" };
+PNAME(mout_cc_pll_p)	= { "fin_pll", "dout_sclk_cc_pll" };
+PNAME(mout_mfc_pll_p)	= { "fin_pll", "dout_sclk_mfc_pll" };
+
+PNAME(mout_top0_half_bus0_pll_p) = {"mout_top0_bus0_pll",
+	"ffac_top0_bus0_pll_div2"};
+PNAME(mout_top0_half_bus1_pll_p) = {"mout_top0_bus1_pll",
+	"ffac_top0_bus1_pll_div2"};
+PNAME(mout_top0_half_cc_pll_p) = {"mout_top0_cc_pll",
+	"ffac_top0_cc_pll_div2"};
+PNAME(mout_top0_half_mfc_pll_p) = {"mout_top0_mfc_pll",
+	"ffac_top0_mfc_pll_div2"};
+
+PNAME(mout_top0_group1) = {"mout_top0_half_bus0_pll",
+	"mout_top0_half_bus1_pll", "mout_top0_half_cc_pll",
+	"mout_top0_half_mfc_pll"};
+
+static unsigned long top0_clk_regs[] __initdata = {
+	MUX_SEL_TOP00,
+	MUX_SEL_TOP01,
+	MUX_SEL_TOP03,
+	MUX_SEL_TOP0_PERIC3,
+	DIV_TOP03,
+	DIV_TOP0_PERIC3,
+	ENABLE_SCLK_TOP0_PERIC3,
+};
+
+static struct samsung_mux_clock top0_mux_clks[] __initdata = {
+	MUX(0, "mout_top0_mfc_pll", mout_mfc_pll_p, MUX_SEL_TOP00, 4, 1),
+	MUX(0, "mout_top0_cc_pll", mout_cc_pll_p, MUX_SEL_TOP00, 8, 1),
+	MUX(0, "mout_top0_bus1_pll", mout_bus1_pll_p, MUX_SEL_TOP00, 12, 1),
+	MUX(0, "mout_top0_bus0_pll", mout_bus0_pll_p, MUX_SEL_TOP00, 16, 1),
+
+	MUX(0, "mout_top0_half_mfc_pll", mout_top0_half_mfc_pll_p,
+		MUX_SEL_TOP01, 4, 1),
+	MUX(0, "mout_top0_half_cc_pll", mout_top0_half_cc_pll_p,
+		MUX_SEL_TOP01, 8, 1),
+	MUX(0, "mout_top0_half_bus1_pll", mout_top0_half_bus1_pll_p,
+		MUX_SEL_TOP01, 12, 1),
+	MUX(0, "mout_top0_half_bus0_pll", mout_top0_half_bus0_pll_p,
+		MUX_SEL_TOP01, 16, 1),
+
+	MUX(0, "mout_aclk_peric1_66", mout_top0_group1, MUX_SEL_TOP03, 12, 2),
+	MUX(0, "mout_aclk_peric0_66", mout_top0_group1, MUX_SEL_TOP03, 20, 2),
+
+	MUX(0, "mout_sclk_uart3", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 4, 2),
+	MUX(0, "mout_sclk_uart2", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 8, 2),
+	MUX(0, "mout_sclk_uart1", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 12, 2),
+	MUX(0, "mout_sclk_uart0", mout_top0_group1, MUX_SEL_TOP0_PERIC3, 16, 2),
+};
+
+static struct samsung_div_clock top0_div_clks[] __initdata = {
+	DIV(DOUT_ACLK_PERIC1, "dout_aclk_peric1_66", "mout_aclk_peric1_66",
+		DIV_TOP03, 12, 6),
+	DIV(DOUT_ACLK_PERIC0, "dout_aclk_peric0_66", "mout_aclk_peric0_66",
+		DIV_TOP03, 20, 6),
+
+	DIV(0, "dout_sclk_uart3", "mout_sclk_uart3", DIV_TOP0_PERIC3, 4, 4),
+	DIV(0, "dout_sclk_uart2", "mout_sclk_uart2", DIV_TOP0_PERIC3, 8, 4),
+	DIV(0, "dout_sclk_uart1", "mout_sclk_uart1", DIV_TOP0_PERIC3, 12, 4),
+	DIV(0, "dout_sclk_uart0", "mout_sclk_uart0", DIV_TOP0_PERIC3, 16, 4),
+};
+
+static struct samsung_gate_clock top0_gate_clks[] __initdata = {
+	GATE(CLK_SCLK_UART3, "sclk_uart3", "dout_sclk_uart3",
+		ENABLE_SCLK_TOP0_PERIC3, 4, 0, 0),
+	GATE(CLK_SCLK_UART2, "sclk_uart2", "dout_sclk_uart2",
+		ENABLE_SCLK_TOP0_PERIC3, 8, 0, 0),
+	GATE(CLK_SCLK_UART1, "sclk_uart1", "dout_sclk_uart1",
+		ENABLE_SCLK_TOP0_PERIC3, 12, 0, 0),
+	GATE(CLK_SCLK_UART0, "sclk_uart0", "dout_sclk_uart0",
+		ENABLE_SCLK_TOP0_PERIC3, 16, 0, 0),
+};
+
+static struct samsung_fixed_factor_clock top0_fixed_factor_clks[] __initdata = {
+	FFACTOR(0, "ffac_top0_bus0_pll_div2", "mout_top0_bus0_pll", 1, 2, 0),
+	FFACTOR(0, "ffac_top0_bus1_pll_div2", "mout_top0_bus1_pll", 1, 2, 0),
+	FFACTOR(0, "ffac_top0_cc_pll_div2", "mout_top0_cc_pll", 1, 2, 0),
+	FFACTOR(0, "ffac_top0_mfc_pll_div2", "mout_top0_mfc_pll", 1, 2, 0),
+};
+
+static struct samsung_cmu_info top0_cmu_info __initdata = {
+	.mux_clks		= top0_mux_clks,
+	.nr_mux_clks		= ARRAY_SIZE(top0_mux_clks),
+	.div_clks		= top0_div_clks,
+	.nr_div_clks		= ARRAY_SIZE(top0_div_clks),
+	.gate_clks		= top0_gate_clks,
+	.nr_gate_clks		= ARRAY_SIZE(top0_gate_clks),
+	.fixed_factor_clks	= top0_fixed_factor_clks,
+	.nr_fixed_factor_clks	= ARRAY_SIZE(top0_fixed_factor_clks),
+	.nr_clk_ids		= TOP0_NR_CLK,
+	.clk_regs		= top0_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(top0_clk_regs),
+};
+
+static void __init exynos7_clk_top0_init(struct device_node *np)
+{
+	samsung_cmu_register_one(np, &top0_cmu_info);
+}
+
+CLK_OF_DECLARE(exynos7_clk_top0, "samsung,exynos7-clock-top0",
+	exynos7_clk_top0_init);
+
+/* Register Offset definitions for CMU_PERIC0 (0x13610000) */
+#define MUX_SEL_PERIC0			0x0200
+#define ENABLE_PCLK_PERIC0		0x0900
+#define ENABLE_SCLK_PERIC0		0x0A00
+
+/* List of parent clocks for Muxes in CMU_PERIC0 */
+PNAME(mout_aclk_peric0_66_p)	= { "fin_pll", "dout_aclk_peric0_66" };
+PNAME(mout_sclk_uart0_p)	= { "fin_pll", "sclk_uart0" };
+
+static unsigned long peric0_clk_regs[] __initdata = {
+	MUX_SEL_PERIC0,
+	ENABLE_PCLK_PERIC0,
+	ENABLE_SCLK_PERIC0,
+};
+
+static struct samsung_mux_clock peric0_mux_clks[] __initdata = {
+	MUX(0, "mout_aclk_peric0_66_user", mout_aclk_peric0_66_p,
+		MUX_SEL_PERIC0, 0, 1),
+	MUX(0, "mout_sclk_uart0_user", mout_sclk_uart0_p,
+		MUX_SEL_PERIC0, 16, 1),
+};
+
+static struct samsung_gate_clock peric0_gate_clks[] __initdata = {
+	GATE(PCLK_UART0, "pclk_uart0", "mout_aclk_peric0_66_user",
+		ENABLE_PCLK_PERIC0, 16, 0, 0),
+
+	GATE(SCLK_UART0, "sclk_uart0_user", "mout_sclk_uart0_user",
+		ENABLE_SCLK_PERIC0, 16, 0, 0),
+};
+
+static struct samsung_cmu_info peric0_cmu_info __initdata = {
+	.mux_clks		= peric0_mux_clks,
+	.nr_mux_clks		= ARRAY_SIZE(peric0_mux_clks),
+	.gate_clks		= peric0_gate_clks,
+	.nr_gate_clks		= ARRAY_SIZE(peric0_gate_clks),
+	.nr_clk_ids		= PERIC0_NR_CLK,
+	.clk_regs		= peric0_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(peric0_clk_regs),
+};
+
+static void __init exynos7_clk_peric0_init(struct device_node *np)
+{
+	samsung_cmu_register_one(np, &peric0_cmu_info);
+}
+
+/* Register Offset definitions for CMU_PERIC1 (0x14C80000) */
+#define MUX_SEL_PERIC10			0x0200
+#define MUX_SEL_PERIC11			0x0204
+#define ENABLE_PCLK_PERIC1		0x0900
+#define ENABLE_SCLK_PERIC10		0x0A00
+
+CLK_OF_DECLARE(exynos7_clk_peric0, "samsung,exynos7-clock-peric0",
+	exynos7_clk_peric0_init);
+
+/* List of parent clocks for Muxes in CMU_PERIC1 */
+PNAME(mout_aclk_peric1_66_p)	= { "fin_pll", "dout_aclk_peric1_66" };
+PNAME(mout_sclk_uart1_p)	= { "fin_pll", "sclk_uart1" };
+PNAME(mout_sclk_uart2_p)	= { "fin_pll", "sclk_uart2" };
+PNAME(mout_sclk_uart3_p)	= { "fin_pll", "sclk_uart3" };
+
+static unsigned long peric1_clk_regs[] __initdata = {
+	MUX_SEL_PERIC10,
+	MUX_SEL_PERIC11,
+	ENABLE_PCLK_PERIC1,
+	ENABLE_SCLK_PERIC10,
+};
+
+static struct samsung_mux_clock peric1_mux_clks[] __initdata = {
+	MUX(0, "mout_aclk_peric1_66_user", mout_aclk_peric1_66_p,
+		MUX_SEL_PERIC10, 0, 1),
+
+	MUX(0, "mout_sclk_uart1_user", mout_sclk_uart1_p,
+		MUX_SEL_PERIC11, 20, 1),
+	MUX(0, "mout_sclk_uart2_user", mout_sclk_uart2_p,
+		MUX_SEL_PERIC11, 24, 1),
+	MUX(0, "mout_sclk_uart3_user", mout_sclk_uart3_p,
+		MUX_SEL_PERIC11, 28, 1),
+};
+
+static struct samsung_gate_clock peric1_gate_clks[] __initdata = {
+	GATE(PCLK_UART1, "pclk_uart1", "mout_aclk_peric1_66_user",
+		ENABLE_PCLK_PERIC1, 9, 0, 0),
+	GATE(PCLK_UART2, "pclk_uart2", "mout_aclk_peric1_66_user",
+		ENABLE_PCLK_PERIC1, 10, 0, 0),
+	GATE(PCLK_UART3, "pclk_uart3", "mout_aclk_peric1_66_user",
+		ENABLE_PCLK_PERIC1, 11, 0, 0),
+
+	GATE(SCLK_UART1, "sclk_uart1_user", "mout_sclk_uart1_user",
+		ENABLE_SCLK_PERIC10, 9, 0, 0),
+	GATE(SCLK_UART2, "sclk_uart2_user", "mout_sclk_uart2_user",
+		ENABLE_SCLK_PERIC10, 10, 0, 0),
+	GATE(SCLK_UART3, "sclk_uart3_user", "mout_sclk_uart3_user",
+		ENABLE_SCLK_PERIC10, 11, 0, 0),
+};
+
+static struct samsung_cmu_info peric1_cmu_info __initdata = {
+	.mux_clks		= peric1_mux_clks,
+	.nr_mux_clks		= ARRAY_SIZE(peric1_mux_clks),
+	.gate_clks		= peric1_gate_clks,
+	.nr_gate_clks		= ARRAY_SIZE(peric1_gate_clks),
+	.nr_clk_ids		= PERIC1_NR_CLK,
+	.clk_regs		= peric1_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(peric1_clk_regs),
+};
+
+static void __init exynos7_clk_peric1_init(struct device_node *np)
+{
+	samsung_cmu_register_one(np, &peric1_cmu_info);
+}
+
+CLK_OF_DECLARE(exynos7_clk_peric1, "samsung,exynos7-clock-peric1",
+	exynos7_clk_peric1_init);
+
+/* Register Offset definitions for CMU_PERIS (0x10040000) */
+#define MUX_SEL_PERIS			0x0200
+#define ENABLE_PCLK_PERIS_SECURE_CHIPID	0x0910
+#define ENABLE_SCLK_PERIS_SECURE_CHIPID	0x0A10
+
+/* List of parent clocks for Muxes in CMU_PERIS */
+PNAME(mout_aclk_peris_66_p) = { "fin_pll", "dout_aclk_peris_66" };
+
+static unsigned long peris_clk_regs[] __initdata = {
+	MUX_SEL_PERIS,
+	ENABLE_PCLK_PERIS_SECURE_CHIPID,
+	ENABLE_SCLK_PERIS_SECURE_CHIPID,
+};
+
+static struct samsung_mux_clock peris_mux_clks[] __initdata = {
+	MUX(0, "mout_aclk_peris_66_user",
+		mout_aclk_peris_66_p, MUX_SEL_PERIS, 0, 1),
+};
+
+static struct samsung_gate_clock peris_gate_clks[] __initdata = {
+	GATE(PCLK_CHIPID, "pclk_chipid", "mout_aclk_peris_66_user",
+		ENABLE_PCLK_PERIS_SECURE_CHIPID, 0, 0, 0),
+	GATE(SCLK_CHIPID, "sclk_chipid", "fin_pll",
+		ENABLE_SCLK_PERIS_SECURE_CHIPID, 0, 0, 0),
+};
+
+static struct samsung_cmu_info peris_cmu_info __initdata = {
+	.mux_clks		= peris_mux_clks,
+	.nr_mux_clks		= ARRAY_SIZE(peris_mux_clks),
+	.gate_clks		= peris_gate_clks,
+	.nr_gate_clks		= ARRAY_SIZE(peris_gate_clks),
+	.nr_clk_ids		= PERIS_NR_CLK,
+	.clk_regs		= peris_clk_regs,
+	.nr_clk_regs		= ARRAY_SIZE(peris_clk_regs),
+};
+
+static void __init exynos7_clk_peris_init(struct device_node *np)
+{
+	samsung_cmu_register_one(np, &peris_cmu_info);
+}
+
+CLK_OF_DECLARE(exynos7_clk_peris, "samsung,exynos7-clock-peris",
+	exynos7_clk_peris_init);
diff --git a/include/dt-bindings/clock/exynos7-clk.h b/include/dt-bindings/clock/exynos7-clk.h
new file mode 100644
index 0000000..7620058
--- /dev/null
+++ b/include/dt-bindings/clock/exynos7-clk.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Author: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#ifndef _DT_BINDINGS_CLOCK_EXYNOS7_H
+#define _DT_BINDINGS_CLOCK_EXYNOS7_H
+
+/* TOPC */
+#define DOUT_ACLK_PERIS			1
+#define DOUT_SCLK_BUS0_PLL		2
+#define DOUT_SCLK_BUS1_PLL		3
+#define DOUT_SCLK_CC_PLL		4
+#define DOUT_SCLK_MFC_PLL		5
+#define TOPC_NR_CLK			6
+
+/* TOP0 */
+#define DOUT_ACLK_PERIC1		1
+#define DOUT_ACLK_PERIC0		2
+#define CLK_SCLK_UART0			3
+#define CLK_SCLK_UART1			4
+#define CLK_SCLK_UART2			5
+#define CLK_SCLK_UART3			6
+#define TOP0_NR_CLK			7
+
+/* PERIC0 */
+#define PCLK_UART0			1
+#define SCLK_UART0			2
+#define PERIC0_NR_CLK			3
+
+/* PERIC1 */
+#define PCLK_UART1			1
+#define PCLK_UART2			2
+#define PCLK_UART3			3
+#define SCLK_UART1			4
+#define SCLK_UART2			5
+#define SCLK_UART3			6
+#define PERIC1_NR_CLK			7
+
+/* PERIS */
+#define PCLK_CHIPID			1
+#define SCLK_CHIPID			2
+#define PERIS_NR_CLK			3
+
+#endif /* _DT_BINDINGS_CLOCK_EXYNOS7_H */
-- 
2.1.0

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

* [PATCH v5 5/8] arm64: dts: Add initial device tree support for EXYNOS7
  2014-09-22  4:47 ` Abhilash Kesavan
@ 2014-09-22  4:47   ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: tomasz.figa, naveenkrishna.ch, kesavan.abhilash

From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>

Add initial device tree nodes for EXYNOS7 SoC and board dts file
to support Espresso board based on Exynos7 SoC.

Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm64/boot/dts/Makefile                    |   1 +
 arch/arm64/boot/dts/exynos/Makefile             |   5 +
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts |  39 +++++
 arch/arm64/boot/dts/exynos/exynos7.dtsi         | 183 ++++++++++++++++++++++++
 4 files changed, 228 insertions(+)
 create mode 100644 arch/arm64/boot/dts/exynos/Makefile
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7-espresso.dts
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7.dtsi

diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index 309c3dc..b13bf21 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -1,5 +1,6 @@
 dts-dirs += apm
 dts-dirs += arm
+dts-dirs += exynos
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/exynos/Makefile b/arch/arm64/boot/dts/exynos/Makefile
new file mode 100644
index 0000000..20310e5
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/Makefile
@@ -0,0 +1,5 @@
+dtb-$(CONFIG_ARCH_EXYNOS7) += exynos7-espresso.dtb
+
+always		:= $(dtb-y)
+subdir-y	:= $(dts-dirs)
+clean-files	:= *.dtb
diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
new file mode 100644
index 0000000..e2c8283
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
@@ -0,0 +1,39 @@
+/*
+ * SAMSUNG Exynos7 Espresso board device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/dts-v1/;
+#include "exynos7.dtsi"
+
+/ {
+	model = "Samsung Exynos7 Espresso board based on EXYNOS7";
+	compatible = "samsung,exynos7-espresso", "samsung,exynos7";
+
+	aliases {
+		serial0 = &serial_2;
+	};
+
+	chosen {
+		linux,stdout-path = &serial_2;
+	};
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0x0 0x40000000 0x0 0xC0000000>;
+	};
+};
+
+&fin_pll {
+	clock-frequency = <24000000>;
+};
+
+&serial_2 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
new file mode 100644
index 0000000..a326fbf
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -0,0 +1,183 @@
+/*
+ * SAMSUNG EXYNOS7 SoC device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <dt-bindings/clock/exynos7-clk.h>
+
+/ {
+	compatible = "samsung,exynos7";
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a57", "arm,armv8";
+			enable-method = "psci";
+			reg = <0x0>;
+		};
+
+		cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a57", "arm,armv8";
+			enable-method = "psci";
+			reg = <0x1>;
+		};
+
+		cpu@2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a57", "arm,armv8";
+			enable-method = "psci";
+			reg = <0x2>;
+		};
+
+		cpu@3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a57", "arm,armv8";
+			enable-method = "psci";
+			reg = <0x3>;
+		};
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	soc: soc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0 0x18000000>;
+
+		chipid@10000000 {
+			compatible = "samsung,exynos4210-chipid";
+			reg = <0x10000000 0x100>;
+		};
+
+		fin_pll: xxti {
+			compatible = "fixed-clock";
+			clock-output-names = "fin_pll";
+			#clock-cells = <0>;
+		};
+
+		gic: interrupt-controller@11001000 {
+			compatible = "arm,gic-400";
+			#interrupt-cells = <3>;
+			#address-cells = <0>;
+			interrupt-controller;
+			reg =	<0x11001000 0x1000>,
+				<0x11002000 0x1000>,
+				<0x11004000 0x2000>,
+				<0x11006000 0x2000>;
+		};
+
+		clock_topc: clock-controller@10570000 {
+			compatible = "samsung,exynos7-clock-topc";
+			reg = <0x10570000 0x10000>;
+			#clock-cells = <1>;
+		};
+
+		clock_top0: clock-controller@105d0000 {
+			compatible = "samsung,exynos7-clock-top0";
+			reg = <0x105d0000 0xb000>;
+			#clock-cells = <1>;
+			clocks = <&fin_pll>, <&clock_topc DOUT_SCLK_BUS0_PLL>,
+				 <&clock_topc DOUT_SCLK_BUS1_PLL>,
+				 <&clock_topc DOUT_SCLK_CC_PLL>,
+				 <&clock_topc DOUT_SCLK_MFC_PLL>;
+			clock-names = "fin_pll", "dout_sclk_bus0_pll",
+				      "dout_sclk_bus1_pll", "dout_sclk_cc_pll",
+				      "dout_sclk_mfc_pll";
+		};
+
+		clock_peric0: clock-controller@13610000 {
+			compatible = "samsung,exynos7-clock-peric0";
+			reg = <0x13610000 0xd00>;
+			#clock-cells = <1>;
+			clocks = <&fin_pll>, <&clock_top0 DOUT_ACLK_PERIC0>,
+				 <&clock_top0 CLK_SCLK_UART0>;
+			clock-names = "fin_pll", "dout_aclk_peric0_66",
+				      "sclk_uart0";
+		};
+
+		clock_peric1: clock-controller@14C80000 {
+			compatible = "samsung,exynos7-clock-peric1";
+			reg = <0x14c80000 0xd00>;
+			#clock-cells = <1>;
+			clocks = <&fin_pll>, <&clock_top0 DOUT_ACLK_PERIC1>,
+				 <&clock_top0 CLK_SCLK_UART1>,
+				 <&clock_top0 CLK_SCLK_UART2>,
+				 <&clock_top0 CLK_SCLK_UART3>;
+			clock-names = "fin_pll", "dout_aclk_peric1_66",
+				      "sclk_uart1", "sclk_uart2", "sclk_uart3";
+		};
+
+		clock_peris: clock-controller@10040000 {
+			compatible = "samsung,exynos7-clock-peris";
+			reg = <0x10040000 0xd00>;
+			#clock-cells = <1>;
+			clocks = <&fin_pll>, <&clock_topc DOUT_ACLK_PERIS>;
+			clock-names = "fin_pll", "dout_aclk_peris_66";
+		};
+
+		serial_0: serial@13630000 {
+			compatible = "samsung,exynos4210-uart";
+			reg = <0x13630000 0x100>;
+			interrupts = <0 440 0>;
+			clocks = <&clock_peric0 PCLK_UART0>,
+				 <&clock_peric0 SCLK_UART0>;
+			clock-names = "uart", "clk_uart_baud0";
+			status = "disabled";
+		};
+
+		serial_1: serial@14c20000 {
+			compatible = "samsung,exynos4210-uart";
+			reg = <0x14c20000 0x100>;
+			interrupts = <0 456 0>;
+			clocks = <&clock_peric1 PCLK_UART1>,
+				 <&clock_peric1 SCLK_UART1>;
+			clock-names = "uart", "clk_uart_baud0";
+			status = "disabled";
+		};
+
+		serial_2: serial@14c30000 {
+			compatible = "samsung,exynos4210-uart";
+			reg = <0x14c30000 0x100>;
+			interrupts = <0 457 0>;
+			clocks = <&clock_peric1 PCLK_UART2>,
+				 <&clock_peric1 SCLK_UART2>;
+			clock-names = "uart", "clk_uart_baud0";
+			status = "disabled";
+		};
+
+		serial_3: serial@14c40000 {
+			compatible = "samsung,exynos4210-uart";
+			reg = <0x14c40000 0x100>;
+			interrupts = <0 458 0>;
+			clocks = <&clock_peric1 PCLK_UART3>,
+				 <&clock_peric1 SCLK_UART3>;
+			clock-names = "uart", "clk_uart_baud0";
+			status = "disabled";
+		};
+
+		timer {
+			compatible = "arm,armv8-timer";
+			interrupts = <1 13 0xff01>,
+				     <1 14 0xff01>,
+				     <1 11 0xff01>,
+				     <1 10 0xff01>;
+		};
+	};
+};
-- 
2.1.0

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

* [PATCH v5 5/8] arm64: dts: Add initial device tree support for EXYNOS7
@ 2014-09-22  4:47   ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-arm-kernel

From: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>

Add initial device tree nodes for EXYNOS7 SoC and board dts file
to support Espresso board based on Exynos7 SoC.

Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm64/boot/dts/Makefile                    |   1 +
 arch/arm64/boot/dts/exynos/Makefile             |   5 +
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts |  39 +++++
 arch/arm64/boot/dts/exynos/exynos7.dtsi         | 183 ++++++++++++++++++++++++
 4 files changed, 228 insertions(+)
 create mode 100644 arch/arm64/boot/dts/exynos/Makefile
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7-espresso.dts
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7.dtsi

diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index 309c3dc..b13bf21 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -1,5 +1,6 @@
 dts-dirs += apm
 dts-dirs += arm
+dts-dirs += exynos
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
diff --git a/arch/arm64/boot/dts/exynos/Makefile b/arch/arm64/boot/dts/exynos/Makefile
new file mode 100644
index 0000000..20310e5
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/Makefile
@@ -0,0 +1,5 @@
+dtb-$(CONFIG_ARCH_EXYNOS7) += exynos7-espresso.dtb
+
+always		:= $(dtb-y)
+subdir-y	:= $(dts-dirs)
+clean-files	:= *.dtb
diff --git a/arch/arm64/boot/dts/exynos/exynos7-espresso.dts b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
new file mode 100644
index 0000000..e2c8283
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/exynos7-espresso.dts
@@ -0,0 +1,39 @@
+/*
+ * SAMSUNG Exynos7 Espresso board device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/dts-v1/;
+#include "exynos7.dtsi"
+
+/ {
+	model = "Samsung Exynos7 Espresso board based on EXYNOS7";
+	compatible = "samsung,exynos7-espresso", "samsung,exynos7";
+
+	aliases {
+		serial0 = &serial_2;
+	};
+
+	chosen {
+		linux,stdout-path = &serial_2;
+	};
+
+	memory at 40000000 {
+		device_type = "memory";
+		reg = <0x0 0x40000000 0x0 0xC0000000>;
+	};
+};
+
+&fin_pll {
+	clock-frequency = <24000000>;
+};
+
+&serial_2 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
new file mode 100644
index 0000000..a326fbf
--- /dev/null
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -0,0 +1,183 @@
+/*
+ * SAMSUNG EXYNOS7 SoC device tree source
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <dt-bindings/clock/exynos7-clk.h>
+
+/ {
+	compatible = "samsung,exynos7";
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu at 0 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a57", "arm,armv8";
+			enable-method = "psci";
+			reg = <0x0>;
+		};
+
+		cpu at 1 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a57", "arm,armv8";
+			enable-method = "psci";
+			reg = <0x1>;
+		};
+
+		cpu at 2 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a57", "arm,armv8";
+			enable-method = "psci";
+			reg = <0x2>;
+		};
+
+		cpu at 3 {
+			device_type = "cpu";
+			compatible = "arm,cortex-a57", "arm,armv8";
+			enable-method = "psci";
+			reg = <0x3>;
+		};
+	};
+
+	psci {
+		compatible = "arm,psci-0.2";
+		method = "smc";
+	};
+
+	soc: soc {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0 0x18000000>;
+
+		chipid at 10000000 {
+			compatible = "samsung,exynos4210-chipid";
+			reg = <0x10000000 0x100>;
+		};
+
+		fin_pll: xxti {
+			compatible = "fixed-clock";
+			clock-output-names = "fin_pll";
+			#clock-cells = <0>;
+		};
+
+		gic: interrupt-controller at 11001000 {
+			compatible = "arm,gic-400";
+			#interrupt-cells = <3>;
+			#address-cells = <0>;
+			interrupt-controller;
+			reg =	<0x11001000 0x1000>,
+				<0x11002000 0x1000>,
+				<0x11004000 0x2000>,
+				<0x11006000 0x2000>;
+		};
+
+		clock_topc: clock-controller at 10570000 {
+			compatible = "samsung,exynos7-clock-topc";
+			reg = <0x10570000 0x10000>;
+			#clock-cells = <1>;
+		};
+
+		clock_top0: clock-controller at 105d0000 {
+			compatible = "samsung,exynos7-clock-top0";
+			reg = <0x105d0000 0xb000>;
+			#clock-cells = <1>;
+			clocks = <&fin_pll>, <&clock_topc DOUT_SCLK_BUS0_PLL>,
+				 <&clock_topc DOUT_SCLK_BUS1_PLL>,
+				 <&clock_topc DOUT_SCLK_CC_PLL>,
+				 <&clock_topc DOUT_SCLK_MFC_PLL>;
+			clock-names = "fin_pll", "dout_sclk_bus0_pll",
+				      "dout_sclk_bus1_pll", "dout_sclk_cc_pll",
+				      "dout_sclk_mfc_pll";
+		};
+
+		clock_peric0: clock-controller at 13610000 {
+			compatible = "samsung,exynos7-clock-peric0";
+			reg = <0x13610000 0xd00>;
+			#clock-cells = <1>;
+			clocks = <&fin_pll>, <&clock_top0 DOUT_ACLK_PERIC0>,
+				 <&clock_top0 CLK_SCLK_UART0>;
+			clock-names = "fin_pll", "dout_aclk_peric0_66",
+				      "sclk_uart0";
+		};
+
+		clock_peric1: clock-controller at 14C80000 {
+			compatible = "samsung,exynos7-clock-peric1";
+			reg = <0x14c80000 0xd00>;
+			#clock-cells = <1>;
+			clocks = <&fin_pll>, <&clock_top0 DOUT_ACLK_PERIC1>,
+				 <&clock_top0 CLK_SCLK_UART1>,
+				 <&clock_top0 CLK_SCLK_UART2>,
+				 <&clock_top0 CLK_SCLK_UART3>;
+			clock-names = "fin_pll", "dout_aclk_peric1_66",
+				      "sclk_uart1", "sclk_uart2", "sclk_uart3";
+		};
+
+		clock_peris: clock-controller at 10040000 {
+			compatible = "samsung,exynos7-clock-peris";
+			reg = <0x10040000 0xd00>;
+			#clock-cells = <1>;
+			clocks = <&fin_pll>, <&clock_topc DOUT_ACLK_PERIS>;
+			clock-names = "fin_pll", "dout_aclk_peris_66";
+		};
+
+		serial_0: serial at 13630000 {
+			compatible = "samsung,exynos4210-uart";
+			reg = <0x13630000 0x100>;
+			interrupts = <0 440 0>;
+			clocks = <&clock_peric0 PCLK_UART0>,
+				 <&clock_peric0 SCLK_UART0>;
+			clock-names = "uart", "clk_uart_baud0";
+			status = "disabled";
+		};
+
+		serial_1: serial at 14c20000 {
+			compatible = "samsung,exynos4210-uart";
+			reg = <0x14c20000 0x100>;
+			interrupts = <0 456 0>;
+			clocks = <&clock_peric1 PCLK_UART1>,
+				 <&clock_peric1 SCLK_UART1>;
+			clock-names = "uart", "clk_uart_baud0";
+			status = "disabled";
+		};
+
+		serial_2: serial at 14c30000 {
+			compatible = "samsung,exynos4210-uart";
+			reg = <0x14c30000 0x100>;
+			interrupts = <0 457 0>;
+			clocks = <&clock_peric1 PCLK_UART2>,
+				 <&clock_peric1 SCLK_UART2>;
+			clock-names = "uart", "clk_uart_baud0";
+			status = "disabled";
+		};
+
+		serial_3: serial at 14c40000 {
+			compatible = "samsung,exynos4210-uart";
+			reg = <0x14c40000 0x100>;
+			interrupts = <0 458 0>;
+			clocks = <&clock_peric1 PCLK_UART3>,
+				 <&clock_peric1 SCLK_UART3>;
+			clock-names = "uart", "clk_uart_baud0";
+			status = "disabled";
+		};
+
+		timer {
+			compatible = "arm,armv8-timer";
+			interrupts = <1 13 0xff01>,
+				     <1 14 0xff01>,
+				     <1 11 0xff01>,
+				     <1 10 0xff01>;
+		};
+	};
+};
-- 
2.1.0

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

* [PATCH v5 6/8] arm64: exynos7: Enable ARMv8 based Exynos7 (SoC) support
  2014-09-22  4:47 ` Abhilash Kesavan
@ 2014-09-22  4:47   ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: tomasz.figa, naveenkrishna.ch, kesavan.abhilash

From: Alim Akhtar <alim.akhtar@samsung.com>

This patch adds the necessary Kconfig entries to enable
support for the ARMv8 based Exynos7 SoC.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm64/Kconfig | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 2ca2ebd..1874e1a 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -137,6 +137,18 @@ source "kernel/Kconfig.freezer"
 
 menu "Platform selection"
 
+config ARCH_EXYNOS
+	bool
+	help
+	  This enables support for Samsung Exynos SoC family
+
+config ARCH_EXYNOS7
+	bool "ARMv8 based Samsung Exynos7"
+	select ARCH_EXYNOS
+	select COMMON_CLK_SAMSUNG
+	help
+	  This enables support for Samsung Exynos7 SoC family
+
 config ARCH_VEXPRESS
 	bool "ARMv8 software model (Versatile Express)"
 	select ARCH_REQUIRE_GPIOLIB
-- 
2.1.0

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

* [PATCH v5 6/8] arm64: exynos7: Enable ARMv8 based Exynos7 (SoC) support
@ 2014-09-22  4:47   ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-arm-kernel

From: Alim Akhtar <alim.akhtar@samsung.com>

This patch adds the necessary Kconfig entries to enable
support for the ARMv8 based Exynos7 SoC.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm64/Kconfig | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 2ca2ebd..1874e1a 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -137,6 +137,18 @@ source "kernel/Kconfig.freezer"
 
 menu "Platform selection"
 
+config ARCH_EXYNOS
+	bool
+	help
+	  This enables support for Samsung Exynos SoC family
+
+config ARCH_EXYNOS7
+	bool "ARMv8 based Samsung Exynos7"
+	select ARCH_EXYNOS
+	select COMMON_CLK_SAMSUNG
+	help
+	  This enables support for Samsung Exynos7 SoC family
+
 config ARCH_VEXPRESS
 	bool "ARMv8 software model (Versatile Express)"
 	select ARCH_REQUIRE_GPIOLIB
-- 
2.1.0

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

* [PATCH v5 7/8] arm64: Enable Exynos7 SOC in the defconfig
  2014-09-22  4:47 ` Abhilash Kesavan
@ 2014-09-22  4:47   ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: tomasz.figa, naveenkrishna.ch, kesavan.abhilash

From: Alim Akhtar <alim.akhtar@samsung.com>

Enable Exynos7 SOC in the arm64 defconfig. Also enable the
samsung serial driver needed by this SoC.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
---
 arch/arm64/configs/defconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index d92ef3c..f6db9b2 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -32,6 +32,8 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_IOSCHED_DEADLINE is not set
+CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS7=y
 CONFIG_ARCH_VEXPRESS=y
 CONFIG_ARCH_XGENE=y
 CONFIG_SMP=y
@@ -82,6 +84,8 @@ CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_VIRTIO_CONSOLE=y
 # CONFIG_HW_RANDOM is not set
-- 
2.1.0

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

* [PATCH v5 7/8] arm64: Enable Exynos7 SOC in the defconfig
@ 2014-09-22  4:47   ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-arm-kernel

From: Alim Akhtar <alim.akhtar@samsung.com>

Enable Exynos7 SOC in the arm64 defconfig. Also enable the
samsung serial driver needed by this SoC.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
---
 arch/arm64/configs/defconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index d92ef3c..f6db9b2 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -32,6 +32,8 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_IOSCHED_DEADLINE is not set
+CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_EXYNOS7=y
 CONFIG_ARCH_VEXPRESS=y
 CONFIG_ARCH_XGENE=y
 CONFIG_SMP=y
@@ -82,6 +84,8 @@ CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_VIRTIO_CONSOLE=y
 # CONFIG_HW_RANDOM is not set
-- 
2.1.0

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

* [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink
  2014-09-22  4:47 ` Abhilash Kesavan
@ 2014-09-22  4:47   ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: tomasz.figa, naveenkrishna.ch, kesavan.abhilash

From: Pankaj Dubey <pankaj.dubey@samsung.com>

Add symlink to include/dt-bindings from arch/arm64/boot/dts/include/ to
match the ones in ARM architectures so that preprocessed device
tree files can include various useful constant definitions.

See commit c58299aa8754 ("kbuild: create an "include chroot" for DT bindings")
merged in v3.10-rc1 for details.

CC: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
---
 arch/arm64/boot/dts/include/dt-bindings | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 arch/arm64/boot/dts/include/dt-bindings

diff --git a/arch/arm64/boot/dts/include/dt-bindings b/arch/arm64/boot/dts/include/dt-bindings
new file mode 120000
index 0000000..1e89bce
--- /dev/null
+++ b/arch/arm64/boot/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../../include/dt-bindings/
\ No newline at end of file
-- 
2.1.0

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

* [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink
@ 2014-09-22  4:47   ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:47 UTC (permalink / raw)
  To: linux-arm-kernel

From: Pankaj Dubey <pankaj.dubey@samsung.com>

Add symlink to include/dt-bindings from arch/arm64/boot/dts/include/ to
match the ones in ARM architectures so that preprocessed device
tree files can include various useful constant definitions.

See commit c58299aa8754 ("kbuild: create an "include chroot" for DT bindings")
merged in v3.10-rc1 for details.

CC: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Tested-by: Thomas Abraham <thomas.ab@samsung.com>
---
 arch/arm64/boot/dts/include/dt-bindings | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 arch/arm64/boot/dts/include/dt-bindings

diff --git a/arch/arm64/boot/dts/include/dt-bindings b/arch/arm64/boot/dts/include/dt-bindings
new file mode 120000
index 0000000..1e89bce
--- /dev/null
+++ b/arch/arm64/boot/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../../include/dt-bindings/
\ No newline at end of file
-- 
2.1.0

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

* Re: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-09-22  4:47 ` Abhilash Kesavan
@ 2014-09-22  8:52   ` Tomasz Figa
  -1 siblings, 0 replies; 48+ messages in thread
From: Tomasz Figa @ 2014-09-22  8:52 UTC (permalink / raw)
  To: Abhilash Kesavan, linux-samsung-soc, linux-arm-kernel,
	devicetree, catalin.marinas
  Cc: naveenkrishna.ch, kesavan.abhilash

Hi Abhilash,

On 22.09.2014 06:47, Abhilash Kesavan wrote:
> Changes since v4:
> - Fixed comments from Tomasz Figa:
> 	- Changed the namespace prefix from exynos to samsung
> 	- Defined bindings to take all input clocks
> 	- Sorted the Kconfig entries alphabetically in clock Makefile
> 	- Used consistent 1 tab line breaks across the clock file
> 	- Statically initialized the samsung_cmu_info struct
> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
> 

The clock patches look good to me, but since they are doing quite a lot
of code moving I'd prefer to take them through clk tree. Based on the
fact that there are no code dependencies between clock patches and
remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
apply them to my tree if nobody minds.

Best regards,
Tomasz

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-22  8:52   ` Tomasz Figa
  0 siblings, 0 replies; 48+ messages in thread
From: Tomasz Figa @ 2014-09-22  8:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Abhilash,

On 22.09.2014 06:47, Abhilash Kesavan wrote:
> Changes since v4:
> - Fixed comments from Tomasz Figa:
> 	- Changed the namespace prefix from exynos to samsung
> 	- Defined bindings to take all input clocks
> 	- Sorted the Kconfig entries alphabetically in clock Makefile
> 	- Used consistent 1 tab line breaks across the clock file
> 	- Statically initialized the samsung_cmu_info struct
> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
> 

The clock patches look good to me, but since they are doing quite a lot
of code moving I'd prefer to take them through clk tree. Based on the
fact that there are no code dependencies between clock patches and
remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
apply them to my tree if nobody minds.

Best regards,
Tomasz

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

* RE: [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink
  2014-09-22  4:47   ` Abhilash Kesavan
@ 2014-09-23  7:46     ` Chanho Park
  -1 siblings, 0 replies; 48+ messages in thread
From: Chanho Park @ 2014-09-23  7:46 UTC (permalink / raw)
  To: 'Abhilash Kesavan',
	linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: naveenkrishna.ch, kesavan.abhilash, tomasz.figa

Hi,

> -----Original Message-----
> From: linux-arm-kernel [mailto:linux-arm-kernel-
> bounces@lists.infradead.org] On Behalf Of Abhilash Kesavan
> Sent: Monday, September 22, 2014 1:47 PM
> To: linux-samsung-soc@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; devicetree@vger.kernel.org;
> catalin.marinas@arm.com
> Cc: naveenkrishna.ch@gmail.com; kesavan.abhilash@gmail.com;
> tomasz.figa@gmail.com
> Subject: [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink
> 
> From: Pankaj Dubey <pankaj.dubey@samsung.com>
> 
> Add symlink to include/dt-bindings from arch/arm64/boot/dts/include/ to
> match the ones in ARM architectures so that preprocessed device
> tree files can include various useful constant definitions.
> 
> See commit c58299aa8754 ("kbuild: create an "include chroot" for DT
> bindings")
> merged in v3.10-rc1 for details.
> 
> CC: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
> Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
> Tested-by: Thomas Abraham <thomas.ab@samsung.com>
> ---
>  arch/arm64/boot/dts/include/dt-bindings | 1 +
>  1 file changed, 1 insertion(+)
>  create mode 120000 arch/arm64/boot/dts/include/dt-bindings
> 
> diff --git a/arch/arm64/boot/dts/include/dt-bindings
> b/arch/arm64/boot/dts/include/dt-bindings
> new file mode 120000
> index 0000000..1e89bce
> --- /dev/null
> +++ b/arch/arm64/boot/dts/include/dt-bindings
> @@ -0,0 +1 @@
> +../../../../../include/dt-bindings/
> \ No newline at end of file
^
It generates incorrect symlink. Please remove last line like below:

diff --git a/arch/arm64/boot/dts/include/dt-bindings
b/arch/arm64/boot/dts/include/dt-bindings
new file mode 120000
index 0000000..499472b
--- /dev/null
+++ b/arch/arm64/boot/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../../include/dt-bindings/
--

Best Regards,
Chanho Park

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

* [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink
@ 2014-09-23  7:46     ` Chanho Park
  0 siblings, 0 replies; 48+ messages in thread
From: Chanho Park @ 2014-09-23  7:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

> -----Original Message-----
> From: linux-arm-kernel [mailto:linux-arm-kernel-
> bounces at lists.infradead.org] On Behalf Of Abhilash Kesavan
> Sent: Monday, September 22, 2014 1:47 PM
> To: linux-samsung-soc at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org; devicetree at vger.kernel.org;
> catalin.marinas at arm.com
> Cc: naveenkrishna.ch at gmail.com; kesavan.abhilash at gmail.com;
> tomasz.figa at gmail.com
> Subject: [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink
> 
> From: Pankaj Dubey <pankaj.dubey@samsung.com>
> 
> Add symlink to include/dt-bindings from arch/arm64/boot/dts/include/ to
> match the ones in ARM architectures so that preprocessed device
> tree files can include various useful constant definitions.
> 
> See commit c58299aa8754 ("kbuild: create an "include chroot" for DT
> bindings")
> merged in v3.10-rc1 for details.
> 
> CC: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
> Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
> Tested-by: Thomas Abraham <thomas.ab@samsung.com>
> ---
>  arch/arm64/boot/dts/include/dt-bindings | 1 +
>  1 file changed, 1 insertion(+)
>  create mode 120000 arch/arm64/boot/dts/include/dt-bindings
> 
> diff --git a/arch/arm64/boot/dts/include/dt-bindings
> b/arch/arm64/boot/dts/include/dt-bindings
> new file mode 120000
> index 0000000..1e89bce
> --- /dev/null
> +++ b/arch/arm64/boot/dts/include/dt-bindings
> @@ -0,0 +1 @@
> +../../../../../include/dt-bindings/
> \ No newline at end of file
^
It generates incorrect symlink. Please remove last line like below:

diff --git a/arch/arm64/boot/dts/include/dt-bindings
b/arch/arm64/boot/dts/include/dt-bindings
new file mode 120000
index 0000000..499472b
--- /dev/null
+++ b/arch/arm64/boot/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../../include/dt-bindings/
--

Best Regards,
Chanho Park

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

* RE: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-09-22  4:47 ` Abhilash Kesavan
@ 2014-09-23  7:50   ` Chanho Park
  -1 siblings, 0 replies; 48+ messages in thread
From: Chanho Park @ 2014-09-23  7:50 UTC (permalink / raw)
  To: 'Abhilash Kesavan',
	linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: naveenkrishna.ch, kesavan.abhilash, tomasz.figa

Hi,

> -----Original Message-----
> From: linux-arm-kernel [mailto:linux-arm-kernel-
> bounces@lists.infradead.org] On Behalf Of Abhilash Kesavan
> Sent: Monday, September 22, 2014 1:47 PM
> To: linux-samsung-soc@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; devicetree@vger.kernel.org;
> catalin.marinas@arm.com
> Cc: naveenkrishna.ch@gmail.com; kesavan.abhilash@gmail.com;
> tomasz.figa@gmail.com
> Subject: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7
> SoC
> 
> Changes since v4:
> - Fixed comments from Tomasz Figa:
> 	- Changed the namespace prefix from exynos to samsung
> 	- Defined bindings to take all input clocks
> 	- Sorted the Kconfig entries alphabetically in clock Makefile
> 	- Used consistent 1 tab line breaks across the clock file
> 	- Statically initialized the samsung_cmu_info struct
> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed
> tags.
> 
> Changes since v3:
> - Removed aliases for serial controllers from dtsi file and moved it
>   into board specific dts file as suggested by Arnd.
> - Based this series on Robert Richter's patches for adding vendor
>   device tree sub-directories for arm64.
>   http://comments.gmane.org/gmane.linux.kbuild.devel/12131
> 
> This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
> Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
> processor.
> 
> The following patches are tested based on linux-next tree (20140919).
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
> 
> Following patches are required for this series:
> 1- "tty/serial: fix config dependencies for samsung serial"
>    https://www.mail-archive.com/linux-samsung-soc <at>
> vger.kernel.org/msg36208.html
> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
>    http://comments.gmane.org/gmane.linux.kbuild.devel/12131

Maybe you make this patch on top of the Robert's patch.
As I know, Robert's patch is not yet merged in mainline.
You should specify this dependency in mail thread.

[1]: https://lkml.org/lkml/2014/9/5/64

Best Regards,
Chanho Park

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-23  7:50   ` Chanho Park
  0 siblings, 0 replies; 48+ messages in thread
From: Chanho Park @ 2014-09-23  7:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

> -----Original Message-----
> From: linux-arm-kernel [mailto:linux-arm-kernel-
> bounces at lists.infradead.org] On Behalf Of Abhilash Kesavan
> Sent: Monday, September 22, 2014 1:47 PM
> To: linux-samsung-soc at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org; devicetree at vger.kernel.org;
> catalin.marinas at arm.com
> Cc: naveenkrishna.ch at gmail.com; kesavan.abhilash at gmail.com;
> tomasz.figa at gmail.com
> Subject: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7
> SoC
> 
> Changes since v4:
> - Fixed comments from Tomasz Figa:
> 	- Changed the namespace prefix from exynos to samsung
> 	- Defined bindings to take all input clocks
> 	- Sorted the Kconfig entries alphabetically in clock Makefile
> 	- Used consistent 1 tab line breaks across the clock file
> 	- Statically initialized the samsung_cmu_info struct
> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed
> tags.
> 
> Changes since v3:
> - Removed aliases for serial controllers from dtsi file and moved it
>   into board specific dts file as suggested by Arnd.
> - Based this series on Robert Richter's patches for adding vendor
>   device tree sub-directories for arm64.
>   http://comments.gmane.org/gmane.linux.kbuild.devel/12131
> 
> This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
> Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
> processor.
> 
> The following patches are tested based on linux-next tree (20140919).
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
> 
> Following patches are required for this series:
> 1- "tty/serial: fix config dependencies for samsung serial"
>    https://www.mail-archive.com/linux-samsung-soc <at>
> vger.kernel.org/msg36208.html
> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
>    http://comments.gmane.org/gmane.linux.kbuild.devel/12131

Maybe you make this patch on top of the Robert's patch.
As I know, Robert's patch is not yet merged in mainline.
You should specify this dependency in mail thread.

[1]: https://lkml.org/lkml/2014/9/5/64

Best Regards,
Chanho Park

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

* Re: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-09-23  7:50   ` Chanho Park
@ 2014-09-23  8:48     ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-23  8:48 UTC (permalink / raw)
  To: Chanho Park
  Cc: devicetree, linux-samsung-soc, Catalin Marinas, Tomasz Figa,
	Naveen Krishna, linux-arm-kernel

Hi Chanho,

On Tue, Sep 23, 2014 at 1:20 PM, Chanho Park <chanho61.park@samsung.com> wrote:
> Hi,
>
>> -----Original Message-----
>> From: linux-arm-kernel [mailto:linux-arm-kernel-
>> bounces@lists.infradead.org] On Behalf Of Abhilash Kesavan
>> Sent: Monday, September 22, 2014 1:47 PM
>> To: linux-samsung-soc@vger.kernel.org; linux-arm-
>> kernel@lists.infradead.org; devicetree@vger.kernel.org;
>> catalin.marinas@arm.com
>> Cc: naveenkrishna.ch@gmail.com; kesavan.abhilash@gmail.com;
>> tomasz.figa@gmail.com
>> Subject: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7
>> SoC
>>
>> Changes since v4:
>> - Fixed comments from Tomasz Figa:
>>       - Changed the namespace prefix from exynos to samsung
>>       - Defined bindings to take all input clocks
>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>>       - Used consistent 1 tab line breaks across the clock file
>>       - Statically initialized the samsung_cmu_info struct
>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed
>> tags.
>>
>> Changes since v3:
>> - Removed aliases for serial controllers from dtsi file and moved it
>>   into board specific dts file as suggested by Arnd.
>> - Based this series on Robert Richter's patches for adding vendor
>>   device tree sub-directories for arm64.
>>   http://comments.gmane.org/gmane.linux.kbuild.devel/12131
>>
>> This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
>> Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
>> processor.
>>
>> The following patches are tested based on linux-next tree (20140919).
>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
>>
>> Following patches are required for this series:
>> 1- "tty/serial: fix config dependencies for samsung serial"
>>    https://www.mail-archive.com/linux-samsung-soc <at>
>> vger.kernel.org/msg36208.html
>> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
>>    http://comments.gmane.org/gmane.linux.kbuild.devel/12131

Thanks for your comments. I have mentioned Robert's patchset as being
a dependency for my series here.

Regards,
Abhilash

>
> Maybe you make this patch on top of the Robert's patch.
> As I know, Robert's patch is not yet merged in mainline.
> You should specify this dependency in mail thread.
>
> [1]: https://lkml.org/lkml/2014/9/5/64
>
> Best Regards,
> Chanho Park
>

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-23  8:48     ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-23  8:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Chanho,

On Tue, Sep 23, 2014 at 1:20 PM, Chanho Park <chanho61.park@samsung.com> wrote:
> Hi,
>
>> -----Original Message-----
>> From: linux-arm-kernel [mailto:linux-arm-kernel-
>> bounces at lists.infradead.org] On Behalf Of Abhilash Kesavan
>> Sent: Monday, September 22, 2014 1:47 PM
>> To: linux-samsung-soc at vger.kernel.org; linux-arm-
>> kernel at lists.infradead.org; devicetree at vger.kernel.org;
>> catalin.marinas at arm.com
>> Cc: naveenkrishna.ch at gmail.com; kesavan.abhilash at gmail.com;
>> tomasz.figa at gmail.com
>> Subject: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7
>> SoC
>>
>> Changes since v4:
>> - Fixed comments from Tomasz Figa:
>>       - Changed the namespace prefix from exynos to samsung
>>       - Defined bindings to take all input clocks
>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>>       - Used consistent 1 tab line breaks across the clock file
>>       - Statically initialized the samsung_cmu_info struct
>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed
>> tags.
>>
>> Changes since v3:
>> - Removed aliases for serial controllers from dtsi file and moved it
>>   into board specific dts file as suggested by Arnd.
>> - Based this series on Robert Richter's patches for adding vendor
>>   device tree sub-directories for arm64.
>>   http://comments.gmane.org/gmane.linux.kbuild.devel/12131
>>
>> This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
>> Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
>> processor.
>>
>> The following patches are tested based on linux-next tree (20140919).
>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
>>
>> Following patches are required for this series:
>> 1- "tty/serial: fix config dependencies for samsung serial"
>>    https://www.mail-archive.com/linux-samsung-soc <at>
>> vger.kernel.org/msg36208.html
>> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
>>    http://comments.gmane.org/gmane.linux.kbuild.devel/12131

Thanks for your comments. I have mentioned Robert's patchset as being
a dependency for my series here.

Regards,
Abhilash

>
> Maybe you make this patch on top of the Robert's patch.
> As I know, Robert's patch is not yet merged in mainline.
> You should specify this dependency in mail thread.
>
> [1]: https://lkml.org/lkml/2014/9/5/64
>
> Best Regards,
> Chanho Park
>

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

* Re: [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink
  2014-09-23  7:46     ` Chanho Park
@ 2014-09-23  8:54       ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-23  8:54 UTC (permalink / raw)
  To: Chanho Park
  Cc: linux-samsung-soc, linux-arm-kernel, devicetree, Catalin Marinas,
	Naveen Krishna, Tomasz Figa

Hi Chanho,

On Tue, Sep 23, 2014 at 1:16 PM, Chanho Park <chanho61.park@samsung.com> wrote:
> Hi,
>
>> -----Original Message-----
>> From: linux-arm-kernel [mailto:linux-arm-kernel-
>> bounces@lists.infradead.org] On Behalf Of Abhilash Kesavan
>> Sent: Monday, September 22, 2014 1:47 PM
>> To: linux-samsung-soc@vger.kernel.org; linux-arm-
>> kernel@lists.infradead.org; devicetree@vger.kernel.org;
>> catalin.marinas@arm.com
>> Cc: naveenkrishna.ch@gmail.com; kesavan.abhilash@gmail.com;
>> tomasz.figa@gmail.com
>> Subject: [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink
>>
>> From: Pankaj Dubey <pankaj.dubey@samsung.com>
>>
>> Add symlink to include/dt-bindings from arch/arm64/boot/dts/include/ to
>> match the ones in ARM architectures so that preprocessed device
>> tree files can include various useful constant definitions.
>>
>> See commit c58299aa8754 ("kbuild: create an "include chroot" for DT
>> bindings")
>> merged in v3.10-rc1 for details.
>>
>> CC: Catalin Marinas <catalin.marinas@arm.com>
>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
>> Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
>> Tested-by: Thomas Abraham <thomas.ab@samsung.com>
>> ---
>>  arch/arm64/boot/dts/include/dt-bindings | 1 +
>>  1 file changed, 1 insertion(+)
>>  create mode 120000 arch/arm64/boot/dts/include/dt-bindings
>>
>> diff --git a/arch/arm64/boot/dts/include/dt-bindings
>> b/arch/arm64/boot/dts/include/dt-bindings
>> new file mode 120000
>> index 0000000..1e89bce
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/include/dt-bindings
>> @@ -0,0 +1 @@
>> +../../../../../include/dt-bindings/
>> \ No newline at end of file
> ^
> It generates incorrect symlink. Please remove last line like below:
>
> diff --git a/arch/arm64/boot/dts/include/dt-bindings
> b/arch/arm64/boot/dts/include/dt-bindings
> new file mode 120000
> index 0000000..499472b
> --- /dev/null
> +++ b/arch/arm64/boot/dts/include/dt-bindings
> @@ -0,0 +1 @@
> +../../../../../include/dt-bindings/

I just re-checked this patch and it seems to be working fine. I did
find a thread where patchwork appeared to be changing the patch
causing issues [1]. Are you downloading this via patchwork ?

[1] http://www.spinics.net/lists/linux-kbuild/msg08656.html

Regards,
Abhilash
> --
>
> Best Regards,
> Chanho Park
>

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

* [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink
@ 2014-09-23  8:54       ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-23  8:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Chanho,

On Tue, Sep 23, 2014 at 1:16 PM, Chanho Park <chanho61.park@samsung.com> wrote:
> Hi,
>
>> -----Original Message-----
>> From: linux-arm-kernel [mailto:linux-arm-kernel-
>> bounces at lists.infradead.org] On Behalf Of Abhilash Kesavan
>> Sent: Monday, September 22, 2014 1:47 PM
>> To: linux-samsung-soc at vger.kernel.org; linux-arm-
>> kernel at lists.infradead.org; devicetree at vger.kernel.org;
>> catalin.marinas at arm.com
>> Cc: naveenkrishna.ch at gmail.com; kesavan.abhilash at gmail.com;
>> tomasz.figa at gmail.com
>> Subject: [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink
>>
>> From: Pankaj Dubey <pankaj.dubey@samsung.com>
>>
>> Add symlink to include/dt-bindings from arch/arm64/boot/dts/include/ to
>> match the ones in ARM architectures so that preprocessed device
>> tree files can include various useful constant definitions.
>>
>> See commit c58299aa8754 ("kbuild: create an "include chroot" for DT
>> bindings")
>> merged in v3.10-rc1 for details.
>>
>> CC: Catalin Marinas <catalin.marinas@arm.com>
>> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
>> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
>> Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
>> Tested-by: Thomas Abraham <thomas.ab@samsung.com>
>> ---
>>  arch/arm64/boot/dts/include/dt-bindings | 1 +
>>  1 file changed, 1 insertion(+)
>>  create mode 120000 arch/arm64/boot/dts/include/dt-bindings
>>
>> diff --git a/arch/arm64/boot/dts/include/dt-bindings
>> b/arch/arm64/boot/dts/include/dt-bindings
>> new file mode 120000
>> index 0000000..1e89bce
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/include/dt-bindings
>> @@ -0,0 +1 @@
>> +../../../../../include/dt-bindings/
>> \ No newline at end of file
> ^
> It generates incorrect symlink. Please remove last line like below:
>
> diff --git a/arch/arm64/boot/dts/include/dt-bindings
> b/arch/arm64/boot/dts/include/dt-bindings
> new file mode 120000
> index 0000000..499472b
> --- /dev/null
> +++ b/arch/arm64/boot/dts/include/dt-bindings
> @@ -0,0 +1 @@
> +../../../../../include/dt-bindings/

I just re-checked this patch and it seems to be working fine. I did
find a thread where patchwork appeared to be changing the patch
causing issues [1]. Are you downloading this via patchwork ?

[1] http://www.spinics.net/lists/linux-kbuild/msg08656.html

Regards,
Abhilash
> --
>
> Best Regards,
> Chanho Park
>

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

* Re: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-09-22  8:52   ` Tomasz Figa
@ 2014-09-30 15:12     ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-30 15:12 UTC (permalink / raw)
  To: Tomasz Figa
  Cc: linux-samsung-soc, linux-arm-kernel, devicetree, Catalin Marinas,
	Naveen Krishna

Hi Tomasz,

On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> Hi Abhilash,
>
> On 22.09.2014 06:47, Abhilash Kesavan wrote:
>> Changes since v4:
>> - Fixed comments from Tomasz Figa:
>>       - Changed the namespace prefix from exynos to samsung
>>       - Defined bindings to take all input clocks
>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>>       - Used consistent 1 tab line breaks across the clock file
>>       - Statically initialized the samsung_cmu_info struct
>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
>>
>
> The clock patches look good to me, but since they are doing quite a lot
> of code moving I'd prefer to take them through clk tree. Based on the
> fact that there are no code dependencies between clock patches and
> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
> apply them to my tree if nobody minds.

Will you be picking up the clock changes soon ?

Regards,
Abhilash
>
> Best regards,
> Tomasz

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-30 15:12     ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-30 15:12 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tomasz,

On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> Hi Abhilash,
>
> On 22.09.2014 06:47, Abhilash Kesavan wrote:
>> Changes since v4:
>> - Fixed comments from Tomasz Figa:
>>       - Changed the namespace prefix from exynos to samsung
>>       - Defined bindings to take all input clocks
>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>>       - Used consistent 1 tab line breaks across the clock file
>>       - Statically initialized the samsung_cmu_info struct
>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
>>
>
> The clock patches look good to me, but since they are doing quite a lot
> of code moving I'd prefer to take them through clk tree. Based on the
> fact that there are no code dependencies between clock patches and
> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
> apply them to my tree if nobody minds.

Will you be picking up the clock changes soon ?

Regards,
Abhilash
>
> Best regards,
> Tomasz

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

* Re: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-09-23  8:48     ` Abhilash Kesavan
@ 2014-09-30 15:15       ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-30 15:15 UTC (permalink / raw)
  To: Chanho Park
  Cc: linux-samsung-soc, linux-arm-kernel, devicetree, Catalin Marinas,
	Naveen Krishna, Tomasz Figa

Hi Catalin,

On Tue, Sep 23, 2014 at 2:18 PM, Abhilash Kesavan
<kesavan.abhilash@gmail.com> wrote:
> Hi Chanho,
>
> On Tue, Sep 23, 2014 at 1:20 PM, Chanho Park <chanho61.park@samsung.com> wrote:
>> Hi,
>>
>>> -----Original Message-----
>>> From: linux-arm-kernel [mailto:linux-arm-kernel-
>>> bounces@lists.infradead.org] On Behalf Of Abhilash Kesavan
>>> Sent: Monday, September 22, 2014 1:47 PM
>>> To: linux-samsung-soc@vger.kernel.org; linux-arm-
>>> kernel@lists.infradead.org; devicetree@vger.kernel.org;
>>> catalin.marinas@arm.com
>>> Cc: naveenkrishna.ch@gmail.com; kesavan.abhilash@gmail.com;
>>> tomasz.figa@gmail.com
>>> Subject: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7
>>> SoC
>>>
>>> Changes since v4:
>>> - Fixed comments from Tomasz Figa:
>>>       - Changed the namespace prefix from exynos to samsung
>>>       - Defined bindings to take all input clocks
>>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>>>       - Used consistent 1 tab line breaks across the clock file
>>>       - Statically initialized the samsung_cmu_info struct
>>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed
>>> tags.
>>>
>>> Changes since v3:
>>> - Removed aliases for serial controllers from dtsi file and moved it
>>>   into board specific dts file as suggested by Arnd.
>>> - Based this series on Robert Richter's patches for adding vendor
>>>   device tree sub-directories for arm64.
>>>   http://comments.gmane.org/gmane.linux.kbuild.devel/12131
>>>
>>> This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
>>> Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
>>> processor.
>>>
>>> The following patches are tested based on linux-next tree (20140919).
>>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
>>>
>>> Following patches are required for this series:
>>> 1- "tty/serial: fix config dependencies for samsung serial"
>>>    https://www.mail-archive.com/linux-samsung-soc <at>
>>> vger.kernel.org/msg36208.html
>>> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
>>>    http://comments.gmane.org/gmane.linux.kbuild.devel/12131
>
> Thanks for your comments. I have mentioned Robert's patchset as being
> a dependency for my series here.

Do you have any comments on the arch and dts changes ?

Regards,
Abhilash
>
> Regards,
> Abhilash
>
>>
>> Maybe you make this patch on top of the Robert's patch.
>> As I know, Robert's patch is not yet merged in mainline.
>> You should specify this dependency in mail thread.
>>
>> [1]: https://lkml.org/lkml/2014/9/5/64
>>
>> Best Regards,
>> Chanho Park
>>

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-30 15:15       ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-30 15:15 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Catalin,

On Tue, Sep 23, 2014 at 2:18 PM, Abhilash Kesavan
<kesavan.abhilash@gmail.com> wrote:
> Hi Chanho,
>
> On Tue, Sep 23, 2014 at 1:20 PM, Chanho Park <chanho61.park@samsung.com> wrote:
>> Hi,
>>
>>> -----Original Message-----
>>> From: linux-arm-kernel [mailto:linux-arm-kernel-
>>> bounces at lists.infradead.org] On Behalf Of Abhilash Kesavan
>>> Sent: Monday, September 22, 2014 1:47 PM
>>> To: linux-samsung-soc at vger.kernel.org; linux-arm-
>>> kernel at lists.infradead.org; devicetree at vger.kernel.org;
>>> catalin.marinas at arm.com
>>> Cc: naveenkrishna.ch at gmail.com; kesavan.abhilash at gmail.com;
>>> tomasz.figa at gmail.com
>>> Subject: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7
>>> SoC
>>>
>>> Changes since v4:
>>> - Fixed comments from Tomasz Figa:
>>>       - Changed the namespace prefix from exynos to samsung
>>>       - Defined bindings to take all input clocks
>>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>>>       - Used consistent 1 tab line breaks across the clock file
>>>       - Statically initialized the samsung_cmu_info struct
>>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed
>>> tags.
>>>
>>> Changes since v3:
>>> - Removed aliases for serial controllers from dtsi file and moved it
>>>   into board specific dts file as suggested by Arnd.
>>> - Based this series on Robert Richter's patches for adding vendor
>>>   device tree sub-directories for arm64.
>>>   http://comments.gmane.org/gmane.linux.kbuild.devel/12131
>>>
>>> This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
>>> Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
>>> processor.
>>>
>>> The following patches are tested based on linux-next tree (20140919).
>>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
>>>
>>> Following patches are required for this series:
>>> 1- "tty/serial: fix config dependencies for samsung serial"
>>>    https://www.mail-archive.com/linux-samsung-soc <at>
>>> vger.kernel.org/msg36208.html
>>> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
>>>    http://comments.gmane.org/gmane.linux.kbuild.devel/12131
>
> Thanks for your comments. I have mentioned Robert's patchset as being
> a dependency for my series here.

Do you have any comments on the arch and dts changes ?

Regards,
Abhilash
>
> Regards,
> Abhilash
>
>>
>> Maybe you make this patch on top of the Robert's patch.
>> As I know, Robert's patch is not yet merged in mainline.
>> You should specify this dependency in mail thread.
>>
>> [1]: https://lkml.org/lkml/2014/9/5/64
>>
>> Best Regards,
>> Chanho Park
>>

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

* Re: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-09-30 15:15       ` Abhilash Kesavan
@ 2014-09-30 15:50         ` Catalin Marinas
  -1 siblings, 0 replies; 48+ messages in thread
From: Catalin Marinas @ 2014-09-30 15:50 UTC (permalink / raw)
  To: Abhilash Kesavan
  Cc: Chanho Park, linux-samsung-soc, linux-arm-kernel, devicetree,
	Naveen Krishna, Tomasz Figa, Arnd Bergmann, Olof Johansson

On Tue, Sep 30, 2014 at 04:15:21PM +0100, Abhilash Kesavan wrote:
> On Tue, Sep 23, 2014 at 2:18 PM, Abhilash Kesavan
> <kesavan.abhilash@gmail.com> wrote:
> >>> This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
> >>> Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
> >>> processor.
> >>>
> >>> The following patches are tested based on linux-next tree (20140919).
> >>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
> >>>
> >>> Following patches are required for this series:
> >>> 1- "tty/serial: fix config dependencies for samsung serial"
> >>>    https://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg36208.html
> >>> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
> >>>    http://comments.gmane.org/gmane.linux.kbuild.devel/12131
> >
> > Thanks for your comments. I have mentioned Robert's patchset as being
> > a dependency for my series here.
> 
> Do you have any comments on the arch and dts changes ?

The arch changes look fine to me (not much in there, just Kconfig,
defconfig, Makefile). Regarding the dts, I'd like to see some acks from
the DT or arm-soc maintainers.

BTW, the arch/arm64/ patches in your series should be merged via the
arm-soc tree (Arnd/Olof, cc'ing them now).

-- 
Catalin

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-30 15:50         ` Catalin Marinas
  0 siblings, 0 replies; 48+ messages in thread
From: Catalin Marinas @ 2014-09-30 15:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Sep 30, 2014 at 04:15:21PM +0100, Abhilash Kesavan wrote:
> On Tue, Sep 23, 2014 at 2:18 PM, Abhilash Kesavan
> <kesavan.abhilash@gmail.com> wrote:
> >>> This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
> >>> Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
> >>> processor.
> >>>
> >>> The following patches are tested based on linux-next tree (20140919).
> >>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
> >>>
> >>> Following patches are required for this series:
> >>> 1- "tty/serial: fix config dependencies for samsung serial"
> >>>    https://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg36208.html
> >>> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
> >>>    http://comments.gmane.org/gmane.linux.kbuild.devel/12131
> >
> > Thanks for your comments. I have mentioned Robert's patchset as being
> > a dependency for my series here.
> 
> Do you have any comments on the arch and dts changes ?

The arch changes look fine to me (not much in there, just Kconfig,
defconfig, Makefile). Regarding the dts, I'd like to see some acks from
the DT or arm-soc maintainers.

BTW, the arch/arm64/ patches in your series should be merged via the
arm-soc tree (Arnd/Olof, cc'ing them now).

-- 
Catalin

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

* Re: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-09-30 15:12     ` Abhilash Kesavan
@ 2014-09-30 15:56       ` Tomasz Figa
  -1 siblings, 0 replies; 48+ messages in thread
From: Tomasz Figa @ 2014-09-30 15:56 UTC (permalink / raw)
  To: Abhilash Kesavan, Kukjin Kim
  Cc: linux-samsung-soc, linux-arm-kernel, devicetree, Catalin Marinas,
	Naveen Krishna

On 30.09.2014 17:12, Abhilash Kesavan wrote:
> Hi Tomasz,
> 
> On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>> Hi Abhilash,
>>
>> On 22.09.2014 06:47, Abhilash Kesavan wrote:
>>> Changes since v4:
>>> - Fixed comments from Tomasz Figa:
>>>       - Changed the namespace prefix from exynos to samsung
>>>       - Defined bindings to take all input clocks
>>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>>>       - Used consistent 1 tab line breaks across the clock file
>>>       - Statically initialized the samsung_cmu_info struct
>>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
>>>
>>
>> The clock patches look good to me, but since they are doing quite a lot
>> of code moving I'd prefer to take them through clk tree. Based on the
>> fact that there are no code dependencies between clock patches and
>> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
>> apply them to my tree if nobody minds.
> 
> Will you be picking up the clock changes soon ?

I'd like to do so. Kukjin, since clock changes are a part of this
series, might I have your Ack for them to be applied separately?

Best regards,
Tomasz

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-30 15:56       ` Tomasz Figa
  0 siblings, 0 replies; 48+ messages in thread
From: Tomasz Figa @ 2014-09-30 15:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 30.09.2014 17:12, Abhilash Kesavan wrote:
> Hi Tomasz,
> 
> On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>> Hi Abhilash,
>>
>> On 22.09.2014 06:47, Abhilash Kesavan wrote:
>>> Changes since v4:
>>> - Fixed comments from Tomasz Figa:
>>>       - Changed the namespace prefix from exynos to samsung
>>>       - Defined bindings to take all input clocks
>>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>>>       - Used consistent 1 tab line breaks across the clock file
>>>       - Statically initialized the samsung_cmu_info struct
>>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
>>>
>>
>> The clock patches look good to me, but since they are doing quite a lot
>> of code moving I'd prefer to take them through clk tree. Based on the
>> fact that there are no code dependencies between clock patches and
>> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
>> apply them to my tree if nobody minds.
> 
> Will you be picking up the clock changes soon ?

I'd like to do so. Kukjin, since clock changes are a part of this
series, might I have your Ack for them to be applied separately?

Best regards,
Tomasz

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

* RE: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-09-30 15:56       ` Tomasz Figa
@ 2014-10-07  4:16         ` Kukjin Kim
  -1 siblings, 0 replies; 48+ messages in thread
From: Kukjin Kim @ 2014-10-07  4:16 UTC (permalink / raw)
  To: 'Tomasz Figa', 'Abhilash Kesavan'
  Cc: 'linux-samsung-soc', 'linux-arm-kernel',
	'devicetree', 'Catalin Marinas',
	'Naveen Krishna'

Tomasz Figa wrote:
> 
> On 30.09.2014 17:12, Abhilash Kesavan wrote:
> > Hi Tomasz,
> >
> > On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> >> Hi Abhilash,
> >>
> >> On 22.09.2014 06:47, Abhilash Kesavan wrote:
> >>> Changes since v4:
> >>> - Fixed comments from Tomasz Figa:
> >>>       - Changed the namespace prefix from exynos to samsung
> >>>       - Defined bindings to take all input clocks
> >>>       - Sorted the Kconfig entries alphabetically in clock Makefile
> >>>       - Used consistent 1 tab line breaks across the clock file
> >>>       - Statically initialized the samsung_cmu_info struct
> >>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
> >>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
> >>>
> >>
> >> The clock patches look good to me, but since they are doing quite a lot
> >> of code moving I'd prefer to take them through clk tree. Based on the
> >> fact that there are no code dependencies between clock patches and
> >> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
> >> apply them to my tree if nobody minds.
> >
> > Will you be picking up the clock changes soon ?
> 
> I'd like to do so. Kukjin, since clock changes are a part of this
> series, might I have your Ack for them to be applied separately?
> 
Sure, I'm fine so please go ahead with my ack on the changes.

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks for your asking.

- Kukjin

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-10-07  4:16         ` Kukjin Kim
  0 siblings, 0 replies; 48+ messages in thread
From: Kukjin Kim @ 2014-10-07  4:16 UTC (permalink / raw)
  To: linux-arm-kernel

Tomasz Figa wrote:
> 
> On 30.09.2014 17:12, Abhilash Kesavan wrote:
> > Hi Tomasz,
> >
> > On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> >> Hi Abhilash,
> >>
> >> On 22.09.2014 06:47, Abhilash Kesavan wrote:
> >>> Changes since v4:
> >>> - Fixed comments from Tomasz Figa:
> >>>       - Changed the namespace prefix from exynos to samsung
> >>>       - Defined bindings to take all input clocks
> >>>       - Sorted the Kconfig entries alphabetically in clock Makefile
> >>>       - Used consistent 1 tab line breaks across the clock file
> >>>       - Statically initialized the samsung_cmu_info struct
> >>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
> >>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
> >>>
> >>
> >> The clock patches look good to me, but since they are doing quite a lot
> >> of code moving I'd prefer to take them through clk tree. Based on the
> >> fact that there are no code dependencies between clock patches and
> >> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
> >> apply them to my tree if nobody minds.
> >
> > Will you be picking up the clock changes soon ?
> 
> I'd like to do so. Kukjin, since clock changes are a part of this
> series, might I have your Ack for them to be applied separately?
> 
Sure, I'm fine so please go ahead with my ack on the changes.

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks for your asking.

- Kukjin

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

* Re: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-09-30 15:50         ` Catalin Marinas
@ 2014-10-08  5:46           ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-10-08  5:46 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Chanho Park, linux-samsung-soc, linux-arm-kernel, devicetree,
	Naveen Krishna, Tomasz Figa, Arnd Bergmann, Olof Johansson

Hi Arnd and Olof,

On Tue, Sep 30, 2014 at 9:20 PM, Catalin Marinas
<catalin.marinas@arm.com> wrote:
> On Tue, Sep 30, 2014 at 04:15:21PM +0100, Abhilash Kesavan wrote:
>> On Tue, Sep 23, 2014 at 2:18 PM, Abhilash Kesavan
>> <kesavan.abhilash@gmail.com> wrote:
>> >>> This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
>> >>> Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
>> >>> processor.
>> >>>
>> >>> The following patches are tested based on linux-next tree (20140919).
>> >>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
>> >>>
>> >>> Following patches are required for this series:
>> >>> 1- "tty/serial: fix config dependencies for samsung serial"
>> >>>    https://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg36208.html
>> >>> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
>> >>>    http://comments.gmane.org/gmane.linux.kbuild.devel/12131
>> >
>> > Thanks for your comments. I have mentioned Robert's patchset as being
>> > a dependency for my series here.
>>
>> Do you have any comments on the arch and dts changes ?
>
> The arch changes look fine to me (not much in there, just Kconfig,
> defconfig, Makefile). Regarding the dts, I'd like to see some acks from
> the DT or arm-soc maintainers.
>
> BTW, the arch/arm64/ patches in your series should be merged via the
> arm-soc tree (Arnd/Olof, cc'ing them now).

Do you have any comments on this series ?

Abhilash
>
> --
> Catalin

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-10-08  5:46           ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-10-08  5:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Arnd and Olof,

On Tue, Sep 30, 2014 at 9:20 PM, Catalin Marinas
<catalin.marinas@arm.com> wrote:
> On Tue, Sep 30, 2014 at 04:15:21PM +0100, Abhilash Kesavan wrote:
>> On Tue, Sep 23, 2014 at 2:18 PM, Abhilash Kesavan
>> <kesavan.abhilash@gmail.com> wrote:
>> >>> This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
>> >>> Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
>> >>> processor.
>> >>>
>> >>> The following patches are tested based on linux-next tree (20140919).
>> >>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/
>> >>>
>> >>> Following patches are required for this series:
>> >>> 1- "tty/serial: fix config dependencies for samsung serial"
>> >>>    https://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg36208.html
>> >>> 2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset
>> >>>    http://comments.gmane.org/gmane.linux.kbuild.devel/12131
>> >
>> > Thanks for your comments. I have mentioned Robert's patchset as being
>> > a dependency for my series here.
>>
>> Do you have any comments on the arch and dts changes ?
>
> The arch changes look fine to me (not much in there, just Kconfig,
> defconfig, Makefile). Regarding the dts, I'd like to see some acks from
> the DT or arm-soc maintainers.
>
> BTW, the arch/arm64/ patches in your series should be merged via the
> arm-soc tree (Arnd/Olof, cc'ing them now).

Do you have any comments on this series ?

Abhilash
>
> --
> Catalin

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

* Re: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-10-07  4:16         ` Kukjin Kim
@ 2014-10-08  5:48           ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-10-08  5:48 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: Tomasz Figa, linux-samsung-soc, linux-arm-kernel, devicetree,
	Catalin Marinas, Naveen Krishna

Hi Tomasz,

On Tue, Oct 7, 2014 at 9:46 AM, Kukjin Kim <kgene@kernel.org> wrote:
> Tomasz Figa wrote:
>>
>> On 30.09.2014 17:12, Abhilash Kesavan wrote:
>> > Hi Tomasz,
>> >
>> > On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>> >> Hi Abhilash,
>> >>
>> >> On 22.09.2014 06:47, Abhilash Kesavan wrote:
>> >>> Changes since v4:
>> >>> - Fixed comments from Tomasz Figa:
>> >>>       - Changed the namespace prefix from exynos to samsung
>> >>>       - Defined bindings to take all input clocks
>> >>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>> >>>       - Used consistent 1 tab line breaks across the clock file
>> >>>       - Statically initialized the samsung_cmu_info struct
>> >>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>> >>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
>> >>>
>> >>
>> >> The clock patches look good to me, but since they are doing quite a lot
>> >> of code moving I'd prefer to take them through clk tree. Based on the
>> >> fact that there are no code dependencies between clock patches and
>> >> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
>> >> apply them to my tree if nobody minds.
>> >
>> > Will you be picking up the clock changes soon ?
>>
>> I'd like to do so. Kukjin, since clock changes are a part of this
>> series, might I have your Ack for them to be applied separately?
>>
> Sure, I'm fine so please go ahead with my ack on the changes.
>
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>
> Thanks for your asking.

Can you please pick up the clock changes now that Kukjin has ack'ed it.

Thanks,
Abhilash
>
> - Kukjin
>

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-10-08  5:48           ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-10-08  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Tomasz,

On Tue, Oct 7, 2014 at 9:46 AM, Kukjin Kim <kgene@kernel.org> wrote:
> Tomasz Figa wrote:
>>
>> On 30.09.2014 17:12, Abhilash Kesavan wrote:
>> > Hi Tomasz,
>> >
>> > On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>> >> Hi Abhilash,
>> >>
>> >> On 22.09.2014 06:47, Abhilash Kesavan wrote:
>> >>> Changes since v4:
>> >>> - Fixed comments from Tomasz Figa:
>> >>>       - Changed the namespace prefix from exynos to samsung
>> >>>       - Defined bindings to take all input clocks
>> >>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>> >>>       - Used consistent 1 tab line breaks across the clock file
>> >>>       - Statically initialized the samsung_cmu_info struct
>> >>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>> >>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
>> >>>
>> >>
>> >> The clock patches look good to me, but since they are doing quite a lot
>> >> of code moving I'd prefer to take them through clk tree. Based on the
>> >> fact that there are no code dependencies between clock patches and
>> >> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
>> >> apply them to my tree if nobody minds.
>> >
>> > Will you be picking up the clock changes soon ?
>>
>> I'd like to do so. Kukjin, since clock changes are a part of this
>> series, might I have your Ack for them to be applied separately?
>>
> Sure, I'm fine so please go ahead with my ack on the changes.
>
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>
> Thanks for your asking.

Can you please pick up the clock changes now that Kukjin has ack'ed it.

Thanks,
Abhilash
>
> - Kukjin
>

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

* Re: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-10-08  5:48           ` Abhilash Kesavan
@ 2014-10-24 14:32             ` Abhilash Kesavan
  -1 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-10-24 14:32 UTC (permalink / raw)
  To: Kukjin Kim, s.nawrocki
  Cc: Tomasz Figa, linux-samsung-soc, linux-arm-kernel, devicetree,
	Catalin Marinas, Naveen Krishna

+Sylwester

On Wed, Oct 8, 2014 at 11:18 AM, Abhilash Kesavan
<kesavan.abhilash@gmail.com> wrote:
> Hi Tomasz,
>
> On Tue, Oct 7, 2014 at 9:46 AM, Kukjin Kim <kgene@kernel.org> wrote:
>> Tomasz Figa wrote:
>>>
>>> On 30.09.2014 17:12, Abhilash Kesavan wrote:
>>> > Hi Tomasz,
>>> >
>>> > On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>>> >> Hi Abhilash,
>>> >>
>>> >> On 22.09.2014 06:47, Abhilash Kesavan wrote:
>>> >>> Changes since v4:
>>> >>> - Fixed comments from Tomasz Figa:
>>> >>>       - Changed the namespace prefix from exynos to samsung
>>> >>>       - Defined bindings to take all input clocks
>>> >>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>>> >>>       - Used consistent 1 tab line breaks across the clock file
>>> >>>       - Statically initialized the samsung_cmu_info struct
>>> >>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>>> >>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
>>> >>>
>>> >>
>>> >> The clock patches look good to me, but since they are doing quite a lot
>>> >> of code moving I'd prefer to take them through clk tree. Based on the
>>> >> fact that there are no code dependencies between clock patches and
>>> >> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
>>> >> apply them to my tree if nobody minds.
>>> >
>>> > Will you be picking up the clock changes soon ?
>>>
>>> I'd like to do so. Kukjin, since clock changes are a part of this
>>> series, might I have your Ack for them to be applied separately?
>>>
>> Sure, I'm fine so please go ahead with my ack on the changes.
>>
>> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>>
>> Thanks for your asking.
>
> Can you please pick up the clock changes now that Kukjin has ack'ed it.

Sylwester, you mentioned in another thread that Tomasz might not be
available for the next few days. Could you please consider applying
the clock changes in this series to samsung clk-next if they look OK ?

Please take a look at clock changes at
http://www.spinics.net/lists/arm-kernel/msg370673.html too.

Regards,
Abhilash

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-10-24 14:32             ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-10-24 14:32 UTC (permalink / raw)
  To: linux-arm-kernel

+Sylwester

On Wed, Oct 8, 2014 at 11:18 AM, Abhilash Kesavan
<kesavan.abhilash@gmail.com> wrote:
> Hi Tomasz,
>
> On Tue, Oct 7, 2014 at 9:46 AM, Kukjin Kim <kgene@kernel.org> wrote:
>> Tomasz Figa wrote:
>>>
>>> On 30.09.2014 17:12, Abhilash Kesavan wrote:
>>> > Hi Tomasz,
>>> >
>>> > On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>>> >> Hi Abhilash,
>>> >>
>>> >> On 22.09.2014 06:47, Abhilash Kesavan wrote:
>>> >>> Changes since v4:
>>> >>> - Fixed comments from Tomasz Figa:
>>> >>>       - Changed the namespace prefix from exynos to samsung
>>> >>>       - Defined bindings to take all input clocks
>>> >>>       - Sorted the Kconfig entries alphabetically in clock Makefile
>>> >>>       - Used consistent 1 tab line breaks across the clock file
>>> >>>       - Statically initialized the samsung_cmu_info struct
>>> >>> - Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
>>> >>> - Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.
>>> >>>
>>> >>
>>> >> The clock patches look good to me, but since they are doing quite a lot
>>> >> of code moving I'd prefer to take them through clk tree. Based on the
>>> >> fact that there are no code dependencies between clock patches and
>>> >> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
>>> >> apply them to my tree if nobody minds.
>>> >
>>> > Will you be picking up the clock changes soon ?
>>>
>>> I'd like to do so. Kukjin, since clock changes are a part of this
>>> series, might I have your Ack for them to be applied separately?
>>>
>> Sure, I'm fine so please go ahead with my ack on the changes.
>>
>> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>>
>> Thanks for your asking.
>
> Can you please pick up the clock changes now that Kukjin has ack'ed it.

Sylwester, you mentioned in another thread that Tomasz might not be
available for the next few days. Could you please consider applying
the clock changes in this series to samsung clk-next if they look OK ?

Please take a look at clock changes at
http://www.spinics.net/lists/arm-kernel/msg370673.html too.

Regards,
Abhilash

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

* Re: [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
  2014-10-24 14:32             ` Abhilash Kesavan
@ 2014-10-27 16:47               ` Sylwester Nawrocki
  -1 siblings, 0 replies; 48+ messages in thread
From: Sylwester Nawrocki @ 2014-10-27 16:47 UTC (permalink / raw)
  To: Abhilash Kesavan
  Cc: devicetree, linux-samsung-soc, Catalin Marinas, Tomasz Figa,
	Kukjin Kim, Naveen Krishna, linux-arm-kernel

Hi Abhilash,

On 24/10/14 16:32, Abhilash Kesavan wrote:
> On Wed, Oct 8, 2014 at 11:18 AM, Abhilash Kesavan
> <kesavan.abhilash@gmail.com> wrote:
>> On Tue, Oct 7, 2014 at 9:46 AM, Kukjin Kim <kgene@kernel.org> wrote:
>>> Tomasz Figa wrote:
>>>> On 30.09.2014 17:12, Abhilash Kesavan wrote:
>>>>> On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>>>>>>
>>>>>> The clock patches look good to me, but since they are doing quite a lot
>>>>>> of code moving I'd prefer to take them through clk tree. Based on the
>>>>>> fact that there are no code dependencies between clock patches and
>>>>>> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
>>>>>> apply them to my tree if nobody minds.
>>>>>
>>>>> Will you be picking up the clock changes soon ?
>>>>
>>>> I'd like to do so. Kukjin, since clock changes are a part of this
>>>> series, might I have your Ack for them to be applied separately?
>>>>
>>> Sure, I'm fine so please go ahead with my ack on the changes.
>>>
>>> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>>>
>>> Thanks for your asking.
>>
>> Can you please pick up the clock changes now that Kukjin has ack'ed it.
> 
> Sylwester, you mentioned in another thread that Tomasz might not be
> available for the next few days. Could you please consider applying
> the clock changes in this series to samsung clk-next if they look OK ?
> 
> Please take a look at clock changes at
> http://www.spinics.net/lists/arm-kernel/msg370673.html too.

I've picked up patches from the $subject series.  But please see my
comment the the second series you've pointed out with the link above.
If you decide to rearrange changes to exynos7-clk.h header file among
those two series I will drop that 4 patches.  Perhaps you could gather
all pending exynos7 clk patches, fix any issues and send to me in one
series ?
I'd like to avoid modifying indices assigned to specific clocks in
subsequent patches, DT binding should be defined in advance and ideally
be specifying exact indices for each possible clock.

--
Thanks,
Sylwester

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-10-27 16:47               ` Sylwester Nawrocki
  0 siblings, 0 replies; 48+ messages in thread
From: Sylwester Nawrocki @ 2014-10-27 16:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Abhilash,

On 24/10/14 16:32, Abhilash Kesavan wrote:
> On Wed, Oct 8, 2014 at 11:18 AM, Abhilash Kesavan
> <kesavan.abhilash@gmail.com> wrote:
>> On Tue, Oct 7, 2014 at 9:46 AM, Kukjin Kim <kgene@kernel.org> wrote:
>>> Tomasz Figa wrote:
>>>> On 30.09.2014 17:12, Abhilash Kesavan wrote:
>>>>> On Mon, Sep 22, 2014 at 2:22 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>>>>>>
>>>>>> The clock patches look good to me, but since they are doing quite a lot
>>>>>> of code moving I'd prefer to take them through clk tree. Based on the
>>>>>> fact that there are no code dependencies between clock patches and
>>>>>> remaining ones and Exynos7 is a new material for 3.18, I'm inclined to
>>>>>> apply them to my tree if nobody minds.
>>>>>
>>>>> Will you be picking up the clock changes soon ?
>>>>
>>>> I'd like to do so. Kukjin, since clock changes are a part of this
>>>> series, might I have your Ack for them to be applied separately?
>>>>
>>> Sure, I'm fine so please go ahead with my ack on the changes.
>>>
>>> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>>>
>>> Thanks for your asking.
>>
>> Can you please pick up the clock changes now that Kukjin has ack'ed it.
> 
> Sylwester, you mentioned in another thread that Tomasz might not be
> available for the next few days. Could you please consider applying
> the clock changes in this series to samsung clk-next if they look OK ?
> 
> Please take a look at clock changes at
> http://www.spinics.net/lists/arm-kernel/msg370673.html too.

I've picked up patches from the $subject series.  But please see my
comment the the second series you've pointed out with the link above.
If you decide to rearrange changes to exynos7-clk.h header file among
those two series I will drop that 4 patches.  Perhaps you could gather
all pending exynos7 clk patches, fix any issues and send to me in one
series ?
I'd like to avoid modifying indices assigned to specific clocks in
subsequent patches, DT binding should be defined in advance and ideally
be specifying exact indices for each possible clock.

--
Thanks,
Sylwester

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-22  4:34 ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:34 UTC (permalink / raw)
  To: linux-samsung-soc, linux-arm-kernel, devicetree, catalin.marinas
  Cc: tomasz.figa, naveenkrishna.ch, kesavan.abhilash

Changes since v4:
- Fixed comments from Tomasz Figa:
	- Changed the namespace prefix from exynos to samsung
	- Defined bindings to take all input clocks
	- Sorted the Kconfig entries alphabetically in clock Makefile
	- Used consistent 1 tab line breaks across the clock file
	- Statically initialized the samsung_cmu_info struct
- Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
- Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.

Changes since v3:
- Removed aliases for serial controllers from dtsi file and moved it
  into board specific dts file as suggested by Arnd.
- Based this series on Robert Richter's patches for adding vendor
  device tree sub-directories for arm64.
  http://comments.gmane.org/gmane.linux.kbuild.devel/12131

This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
processor.

The following patches are tested based on linux-next tree (20140919).
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/

Following patches are required for this series:
1- "tty/serial: fix config dependencies for samsung serial"
   https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset 
   http://comments.gmane.org/gmane.linux.kbuild.devel/12131

Alim Akhtar (2):
  arm64: exynos7: Enable ARMv8 based Exynos7 (SoC) support
  arm64: Enable Exynos7 SOC in the defconfig

Naveen Krishna Chatradhi (5):
  clk: samsung: add support for 145xx and 1460x PLLs
  clk: samsung: Factor out the common code to clk.c
  clk: samsung: Add fixed_factor_clocks field to struct exynos_cmu_info
  clk: samsung: add initial clock support for Exynos7 SoC
  arm64: dts: Add initial device tree support for EXYNOS7

Pankaj Dubey (1):
  arm64: dts: add <dt-bindings/> symlink

 .../devicetree/bindings/clock/exynos7-clock.txt    |  67 ++++
 arch/arm64/Kconfig                                 |  12 +
 arch/arm64/boot/dts/Makefile                       |   1 +
 arch/arm64/boot/dts/exynos/Makefile                |   5 +
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts    |  39 ++
 arch/arm64/boot/dts/exynos/exynos7.dtsi            | 183 +++++++++
 arch/arm64/boot/dts/include/dt-bindings            |   1 +
 arch/arm64/configs/defconfig                       |   4 +
 drivers/clk/samsung/Makefile                       |   1 +
 drivers/clk/samsung/clk-exynos5260.c               | 185 ++-------
 drivers/clk/samsung/clk-exynos7.c                  | 425 +++++++++++++++++++++
 drivers/clk/samsung/clk-pll.c                      |  25 +-
 drivers/clk/samsung/clk-pll.h                      |   4 +
 drivers/clk/samsung/clk.c                          |  98 +++++
 drivers/clk/samsung/clk.h                          |  37 ++
 include/dt-bindings/clock/exynos7-clk.h            |  49 +++
 16 files changed, 972 insertions(+), 164 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/exynos7-clock.txt
 create mode 100644 arch/arm64/boot/dts/exynos/Makefile
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7-espresso.dts
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7.dtsi
 create mode 120000 arch/arm64/boot/dts/include/dt-bindings
 create mode 100644 drivers/clk/samsung/clk-exynos7.c
 create mode 100644 include/dt-bindings/clock/exynos7-clk.h

-- 
2.1.0

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

* [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC
@ 2014-09-22  4:34 ` Abhilash Kesavan
  0 siblings, 0 replies; 48+ messages in thread
From: Abhilash Kesavan @ 2014-09-22  4:34 UTC (permalink / raw)
  To: linux-arm-kernel

Changes since v4:
- Fixed comments from Tomasz Figa:
	- Changed the namespace prefix from exynos to samsung
	- Defined bindings to take all input clocks
	- Sorted the Kconfig entries alphabetically in clock Makefile
	- Used consistent 1 tab line breaks across the clock file
	- Statically initialized the samsung_cmu_info struct
- Enabled exynos7 in the arm64 defconfig as per Catalin Marinas' comment.
- Added Kukjin Kim's ack along with Thomas Abraham's tested and reviewed tags.

Changes since v3:
- Removed aliases for serial controllers from dtsi file and moved it
  into board specific dts file as suggested by Arnd.
- Based this series on Robert Richter's patches for adding vendor
  device tree sub-directories for arm64.
  http://comments.gmane.org/gmane.linux.kbuild.devel/12131

This patchset supports the new Exynos7 Samsung SoC based on Cortex-A57.
Exynos7 is a System-On-Chip (SoC) that is based on 64-bit ARMv8 RISC
processor.

The following patches are tested based on linux-next tree (20140919).
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/

Following patches are required for this series:
1- "tty/serial: fix config dependencies for samsung serial"
   https://www.mail-archive.com/linux-samsung-soc <at> vger.kernel.org/msg36208.html
2- "dts, kbuild: Implement support for dtb vendor subdirs" patchset 
   http://comments.gmane.org/gmane.linux.kbuild.devel/12131

Alim Akhtar (2):
  arm64: exynos7: Enable ARMv8 based Exynos7 (SoC) support
  arm64: Enable Exynos7 SOC in the defconfig

Naveen Krishna Chatradhi (5):
  clk: samsung: add support for 145xx and 1460x PLLs
  clk: samsung: Factor out the common code to clk.c
  clk: samsung: Add fixed_factor_clocks field to struct exynos_cmu_info
  clk: samsung: add initial clock support for Exynos7 SoC
  arm64: dts: Add initial device tree support for EXYNOS7

Pankaj Dubey (1):
  arm64: dts: add <dt-bindings/> symlink

 .../devicetree/bindings/clock/exynos7-clock.txt    |  67 ++++
 arch/arm64/Kconfig                                 |  12 +
 arch/arm64/boot/dts/Makefile                       |   1 +
 arch/arm64/boot/dts/exynos/Makefile                |   5 +
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts    |  39 ++
 arch/arm64/boot/dts/exynos/exynos7.dtsi            | 183 +++++++++
 arch/arm64/boot/dts/include/dt-bindings            |   1 +
 arch/arm64/configs/defconfig                       |   4 +
 drivers/clk/samsung/Makefile                       |   1 +
 drivers/clk/samsung/clk-exynos5260.c               | 185 ++-------
 drivers/clk/samsung/clk-exynos7.c                  | 425 +++++++++++++++++++++
 drivers/clk/samsung/clk-pll.c                      |  25 +-
 drivers/clk/samsung/clk-pll.h                      |   4 +
 drivers/clk/samsung/clk.c                          |  98 +++++
 drivers/clk/samsung/clk.h                          |  37 ++
 include/dt-bindings/clock/exynos7-clk.h            |  49 +++
 16 files changed, 972 insertions(+), 164 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/exynos7-clock.txt
 create mode 100644 arch/arm64/boot/dts/exynos/Makefile
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7-espresso.dts
 create mode 100644 arch/arm64/boot/dts/exynos/exynos7.dtsi
 create mode 120000 arch/arm64/boot/dts/include/dt-bindings
 create mode 100644 drivers/clk/samsung/clk-exynos7.c
 create mode 100644 include/dt-bindings/clock/exynos7-clk.h

-- 
2.1.0

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

end of thread, other threads:[~2014-10-27 16:47 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-22  4:47 [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC Abhilash Kesavan
2014-09-22  4:47 ` Abhilash Kesavan
2014-09-22  4:47 ` [PATCH v5 1/8] clk: samsung: add support for 145xx and 1460x PLLs Abhilash Kesavan
2014-09-22  4:47   ` Abhilash Kesavan
2014-09-22  4:47 ` [PATCH v5 2/8] clk: samsung: Factor out the common code to clk.c Abhilash Kesavan
2014-09-22  4:47   ` Abhilash Kesavan
2014-09-22  4:47 ` [PATCH v5 3/8] clk: samsung: Add fixed_factor_clocks field to struct exynos_cmu_info Abhilash Kesavan
2014-09-22  4:47   ` Abhilash Kesavan
2014-09-22  4:47 ` [PATCH v5 4/8] clk: samsung: add initial clock support for Exynos7 SoC Abhilash Kesavan
2014-09-22  4:47   ` Abhilash Kesavan
2014-09-22  4:47 ` [PATCH v5 5/8] arm64: dts: Add initial device tree support for EXYNOS7 Abhilash Kesavan
2014-09-22  4:47   ` Abhilash Kesavan
2014-09-22  4:47 ` [PATCH v5 6/8] arm64: exynos7: Enable ARMv8 based Exynos7 (SoC) support Abhilash Kesavan
2014-09-22  4:47   ` Abhilash Kesavan
2014-09-22  4:47 ` [PATCH v5 7/8] arm64: Enable Exynos7 SOC in the defconfig Abhilash Kesavan
2014-09-22  4:47   ` Abhilash Kesavan
2014-09-22  4:47 ` [PATCH v5 8/8] arm64: dts: add <dt-bindings/> symlink Abhilash Kesavan
2014-09-22  4:47   ` Abhilash Kesavan
2014-09-23  7:46   ` Chanho Park
2014-09-23  7:46     ` Chanho Park
2014-09-23  8:54     ` Abhilash Kesavan
2014-09-23  8:54       ` Abhilash Kesavan
2014-09-22  8:52 ` [PATCH v5 0/8] arch: arm64: Enable support for Samsung Exynos7 SoC Tomasz Figa
2014-09-22  8:52   ` Tomasz Figa
2014-09-30 15:12   ` Abhilash Kesavan
2014-09-30 15:12     ` Abhilash Kesavan
2014-09-30 15:56     ` Tomasz Figa
2014-09-30 15:56       ` Tomasz Figa
2014-10-07  4:16       ` Kukjin Kim
2014-10-07  4:16         ` Kukjin Kim
2014-10-08  5:48         ` Abhilash Kesavan
2014-10-08  5:48           ` Abhilash Kesavan
2014-10-24 14:32           ` Abhilash Kesavan
2014-10-24 14:32             ` Abhilash Kesavan
2014-10-27 16:47             ` Sylwester Nawrocki
2014-10-27 16:47               ` Sylwester Nawrocki
2014-09-23  7:50 ` Chanho Park
2014-09-23  7:50   ` Chanho Park
2014-09-23  8:48   ` Abhilash Kesavan
2014-09-23  8:48     ` Abhilash Kesavan
2014-09-30 15:15     ` Abhilash Kesavan
2014-09-30 15:15       ` Abhilash Kesavan
2014-09-30 15:50       ` Catalin Marinas
2014-09-30 15:50         ` Catalin Marinas
2014-10-08  5:46         ` Abhilash Kesavan
2014-10-08  5:46           ` Abhilash Kesavan
  -- strict thread matches above, loose matches on Subject: below --
2014-09-22  4:34 Abhilash Kesavan
2014-09-22  4:34 ` Abhilash Kesavan

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.