Skip to contentSkip to conversation

clk: mediatek: Fix MT2701 dependencies

PATCH Superseded Jean Delvare 5 participants 13 messages Jan 9, 2017 – Jan 24, 2017

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: mediatek: Fix MT2701 dependencies

If I say "no" to "Clock driver for Mediatek MT2701", I don't want to be asked individually about each sub-driver. No means no.

Additionally, this driver shouldn't be proposed at all on non-mediatek builds, unless build-testing.

Fixes e9862118272a ("clk: mediatek: Add MT2701 clock support")
Cc Shunli Wang <[email protected]>
Cc James Liao <[email protected]>
Cc Erin Lo <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Michael Turquette <[email protected]>
Cc Matthias Brugger <[email protected]>

---
As a side note, is there any rationale for splitting this driver into that many small sub-drivers? Looks overengineered to me.

As another side note, I wonder why so many clock drivers have "COMMON" in their symbol names. Looks wrong to me.

 drivers/clk/mediatek/Kconfig |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/clk/mediatek/Kconfig +7 -6
@@ -8,6 +8,7 @@ config COMMON_CLK_MEDIATEK
 
 config COMMON_CLK_MT2701
 	bool "Clock driver for Mediatek MT2701"
+	depends on ARCH_MEDIATEK || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
 	default ARCH_MEDIATEK
 	---help---
@@ -15,37 +16,37 @@ config COMMON_CLK_MT2701
 
 config COMMON_CLK_MT2701_MMSYS
 	bool "Clock driver for Mediatek MT2701 mmsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 mmsys clocks.
 
 config COMMON_CLK_MT2701_IMGSYS
 	bool "Clock driver for Mediatek MT2701 imgsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 imgsys clocks.
 
 config COMMON_CLK_MT2701_VDECSYS
 	bool "Clock driver for Mediatek MT2701 vdecsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 vdecsys clocks.
 
 config COMMON_CLK_MT2701_HIFSYS
 	bool "Clock driver for Mediatek MT2701 hifsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 hifsys clocks.
 
 config COMMON_CLK_MT2701_ETHSYS
 	bool "Clock driver for Mediatek MT2701 ethsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 ethsys clocks.
 
 config COMMON_CLK_MT2701_BDPSYS
 	bool "Clock driver for Mediatek MT2701 bdpsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 bdpsys clocks.
 
Signature · 2 lines
Jean Delvare
SUSE L3 Support
Reviewed-by on v1 1/1
#1 lore raw

Hi Jean,

Am 09.01.2017 um 11:36 schrieb Jean Delvare:

Quoted 15 lines

If I say "no" to "Clock driver for Mediatek MT2701", I don't want to be asked individually about each sub-driver. No means no.

Additionally, this driver shouldn't be proposed at all on non-mediatek builds, unless build-testing.

Fixes e9862118272a ("clk: mediatek: Add MT2701 clock support")
Cc Shunli Wang <[email protected]>
Cc James Liao <[email protected]>
Cc Erin Lo <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Michael Turquette <[email protected]>
Cc Matthias Brugger <[email protected]>

---

[...]

Quoted 2 lines

As another side note, I wonder why so many clock drivers have "COMMON" in their symbol names. Looks wrong to me.

It refers to the Common Clock Framework:
https://www.kernel.org/doc/Documentation/clk.txt

drivers/clk/mediatek/Kconfig config COMMON_CLK_MEDIATEK · line 13

Quoted 9 lines
drivers/clk/mediatek/Kconfig +1 -0
@@ -8,6 +8,7 @@ config COMMON_CLK_MEDIATEK
 
 config COMMON_CLK_MT2701
 	bool "Clock driver for Mediatek MT2701"
+	depends on ARCH_MEDIATEK || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
 	default ARCH_MEDIATEK

Should the default then become y for simplicity?

Another aspect here is that this is a 32-bit SoC but it propagates into the arm64 configs, so maybe (ARCH_MEDIATEK && !ARM64) || COMPILE_TEST?

Same for mt2701 pinctrl.

http://kernel.opensuse.org/cgit/kernel-source/plain/config/arm64/default?id=ff90e915117c5d7a8bb00dc0bc1d3145ebe985ec

Quoted 35 lines
drivers/clk/mediatek/Kconfig +5 -5
 	---help---
