All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/5] clk-fch: Add support for newer family of AMD's SOC
@ 2021-12-12 18:05 Ajit Kumar Pandey
  2021-12-12 18:05 ` [PATCH v5 1/5] x86: clk: " Ajit Kumar Pandey
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Ajit Kumar Pandey @ 2021-12-12 18:05 UTC (permalink / raw)
  To: sboyd, linux-clk
  Cc: Vijendar.Mukunda, Alexander.Deucher, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, Mario.Limonciello, Ajit Kumar Pandey

changes since v4:
- PATCH 1/5: Revert pci id check with default support for newer ASIC
- Drop [PATCH 6/7] and [PATCH 7/7] as not required with newer logic   

Ajit Kumar Pandey (5):
  x86: clk: clk-fch: Add support for newer family of AMD's SOC
  drivers: acpi: acpi_apd: Remove unused device property "is-rv"
  ACPI: APD: Add a fmw property clk-name
  clk: x86: Use dynamic con_id string during clk registration
  clk: x86: Fix clk_gate_flags for RV_CLK_GATE

 drivers/acpi/acpi_apd.c               | 11 ++++--
 drivers/clk/x86/clk-fch.c             | 48 +++++++++++++++++++--------
 include/linux/platform_data/clk-fch.h |  2 +-
 3 files changed, 44 insertions(+), 17 deletions(-)

-- 
2.25.1


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

* [PATCH v5 1/5] x86: clk: clk-fch: Add support for newer family of AMD's SOC
  2021-12-12 18:05 [PATCH v5 0/5] clk-fch: Add support for newer family of AMD's SOC Ajit Kumar Pandey
@ 2021-12-12 18:05 ` Ajit Kumar Pandey
  2022-01-07  1:58   ` Stephen Boyd
  2021-12-12 18:05 ` [PATCH v5 2/5] drivers: acpi: acpi_apd: Remove unused device property "is-rv" Ajit Kumar Pandey
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Ajit Kumar Pandey @ 2021-12-12 18:05 UTC (permalink / raw)
  To: sboyd, linux-clk
  Cc: Vijendar.Mukunda, Alexander.Deucher, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, Mario.Limonciello, Ajit Kumar Pandey,
	Michael Turquette, open list

FCH controller clock configuration slightly differs across AMD's
SOC architectures. Newer family of SOC only support a 48MHz fix
clock while stoney SOC family has a clk_mux to choose 48MHz and
25 MHz clk. At present fixed clk support is only enabled for RV
architecture using "is-rv" device property initialized from boot
loader. This limit 48MHz fixed clock gate support to RV platform
unless we add similar device property in boot loader for other
architectures.

Add pci_device_id table with Stoney platform id and replace "is-rv"
device property check with pci id match to add clk mux support with
25MHz and 48MHz clk support based on clk mux selection. This enable
48Mhz fixed fch clock support by default on all newer SOC's except
stoney. Also replace RV with FIXED as a generic naming conventions
across all platforms and changed module description.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
---
 drivers/clk/x86/clk-fch.c | 42 +++++++++++++++++++++++++++++----------
 1 file changed, 31 insertions(+), 11 deletions(-)

diff --git a/drivers/clk/x86/clk-fch.c b/drivers/clk/x86/clk-fch.c
index 8f7c5142b0f0..6a726420bfcb 100644
--- a/drivers/clk/x86/clk-fch.c
+++ b/drivers/clk/x86/clk-fch.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 /*
- * clock framework for AMD Stoney based clocks
+ * clock framework for AMD FCH controller block
  *
  * Copyright 2018 Advanced Micro Devices, Inc.
  */
@@ -8,6 +8,7 @@
 #include <linux/clk.h>
 #include <linux/clkdev.h>
 #include <linux/clk-provider.h>
+#include <linux/pci.h>
 #include <linux/platform_data/clk-fch.h>
 #include <linux/platform_device.h>
 
@@ -26,22 +27,37 @@
 #define ST_CLK_GATE	3
 #define ST_MAX_CLKS	4
 