@@ -15,37 +16,37 @@ config COMMON_CLK_MT2701
 
 config COMMON_CLK_MT2701_MMSYS
 	bool "Clock driver for Mediatek MT2701 mmsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 mmsys clocks.
 
 config COMMON_CLK_MT2701_IMGSYS
 	bool "Clock driver for Mediatek MT2701 imgsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 imgsys clocks.
 
 config COMMON_CLK_MT2701_VDECSYS
 	bool "Clock driver for Mediatek MT2701 vdecsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 vdecsys clocks.
 
 config COMMON_CLK_MT2701_HIFSYS
 	bool "Clock driver for Mediatek MT2701 hifsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 hifsys clocks.
 
 config COMMON_CLK_MT2701_ETHSYS
 	bool "Clock driver for Mediatek MT2701 ethsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701

drivers/clk/mediatek/Kconfig config COMMON_CLK_MT2701 · line 52

Quoted 10 lines
drivers/clk/mediatek/Kconfig +1 -1
 	---help---
 	  This driver supports Mediatek MT2701 ethsys clocks.
 
 config COMMON_CLK_MT2701_BDPSYS
 	bool "Clock driver for Mediatek MT2701 bdpsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 bdpsys clocks.
 

Anyway, a step forward,

Thanks,
Andreas

Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Reviewed-by on v1 1/1
#12 lore raw
In reply to Jean Delvare

Hi Jean,

Quoted 6 lines · Jean Delvare

If I say "no" to "Clock driver for Mediatek MT2701", I don't want to be asked individually about each sub-driver. No means no.

Additionally, this driver shouldn't be proposed at all on non-mediatek builds, unless build-testing.

Quoted 8 lines
Fixes e9862118272a ("clk: mediatek: Add MT2701 clock support")
Cc Shunli Wang <[email protected]>
Cc James Liao <[email protected]>
Cc Erin Lo <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Michael Turquette <[email protected]>
Cc Matthias Brugger <[email protected]>
Quoted 3 lines

---
As a side note, is there any rationale for splitting this driver into that many small sub-drivers? Looks overengineered to me.

These are 'subsystem' clocks and can be controlled only if their corresponding drivers are ready to control power domains and clocks.

Quoted 2 lines

As another side note, I wonder why so many clock drivers have "COMMON" in their symbol names. Looks wrong to me.

CCF (Common Clock Framework) uses option 'COMMON_CLK', so CCF platform drivers use 'COMMON_CLK_' to be their option prefix.

Quoted 59 lines
 drivers/clk/mediatek/Kconfig |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/clk/mediatek/Kconfig +7 -6
@@ -8,6 +8,7 @@ config COMMON_CLK_MEDIATEK
 
 config COMMON_CLK_MT2701
 	bool "Clock driver for Mediatek MT2701"
+	depends on ARCH_MEDIATEK || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
 	default ARCH_MEDIATEK
 	---help---
@@ -15,37 +16,37 @@ config COMMON_CLK_MT2701
 
 config COMMON_CLK_MT2701_MMSYS
 	bool "Clock driver for Mediatek MT2701 mmsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 mmsys clocks.
 
 config COMMON_CLK_MT2701_IMGSYS
 	bool "Clock driver for Mediatek MT2701 imgsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 imgsys clocks.
 
 config COMMON_CLK_MT2701_VDECSYS
 	bool "Clock driver for Mediatek MT2701 vdecsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 vdecsys clocks.
 
 config COMMON_CLK_MT2701_HIFSYS
 	bool "Clock driver for Mediatek MT2701 hifsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 hifsys clocks.
 
 config COMMON_CLK_MT2701_ETHSYS
 	bool "Clock driver for Mediatek MT2701 ethsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 ethsys clocks.
 
 config COMMON_CLK_MT2701_BDPSYS
 	bool "Clock driver for Mediatek MT2701 bdpsys"
-	select COMMON_CLK_MT2701
+	depends on COMMON_CLK_MT2701
 	---help---
 	  This driver supports Mediatek MT2701 bdpsys clocks.
 
#2 lore raw
In reply to Andreas Färber
Quoted 18 lines · On Mon, 9 Jan 2017 21:08:50 +0100, Andreas F=C3=A4rber wrote:

Hi Jean,
=20
Am 09.01.2017 um 11:36 schrieb Jean Delvare:

Quoted 14 lines

If I say "no" to "Clock driver for Mediatek MT2701", I don't want to be asked individually about each sub-driver. No means no. =20
Additionally, this driver shouldn't be proposed at all on non-mediatek builds, unless build-testing.
=20

Fixes e9862118272a ("clk: mediatek: Add MT2701 clock support")
Cc Shunli Wang <[email protected]>
Cc James Liao <[email protected]>
Cc Erin Lo <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Michael Turquette <[email protected]>
Cc Matthias Brugger <[email protected]>
Quoted 1 line

---

Quoted 6 lines

[...]

Quoted 2 lines

As another side note, I wonder why so many clock drivers have "COMMON" in their symbol names. Looks wrong to me.

=20
It refers to the Common Clock Framework:
https://www.kernel.org/doc/Documentation/clk.txt

OK, thanks for the explanation. Still seems overkill to me to prefix everything with COMMON_CLK when the drivers live under drivers/clk, but oh well :-)

Quoted 1 line
Quoted 1 line

--- linux-4.10-rc2.orig/drivers/clk/mediatek/Kconfig 2017-01-01 23:31:5=

3.000000000 +0100

Quoted 1 line
Quoted 1 line

+++ linux-4.10-rc2/drivers/clk/mediatek/Kconfig 2017-01-09 11:17:37.542=

344083 +0100

Quoted 9 lines

drivers/clk/mediatek/Kconfig config COMMON_CLK_MEDIATEK · line 13

Quoted 7 lines
(quoted diff) +0 -0
@@ -8,6 +8,7 @@ config COMMON_CLK_MEDIATEK

=20
config COMMON_CLK_MT2701

drivers/clk/mediatek/Kconfig +1 -0
 	bool "Clock driver for Mediatek MT2701"
+	depends on ARCH_MEDIATEK || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
 	default ARCH_MEDIATEK

=20
Should the default then become y for simplicity?

I left it as is as it is the same already done in other drivers in the same directory. I agree "default y" would do the same in practice.

Quoted 6 lines

Another aspect here is that this is a 32-bit SoC but it propagates into the arm64 configs, so maybe (ARCH_MEDIATEK && !ARM64) || COMPILE_TEST? =20
Same for mt2701 pinctrl.
=20
http://kernel.opensuse.org/cgit/kernel-source/plain/config/arm64/default?=

id=3Dff90e915117c5d7a8bb00dc0bc1d3145ebe985ec

Actually I thought the driver was needed primarily on arm64 because of this configuration file. If that's not the case then I can resubmit with the suggested change, no problem.

What about MT8135 and MT8173, are they 32-bit SoCs as well?

Quoted 4 lines

(...)
Anyway, a step forward,
=20

Thanks for the review.

--=20
Jean Delvare
SUSE L3 Support

#3 lore raw
Quoted 50 lines · Jean Delvare
Quoted 18 lines · Andreas Färber

Hi Jean,

Am 09.01.2017 um 11:36 schrieb Jean Delvare:

Quoted 14 lines

If I say "no" to "Clock driver for Mediatek MT2701", I don't want to be asked individually about each sub-driver. No means no.

Additionally, this driver shouldn't be proposed at all on non-mediatek builds, unless build-testing.

Fixes e9862118272a ("clk: mediatek: Add MT2701 clock support")
Cc Shunli Wang <[email protected]>
Cc James Liao <[email protected]>
Cc Erin Lo <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Michael Turquette <[email protected]>
Cc Matthias Brugger <[email protected]>
Quoted 1 line

---

Quoted 6 lines

[...]

Quoted 2 lines

As another side note, I wonder why so many clock drivers have "COMMON" in their symbol names. Looks wrong to me.

It refers to the Common Clock Framework:
https://www.kernel.org/doc/Documentation/clk.txt

OK, thanks for the explanation. Still seems overkill to me to prefix everything with COMMON_CLK when the drivers live under drivers/clk, but oh well :-)

Quoted 11 lines

drivers/clk/mediatek/Kconfig config COMMON_CLK_MEDIATEK · line 13

Quoted 9 lines
drivers/clk/mediatek/Kconfig +1 -0
@@ -8,6 +8,7 @@ config COMMON_CLK_MEDIATEK
 
 config COMMON_CLK_MT2701
 	bool "Clock driver for Mediatek MT2701"
+	depends on ARCH_MEDIATEK || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
 	default ARCH_MEDIATEK

Should the default then become y for simplicity?

I left it as is as it is the same already done in other drivers in the same directory. I agree "default y" would do the same in practice.

Quoted 5 lines

Another aspect here is that this is a 32-bit SoC but it propagates into the arm64 configs, so maybe (ARCH_MEDIATEK && !ARM64) || COMPILE_TEST?

Same for mt2701 pinctrl.

Quoted 7 lines
Quoted 1 line

http://kernel.opensuse.org/cgit/kernel-source/plain/config/arm64/default?id=ff90e915117c5d7a8bb00dc0bc1d3145ebe985ec