-#define RV_CLK_48M	0
-#define RV_CLK_GATE	1
-#define RV_MAX_CLKS	2
+#define CLK_48M_FIXED	0
+#define CLK_GATE_FIXED	1
+#define CLK_MAX_FIXED	2
+
+/* List of supported CPU ids for clk mux with 25Mhz clk support */
+#define AMD_CPU_ID_ST                  0x1576
 
 static const char * const clk_oscout1_parents[] = { "clk48MHz", "clk25MHz" };
 static struct clk_hw *hws[ST_MAX_CLKS];
 
+static const struct pci_device_id fch_pci_ids[] = {
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_ST) },
+	{ }
+};
+
 static int fch_clk_probe(struct platform_device *pdev)
 {
 	struct fch_clk_data *fch_data;
+	struct pci_dev *rdev;
 
 	fch_data = dev_get_platdata(&pdev->dev);
 	if (!fch_data || !fch_data->base)
 		return -EINVAL;
 
-	if (!fch_data->is_rv) {
+	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
+	if (!rdev) {
+		dev_err(&pdev->dev, "FCH device not found\n");
+		return -ENODEV;
+	}
+
+	if (pci_match_id(fch_pci_ids, rdev)) {
 		hws[ST_CLK_48M] = clk_hw_register_fixed_rate(NULL, "clk48MHz",
 			NULL, 0, 48000000);
 		hws[ST_CLK_25M] = clk_hw_register_fixed_rate(NULL, "clk25MHz",
@@ -61,32 +77,36 @@ static int fch_clk_probe(struct platform_device *pdev)
 		devm_clk_hw_register_clkdev(&pdev->dev, hws[ST_CLK_GATE],
 			"oscout1", NULL);
 	} else {
-		hws[RV_CLK_48M] = clk_hw_register_fixed_rate(NULL, "clk48MHz",
+		hws[CLK_48M_FIXED] = clk_hw_register_fixed_rate(NULL, "clk48MHz",
 			NULL, 0, 48000000);
 
-		hws[RV_CLK_GATE] = clk_hw_register_gate(NULL, "oscout1",
+		hws[CLK_GATE_FIXED] = clk_hw_register_gate(NULL, "oscout1",
 			"clk48MHz", 0, fch_data->base + MISCCLKCNTL1,
 			OSCCLKENB, CLK_GATE_SET_TO_DISABLE, NULL);
 
-		devm_clk_hw_register_clkdev(&pdev->dev, hws[RV_CLK_GATE],
+		devm_clk_hw_register_clkdev(&pdev->dev, hws[CLK_GATE_FIXED],
 			"oscout1", NULL);
 	}
 
+	pci_dev_put(rdev);
 	return 0;
 }
 
 static int fch_clk_remove(struct platform_device *pdev)
 {
 	int i, clks;
-	struct fch_clk_data *fch_data;
+	struct pci_dev *rdev;
 
-	fch_data = dev_get_platdata(&pdev->dev);
+	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
+	if (!rdev)
+		return -ENODEV;
 
-	clks = fch_data->is_rv ? RV_MAX_CLKS : ST_MAX_CLKS;
+	clks = pci_match_id(fch_pci_ids, rdev) ? CLK_MAX_FIXED : ST_MAX_CLKS;
 
 	for (i = 0; i < clks; i++)
 		clk_hw_unregister(hws[i]);
 
+	pci_dev_put(rdev);
 	return 0;
 }
 
-- 
2.25.1


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

* [PATCH v5 2/5] drivers: acpi: acpi_apd: Remove unused device property "is-rv"
  2021-12-12 18:05 [PATCH v5 0/5] clk-fch: Add support for newer family of AMD's SOC Ajit Kumar Pandey
  2021-12-12 18:05 ` [PATCH v5 1/5] x86: clk: " Ajit Kumar Pandey
@ 2021-12-12 18:05 ` Ajit Kumar Pandey
  2021-12-17 18:06   ` Rafael J. Wysocki
  2021-12-12 18:05 ` [PATCH v5 3/5] ACPI: APD: Add a fmw property clk-name Ajit Kumar Pandey
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Ajit Kumar Pandey @ 2021-12-12 18:05 UTC (permalink / raw)
  To: sboyd, linux-clk
  Cc: Vijendar.Mukunda, Alexander.Deucher, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, Mario.Limonciello, Ajit Kumar Pandey,
	Rafael J. Wysocki, Len Brown, open list:ACPI, open list

Initially "is-rv" device property is added for 48MHz fixed clock
support on Raven or RV architecture. It's unused now as we moved
to pci device_id based selection to extend such support on other
architectures. This change removed unused code from acpi driver.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
---
 drivers/acpi/acpi_apd.c               | 3 ---
 include/linux/platform_data/clk-fch.h | 1 -
 2 files changed, 4 deletions(-)

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 6e02448d15d9..6913e9712852 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -87,9 +87,6 @@ static int fch_misc_setup(struct apd_private_data *pdata)
 	if (ret < 0)
 		return -ENOENT;
 
-	if (!acpi_dev_get_property(adev, "is-rv", ACPI_TYPE_INTEGER, &obj))
-		clk_data->is_rv = obj->integer.value;
-
 	list_for_each_entry(rentry, &resource_list, node) {
 		clk_data->base = devm_ioremap(&adev->dev, rentry->res->start,
 					      resource_size(rentry->res));
diff --git a/include/linux/platform_data/clk-fch.h b/include/linux/platform_data/clk-fch.h
index b9f682459f08..850ca776156d 100644
--- a/include/linux/platform_data/clk-fch.h
+++ b/include/linux/platform_data/clk-fch.h
@@ -12,7 +12,6 @@
 
 struct fch_clk_data {
 	void __iomem *base;
-	u32 is_rv;
 };
 
 #endif /* __CLK_FCH_H */
-- 
2.25.1


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

* [PATCH v5 3/5] ACPI: APD: Add a fmw property clk-name
  2021-12-12 18:05 [PATCH v5 0/5] clk-fch: Add support for newer family of AMD's SOC Ajit Kumar Pandey
  2021-12-12 18:05 ` [PATCH v5 1/5] x86: clk: " Ajit Kumar Pandey
  2021-12-12 18:05 ` [PATCH v5 2/5] drivers: acpi: acpi_apd: Remove unused device property "is-rv" Ajit Kumar Pandey
@ 2021-12-12 18:05 ` Ajit Kumar Pandey
  2021-12-12 18:05 ` [PATCH v5 4/5] clk: x86: Use dynamic con_id string during clk registration Ajit Kumar Pandey
  2021-12-12 18:05 ` [PATCH v5 5/5] clk: x86: Fix clk_gate_flags for RV_CLK_GATE Ajit Kumar Pandey
  4 siblings, 0 replies; 12+ messages in thread
From: Ajit Kumar Pandey @ 2021-12-12 18:05 UTC (permalink / raw)
  To: sboyd, linux-clk
  Cc: Vijendar.Mukunda, Alexander.Deucher, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, Mario.Limonciello, Ajit Kumar Pandey,
	Rafael J. Wysocki, Len Brown, open list:ACPI, open list

Add a new device property to fetch clk-name from firmware.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
---
 drivers/acpi/acpi_apd.c               | 10 ++++++++++
 include/linux/platform_data/clk-fch.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 6913e9712852..2b958b426b03 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -87,6 +87,16 @@ static int fch_misc_setup(struct apd_private_data *pdata)
 	if (ret < 0)
 		return -ENOENT;
 
+	if (!acpi_dev_get_property(adev, "clk-name", ACPI_TYPE_STRING, &obj)) {
+		clk_data->name = devm_kzalloc(&adev->dev, obj->string.length,
+					      GFP_KERNEL);
+
+		strcpy(clk_data->name, obj->string.pointer);
+	} else {
+		/* Set default name to mclk if entry missing in firmware */
+		clk_data->name = "mclk";
+	}
+
 	list_for_each_entry(rentry, &resource_list, node) {
 		clk_data->base = devm_ioremap(&adev->dev, rentry->res->start,
 					      resource_size(rentry->res));
diff --git a/include/linux/platform_data/clk-fch.h b/include/linux/platform_data/clk-fch.h
index 850ca776156d..11a2a23fd9b2 100644
--- a/include/linux/platform_data/clk-fch.h
+++ b/include/linux/platform_data/clk-fch.h
@@ -12,6 +12,7 @@
 
 struct fch_clk_data {
 	void __iomem *base;
+	char *name;
 };
 
 #endif /* __CLK_FCH_H */
-- 
2.25.1


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

* [PATCH v5 4/5] clk: x86: Use dynamic con_id string during clk registration
  2021-12-12 18:05 [PATCH v5 0/5] clk-fch: Add support for newer family of AMD's SOC Ajit Kumar Pandey
                   ` (2 preceding siblings ...)
  2021-12-12 18:05 ` [PATCH v5 3/5] ACPI: APD: Add a fmw property clk-name Ajit Kumar Pandey
@ 2021-12-12 18:05 ` Ajit Kumar Pandey
  2022-01-07  1:59   ` Stephen Boyd
  2021-12-12 18:05 ` [PATCH v5 5/5] clk: x86: Fix clk_gate_flags for RV_CLK_GATE Ajit Kumar Pandey
  4 siblings, 1 reply; 12+ messages in thread
From: Ajit Kumar Pandey @ 2021-12-12 18:05 UTC (permalink / raw)
  To: sboyd, linux-clk
  Cc: Vijendar.Mukunda, Alexander.Deucher, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, Mario.Limonciello, Ajit Kumar Pandey,
	Michael Turquette, open list

Replace hard coded con_id string with fch_data->name. We have clk
consumers looking up with different clock names, hence use dynamic
con_id string during clk lookup registration. fch_data->name will
be initialized in acpi driver based on fmw property value.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
---
 drivers/clk/x86/clk-fch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/x86/clk-fch.c b/drivers/clk/x86/clk-fch.c
index 6a726420bfcb..d41d519b9c2b 100644
--- a/drivers/clk/x86/clk-fch.c
+++ b/drivers/clk/x86/clk-fch.c
@@ -75,7 +75,7 @@ static int fch_clk_probe(struct platform_device *pdev)
 			OSCCLKENB, CLK_GATE_SET_TO_DISABLE, NULL);
 
 		devm_clk_hw_register_clkdev(&pdev->dev, hws[ST_CLK_GATE],
-			"oscout1", NULL);
+					    fch_data->name, NULL);
 	} else {
 		hws[CLK_48M_FIXED] = clk_hw_register_fixed_rate(NULL, "clk48MHz",
 			NULL, 0, 48000000);
@@ -85,7 +85,7 @@ static int fch_clk_probe(struct platform_device *pdev)
 			OSCCLKENB, CLK_GATE_SET_TO_DISABLE, NULL);
 
 		devm_clk_hw_register_clkdev(&pdev->dev, hws[CLK_GATE_FIXED],
-			"oscout1", NULL);
+					    fch_data->name, NULL);
 	}
 
 	pci_dev_put(rdev);
-- 
2.25.1


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

* [PATCH v5 5/5] clk: x86: Fix clk_gate_flags for RV_CLK_GATE
  2021-12-12 18:05 [PATCH v5 0/5] clk-fch: Add support for newer family of AMD's SOC Ajit Kumar Pandey
                   ` (3 preceding siblings ...)
  2021-12-12 18:05 ` [PATCH v5 4/5] clk: x86: Use dynamic con_id string during clk registration Ajit Kumar Pandey
@ 2021-12-12 18:05 ` Ajit Kumar Pandey
  2022-01-07  1:59   ` Stephen Boyd
  4 siblings, 1 reply; 12+ messages in thread
From: Ajit Kumar Pandey @ 2021-12-12 18:05 UTC (permalink / raw)
  To: sboyd, linux-clk
  Cc: Vijendar.Mukunda, Alexander.Deucher, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, Mario.Limonciello, Ajit Kumar Pandey,
	Michael Turquette, open list

In newer SoC we have to clear bit for disabling 48MHz oscillator
clock gate. Remove CLK_GATE_SET_TO_DISABLE flag for proper enable
and disable of 48MHz clock.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
---
 drivers/clk/x86/clk-fch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/x86/clk-fch.c b/drivers/clk/x86/clk-fch.c
index d41d519b9c2b..fdc060e75839 100644
--- a/drivers/clk/x86/clk-fch.c
+++ b/drivers/clk/x86/clk-fch.c
@@ -82,7 +82,7 @@ static int fch_clk_probe(struct platform_device *pdev)
 
 		hws[CLK_GATE_FIXED] = clk_hw_register_gate(NULL, "oscout1",
 			"clk48MHz", 0, fch_data->base + MISCCLKCNTL1,
-			OSCCLKENB, CLK_GATE_SET_TO_DISABLE, NULL);
+			OSCCLKENB, 0, NULL);
 
 		devm_clk_hw_register_clkdev(&pdev->dev, hws[CLK_GATE_FIXED],
 					    fch_data->name, NULL);