Actually I thought the driver was needed primarily on arm64 because of this configuration file. If that's not the case then I can resubmit with the suggested change, no problem.

What about MT8135 and MT8173, are they 32-bit SoCs as well?

MT8135 is a 32-bit SoC and MT8173 is a 64-bit SoC.

Quoted 7 lines
Quoted 4 lines

(...)
Anyway, a step forward,

Thanks for the review.

#4 lore raw

Hi James,

Quoted 4 lines · James Liao
Quoted 1 line · Jean Delvare

What about MT8135 and MT8173, are they 32-bit SoCs as well?

MT8135 is a 32-bit SoC and MT8173 is a 64-bit SoC.

OK, so would the following change make sense?

---
 drivers/clk/mediatek/Kconfig |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clk/mediatek/Kconfig +4 -4
@@ -52,16 +52,16 @@ config COMMON_CLK_MT2701_BDPSYS
 
 config COMMON_CLK_MT8135
 	bool "Clock driver for Mediatek MT8135"
-	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on (ARCH_MEDIATEK && !ARM64) || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
-	default ARCH_MEDIATEK
+	default y
 	---help---
 	  This driver supports Mediatek MT8135 clocks.
 
 config COMMON_CLK_MT8173
 	bool "Clock driver for Mediatek MT8173"
-	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
-	default ARCH_MEDIATEK
+	default y
 	---help---
 	  This driver supports Mediatek MT8173 clocks.

Thanks,

Signature · 2 lines
Jean Delvare
SUSE L3 Support
#5 lore raw
Quoted 17 lines · Jean Delvare

Hi James,

Quoted 4 lines · James Liao
Quoted 1 line · Jean Delvare

What about MT8135 and MT8173, are they 32-bit SoCs as well?

MT8135 is a 32-bit SoC and MT8173 is a 64-bit SoC.

OK, so would the following change make sense?

---
 drivers/clk/mediatek/Kconfig |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

drivers/clk/mediatek/Kconfig config COMMON_CLK_MT2701_BDPSYS · line 55

Quoted 5 lines
drivers/clk/mediatek/Kconfig +1 -1
@@ -52,16 +52,16 @@ config COMMON_CLK_MT2701_BDPSYS
 
 config COMMON_CLK_MT8135
 	bool "Clock driver for Mediatek MT8135"
-	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on (ARCH_MEDIATEK && !ARM64) || COMPILE_TEST

Why not just check for ARM?

+ depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST

Joe.C

#6 lore raw

Hi Joe,

Review

Quoted 12 lines · Yingjoe Chen

drivers/clk/mediatek/Kconfig config COMMON_CLK_MT2701_BDPSYS · line 55

Quoted 6 lines · Jean Delvare
drivers/clk/mediatek/Kconfig +1 -1
@@ -52,16 +52,16 @@ config COMMON_CLK_MT2701_BDPSYS
 
 config COMMON_CLK_MT8135
 	bool "Clock driver for Mediatek MT8135"
-	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on (ARCH_MEDIATEK && !ARM64) || COMPILE_TEST

Why not just check for ARM?

(quoted diff) +1 -0
+	depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST

I don't know :D Andreas suggested it for MT2701, so I assumed ARM was set also for 64-bit kernels (like X86 is set for 64-bit kernels) and ARM64 had to be used to differentiate. But it seems ARM isn't set for 64-bit kernels, so you are right, checking for ARM should work and is more straightforward. I'll fix it before submitting the patch.

Thanks for the review,

Signature · 2 lines
Jean Delvare
SUSE L3 Support
#7 lore raw
In reply to Jean Delvare

Hi Jean,

Quoted 38 lines · Jean Delvare

Hi James,

Quoted 4 lines · James Liao
Quoted 1 line · Jean Delvare

What about MT8135 and MT8173, are they 32-bit SoCs as well?

MT8135 is a 32-bit SoC and MT8173 is a 64-bit SoC.

OK, so would the following change make sense?

---
 drivers/clk/mediatek/Kconfig |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clk/mediatek/Kconfig +4 -4
@@ -52,16 +52,16 @@ config COMMON_CLK_MT2701_BDPSYS
 
 config COMMON_CLK_MT8135
 	bool "Clock driver for Mediatek MT8135"
-	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on (ARCH_MEDIATEK && !ARM64) || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
-	default ARCH_MEDIATEK
+	default y
 	---help---
 	  This driver supports Mediatek MT8135 clocks.
 
 config COMMON_CLK_MT8173
 	bool "Clock driver for Mediatek MT8173"
-	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
-	default ARCH_MEDIATEK
+	default y
 	---help---
 	  This driver supports Mediatek MT8173 clocks.
Quoted 1 line

Thanks,

Although MT8173 is a 64-bit SoC, but 32-bit kernel can run on it. So I think it no need to limit COMMON_CLK_MT8173 only be enabled on ARM64 platform.

Best regards,

James

#8 lore raw

Hi James,

Quoted 14 lines · James Liao

drivers/clk/mediatek/Kconfig config COMMON_CLK_MT2701_BDPSYS · line 67

Quoted 9 lines · Jean Delvare

config COMMON_CLK_MT8173

drivers/clk/mediatek/Kconfig +2 -2
 	bool "Clock driver for Mediatek MT8173"
-	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
-	default ARCH_MEDIATEK
+	default y
 	---help---
 	  This driver supports Mediatek MT8173 clocks.

Although MT8173 is a 64-bit SoC, but 32-bit kernel can run on it. So I think it no need to limit COMMON_CLK_MT8173 only be enabled on ARM64 platform.

OK, I'll leave that one alone then, thanks for the information.

Signature · 2 lines
Jean Delvare
SUSE L3 Support
#9 lore raw
Quoted 18 lines · Jean Delvare

Hi James,

Quoted 14 lines · James Liao

drivers/clk/mediatek/Kconfig config COMMON_CLK_MT2701_BDPSYS · line 67

Quoted 9 lines · Jean Delvare

config COMMON_CLK_MT8173

drivers/clk/mediatek/Kconfig +2 -2
 	bool "Clock driver for Mediatek MT8173"
-	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
-	default ARCH_MEDIATEK
+	default y
 	---help---
 	  This driver supports Mediatek MT8173 clocks.

Although MT8173 is a 64-bit SoC, but 32-bit kernel can run on it. So I think it no need to limit COMMON_CLK_MT8173 only be enabled on ARM64 platform.

Quoted 2 lines

OK, I'll leave that one alone then, thanks for the information.

Is this patch going another round? I haven't seen anything on the list so far.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#10 lore raw
Quoted 19 lines · Stephen Boyd
Quoted 18 lines · Jean Delvare

Hi James,

Quoted 14 lines · James Liao

drivers/clk/mediatek/Kconfig config COMMON_CLK_MT2701_BDPSYS · line 67

Quoted 9 lines · Jean Delvare

config COMMON_CLK_MT8173

drivers/clk/mediatek/Kconfig +2 -2
 	bool "Clock driver for Mediatek MT8173"
-	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
 	select COMMON_CLK_MEDIATEK
-	default ARCH_MEDIATEK
+	default y
 	---help---
 	  This driver supports Mediatek MT8173 clocks.

Although MT8173 is a 64-bit SoC, but 32-bit kernel can run on it. So I think it no need to limit COMMON_CLK_MT8173 only be enabled on ARM64 platform.

Quoted 4 lines
Quoted 1 line

OK, I'll leave that one alone then, thanks for the information.

Is this patch going another round? I haven't seen anything on the list so far.

Sorry for the delay, I'll send an update later today.

Signature · 2 lines
Jean Delvare
SUSE L3 Support
#11 lore raw
In reply to Andreas Färber

Hallo Andreas,

Quoted 4 lines · On Mon, 9 Jan 2017 21:08:50 +0100, Andreas F=C3=A4rber wrote:

Another aspect here is that this is a 32-bit SoC but it propagates into the arm64 configs, so maybe (ARCH_MEDIATEK && !ARM64) || COMPILE_TEST? =20
Same for mt2701 pinctrl.

I took a look and the pinctrl situation is different:

config PINCTRL_MT2701

	bool "Mediatek MT2701 pin control" if COMPILE_TEST && !MACH_MT2701
	(...)
	default MACH_MT2701

So the user will not be prompt about it on ARM64 (unless build-testing) because MACH_MT2701 isn't set on ARM64. The only issue with this construct is that you end up with useless symbols defined in the configuration file (they can only be "n".) So I would argue that the following is preferred:

config PINCTRL_MT2701

	bool "Mediatek MT2701 pin control"
	(...)
	depends on MACH_MT2701 || COMPILE_TEST
	default MACH_MT2701

And same for the other 3 PINCTRL_MT* options. Yes, that means the user will be asked about the options on Mediatek kernels, but actually I believe this is desirable, as advanced users should be allowed to disable specific drivers if they know what they are doing. Other users can just stick to the default.

--=20
Jean Delvare
SUSE L3 Support