-- 
2.25.1


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

* Re: [PATCH v5 2/5] drivers: acpi: acpi_apd: Remove unused device property "is-rv"
  2021-12-12 18:05 ` [PATCH v5 2/5] drivers: acpi: acpi_apd: Remove unused device property "is-rv" Ajit Kumar Pandey
@ 2021-12-17 18:06   ` Rafael J. Wysocki
  2021-12-17 18:19     ` Limonciello, Mario
  0 siblings, 1 reply; 12+ messages in thread
From: Rafael J. Wysocki @ 2021-12-17 18:06 UTC (permalink / raw)
  To: Ajit Kumar Pandey
  Cc: Stephen Boyd, linux-clk, Vijendar.Mukunda, Alex Deucher,
	Basavaraj.Hiregoudar, Sunil-kumar.Dommati, Mario Limonciello,
	Rafael J. Wysocki, Len Brown, open list:ACPI, open list

On Sun, Dec 12, 2021 at 7:06 PM Ajit Kumar Pandey
<AjitKumar.Pandey@amd.com> wrote:
>
> Initially "is-rv" device property is added for 48MHz fixed clock
> support on Raven or RV architecture. It's unused now as we moved
> to pci device_id based selection to extend such support on other
> architectures. This change removed unused code from acpi driver.
>
> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
> Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>

Does this or the next patch depend on the rest of the series, or can I
simply apply them both?

> ---
>  drivers/acpi/acpi_apd.c               | 3 ---
>  include/linux/platform_data/clk-fch.h | 1 -
>  2 files changed, 4 deletions(-)
>
> diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
> index 6e02448d15d9..6913e9712852 100644
> --- a/drivers/acpi/acpi_apd.c
> +++ b/drivers/acpi/acpi_apd.c
> @@ -87,9 +87,6 @@ static int fch_misc_setup(struct apd_private_data *pdata)
>         if (ret < 0)
>                 return -ENOENT;
>
> -       if (!acpi_dev_get_property(adev, "is-rv", ACPI_TYPE_INTEGER, &obj))
> -               clk_data->is_rv = obj->integer.value;
> -
>         list_for_each_entry(rentry, &resource_list, node) {
>                 clk_data->base = devm_ioremap(&adev->dev, rentry->res->start,
>                                               resource_size(rentry->res));
> diff --git a/include/linux/platform_data/clk-fch.h b/include/linux/platform_data/clk-fch.h
> index b9f682459f08..850ca776156d 100644
> --- a/include/linux/platform_data/clk-fch.h
> +++ b/include/linux/platform_data/clk-fch.h
> @@ -12,7 +12,6 @@
>
>  struct fch_clk_data {
>         void __iomem *base;
> -       u32 is_rv;
>  };
>
>  #endif /* __CLK_FCH_H */
> --
> 2.25.1
>

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

* RE: [PATCH v5 2/5] drivers: acpi: acpi_apd: Remove unused device property "is-rv"
  2021-12-17 18:06   ` Rafael J. Wysocki
@ 2021-12-17 18:19     ` Limonciello, Mario
  2021-12-17 18:23       ` Rafael J. Wysocki
  0 siblings, 1 reply; 12+ messages in thread
From: Limonciello, Mario @ 2021-12-17 18:19 UTC (permalink / raw)
  To: Rafael J. Wysocki, Pandey, Ajit Kumar
  Cc: Stephen Boyd, linux-clk, Mukunda, Vijendar, Deucher, Alexander,
	Hiregoudar, Basavaraj, Dommati, Sunil-kumar, Len Brown,
	open list:ACPI, open list

[Public]

> -----Original Message-----
> From: Rafael J. Wysocki <rafael@kernel.org>
> Sent: Friday, December 17, 2021 12:07
> To: Pandey, Ajit Kumar <AjitKumar.Pandey@amd.com>
> Cc: Stephen Boyd <sboyd@kernel.org>; linux-clk <linux-clk@vger.kernel.org>;
> Mukunda, Vijendar <Vijendar.Mukunda@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Hiregoudar, Basavaraj
> <Basavaraj.Hiregoudar@amd.com>; Dommati, Sunil-kumar <Sunil-
> kumar.Dommati@amd.com>; Limonciello, Mario
> <Mario.Limonciello@amd.com>; Rafael J. Wysocki <rafael@kernel.org>; Len
> Brown <lenb@kernel.org>; open list:ACPI <linux-acpi@vger.kernel.org>; open
> list <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH v5 2/5] drivers: acpi: acpi_apd: Remove unused device
> property "is-rv"
> 
> On Sun, Dec 12, 2021 at 7:06 PM Ajit Kumar Pandey
> <AjitKumar.Pandey@amd.com> wrote:
> >
> > Initially "is-rv" device property is added for 48MHz fixed clock
> > support on Raven or RV architecture. It's unused now as we moved
> > to pci device_id based selection to extend such support on other
> > architectures. This change removed unused code from acpi driver.
> >
> > Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
> > Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
> 
> Does this or the next patch depend on the rest of the series, or can I
> simply apply them both?

There are (intentional) dependencies within this series on the order.  It
would be better for the whole series to come through one tree.

> 
> > ---
> >  drivers/acpi/acpi_apd.c               | 3 ---
> >  include/linux/platform_data/clk-fch.h | 1 -
> >  2 files changed, 4 deletions(-)
> >
> > diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
> > index 6e02448d15d9..6913e9712852 100644
> > --- a/drivers/acpi/acpi_apd.c
> > +++ b/drivers/acpi/acpi_apd.c
> > @@ -87,9 +87,6 @@ static int fch_misc_setup(struct apd_private_data
> *pdata)
> >         if (ret < 0)
> >                 return -ENOENT;
> >
> > -       if (!acpi_dev_get_property(adev, "is-rv", ACPI_TYPE_INTEGER, &obj))
> > -               clk_data->is_rv = obj->integer.value;
> > -
> >         list_for_each_entry(rentry, &resource_list, node) {
> >                 clk_data->base = devm_ioremap(&adev->dev, rentry->res->start,
> >                                               resource_size(rentry->res));
> > diff --git a/include/linux/platform_data/clk-fch.h
> b/include/linux/platform_data/clk-fch.h
> > index b9f682459f08..850ca776156d 100644
> > --- a/include/linux/platform_data/clk-fch.h
> > +++ b/include/linux/platform_data/clk-fch.h
> > @@ -12,7 +12,6 @@
> >
> >  struct fch_clk_data {
> >         void __iomem *base;
> > -       u32 is_rv;
> >  };
> >
> >  #endif /* __CLK_FCH_H */
> > --
> > 2.25.1
> >

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

* Re: [PATCH v5 2/5] drivers: acpi: acpi_apd: Remove unused device property "is-rv"
  2021-12-17 18:19     ` Limonciello, Mario
@ 2021-12-17 18:23       ` Rafael J. Wysocki
  0 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2021-12-17 18:23 UTC (permalink / raw)
  To: Limonciello, Mario
  Cc: Rafael J. Wysocki, Pandey, Ajit Kumar, Stephen Boyd, linux-clk,
	Mukunda, Vijendar, Deucher, Alexander, Hiregoudar, Basavaraj,
	Dommati, Sunil-kumar, Len Brown, open list:ACPI, open list

On Fri, Dec 17, 2021 at 7:19 PM Limonciello, Mario
<Mario.Limonciello@amd.com> wrote:
>
> [Public]
>
> > -----Original Message-----
> > From: Rafael J. Wysocki <rafael@kernel.org>
> > Sent: Friday, December 17, 2021 12:07
> > To: Pandey, Ajit Kumar <AjitKumar.Pandey@amd.com>
> > Cc: Stephen Boyd <sboyd@kernel.org>; linux-clk <linux-clk@vger.kernel.org>;
> > Mukunda, Vijendar <Vijendar.Mukunda@amd.com>; Deucher, Alexander
> > <Alexander.Deucher@amd.com>; Hiregoudar, Basavaraj
> > <Basavaraj.Hiregoudar@amd.com>; Dommati, Sunil-kumar <Sunil-
> > kumar.Dommati@amd.com>; Limonciello, Mario
> > <Mario.Limonciello@amd.com>; Rafael J. Wysocki <rafael@kernel.org>; Len
> > Brown <lenb@kernel.org>; open list:ACPI <linux-acpi@vger.kernel.org>; open
> > list <linux-kernel@vger.kernel.org>
> > Subject: Re: [PATCH v5 2/5] drivers: acpi: acpi_apd: Remove unused device
> > property "is-rv"
> >
> > On Sun, Dec 12, 2021 at 7:06 PM Ajit Kumar Pandey
> > <AjitKumar.Pandey@amd.com> wrote:
> > >
> > > Initially "is-rv" device property is added for 48MHz fixed clock
> > > support on Raven or RV architecture. It's unused now as we moved
> > > to pci device_id based selection to extend such support on other
> > > architectures. This change removed unused code from acpi driver.
> > >
> > > Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
> > > Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
> >
> > Does this or the next patch depend on the rest of the series, or can I
> > simply apply them both?
>
> There are (intentional) dependencies within this series on the order.  It
> would be better for the whole series to come through one tree.

So please route these two along with the rest of the series and I
don't think you need my ACKs for this.

>
> >
> > > ---
> > >  drivers/acpi/acpi_apd.c               | 3 ---
> > >  include/linux/platform_data/clk-fch.h | 1 -
> > >  2 files changed, 4 deletions(-)
> > >
> > > diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
> > > index 6e02448d15d9..6913e9712852 100644
> > > --- a/drivers/acpi/acpi_apd.c
> > > +++ b/drivers/acpi/acpi_apd.c
> > > @@ -87,9 +87,6 @@ static int fch_misc_setup(struct apd_private_data
> > *pdata)
> > >         if (ret < 0)
> > >                 return -ENOENT;
> > >
> > > -       if (!acpi_dev_get_property(adev, "is-rv", ACPI_TYPE_INTEGER, &obj))
> > > -               clk_data->is_rv = obj->integer.value;
> > > -
> > >         list_for_each_entry(rentry, &resource_list, node) {
> > >                 clk_data->base = devm_ioremap(&adev->dev, rentry->res->start,
> > >                                               resource_size(rentry->res));
> > > diff --git a/include/linux/platform_data/clk-fch.h
> > b/include/linux/platform_data/clk-fch.h
> > > index b9f682459f08..850ca776156d 100644
> > > --- a/include/linux/platform_data/clk-fch.h
> > > +++ b/include/linux/platform_data/clk-fch.h
> > > @@ -12,7 +12,6 @@
> > >
> > >  struct fch_clk_data {
> > >         void __iomem *base;
> > > -       u32 is_rv;
> > >  };
> > >
> > >  #endif /* __CLK_FCH_H */
> > > --
> > > 2.25.1
> > >

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

* Re: [PATCH v5 1/5] x86: clk: clk-fch: Add support for newer family of AMD's SOC
  2021-12-12 18:05 ` [PATCH v5 1/5] x86: clk: " Ajit Kumar Pandey
@ 2022-01-07  1:58   ` Stephen Boyd
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2022-01-07  1:58 UTC (permalink / raw)
  To: Ajit Kumar Pandey, linux-clk
  Cc: Vijendar.Mukunda, Alexander.Deucher, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, Mario.Limonciello, Ajit Kumar Pandey,
	Michael Turquette, open list

Quoting Ajit Kumar Pandey (2021-12-12 10:05:23)
> FCH controller clock configuration slightly differs across AMD's
> SOC architectures. Newer family of SOC only support a 48MHz fix
> clock while stoney SOC family has a clk_mux to choose 48MHz and
> 25 MHz clk. At present fixed clk support is only enabled for RV
> architecture using "is-rv" device property initialized from boot
> loader. This limit 48MHz fixed clock gate support to RV platform
> unless we add similar device property in boot loader for other
> architectures.
> 
> Add pci_device_id table with Stoney platform id and replace "is-rv"
> device property check with pci id match to add clk mux support with
> 25MHz and 48MHz clk support based on clk mux selection. This enable
> 48Mhz fixed fch clock support by default on all newer SOC's except
> stoney. Also replace RV with FIXED as a generic naming conventions
> across all platforms and changed module description.
> 
> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
> Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
> ---

Applied to clk-next

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

* Re: [PATCH v5 4/5] clk: x86: Use dynamic con_id string during clk registration
  2021-12-12 18:05 ` [PATCH v5 4/5] clk: x86: Use dynamic con_id string during clk registration Ajit Kumar Pandey
@ 2022-01-07  1:59   ` Stephen Boyd
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2022-01-07  1:59 UTC (permalink / raw)
  To: Ajit Kumar Pandey, linux-clk
  Cc: Vijendar.Mukunda, Alexander.Deucher, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, Mario.Limonciello, Ajit Kumar Pandey,
	Michael Turquette, open list

Quoting Ajit Kumar Pandey (2021-12-12 10:05:26)
> Replace hard coded con_id string with fch_data->name. We have clk
> consumers looking up with different clock names, hence use dynamic
> con_id string during clk lookup registration. fch_data->name will
> be initialized in acpi driver based on fmw property value.
> 
> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
> Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
> ---

Applied to clk-next

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

* Re: [PATCH v5 5/5] clk: x86: Fix clk_gate_flags for RV_CLK_GATE
  2021-12-12 18:05 ` [PATCH v5 5/5] clk: x86: Fix clk_gate_flags for RV_CLK_GATE Ajit Kumar Pandey
@ 2022-01-07  1:59   ` Stephen Boyd
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2022-01-07  1:59 UTC (permalink / raw)
  To: Ajit Kumar Pandey, linux-clk
  Cc: Vijendar.Mukunda, Alexander.Deucher, Basavaraj.Hiregoudar,
	Sunil-kumar.Dommati, Mario.Limonciello, Ajit Kumar Pandey,
	Michael Turquette, open list

Quoting Ajit Kumar Pandey (2021-12-12 10:05:27)
> In newer SoC we have to clear bit for disabling 48MHz oscillator
> clock gate. Remove CLK_GATE_SET_TO_DISABLE flag for proper enable
> and disable of 48MHz clock.
> 
> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
> Reviewed-by: Mario Limonciello <Mario.Limonciello@amd.com>
> ---

Applied to clk-next

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

end of thread, other threads:[~2022-01-07  1:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-12 18:05 [PATCH v5 0/5] clk-fch: Add support for newer family of AMD's SOC Ajit Kumar Pandey
2021-12-12 18:05 ` [PATCH v5 1/5] x86: clk: " Ajit Kumar Pandey
2022-01-07  1:58   ` Stephen Boyd
2021-12-12 18:05 ` [PATCH v5 2/5] drivers: acpi: acpi_apd: Remove unused device property "is-rv" Ajit Kumar Pandey
2021-12-17 18:06   ` Rafael J. Wysocki
2021-12-17 18:19     ` Limonciello, Mario
2021-12-17 18:23       ` Rafael J. Wysocki
2021-12-12 18:05 ` [PATCH v5 3/5] ACPI: APD: Add a fmw property clk-name Ajit Kumar Pandey
2021-12-12 18:05 ` [PATCH v5 4/5] clk: x86: Use dynamic con_id string during clk registration Ajit Kumar Pandey
2022-01-07  1:59   ` Stephen Boyd
2021-12-12 18:05 ` [PATCH v5 5/5] clk: x86: Fix clk_gate_flags for RV_CLK_GATE Ajit Kumar Pandey
2022-01-07  1:59   ` Stephen Boyd

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.