Skip to contentSkip to conversation

berlin sdhci clock clean up

PATCH Applied Jisheng Zhang 2 participants 9 messages Oct 20, 2015 – Oct 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover berlin sdhci clock clean up

Add or fix the optional clock property, then remove the CLK_IGNORE_UNUSED flag for sdio clk(s).

Since v1:
- remove the "mmc: sdhci-pxav3: fix optional clock name" patch to not block the clock clean up patches, will send another separate patch after talking with HW people.

Jisheng Zhang (4):
ARM: dts: berlin: correct BG2Q's sdhci2 2nd clock
ARM: dts: berlin: add 2nd clock for BG2Q sdhci0 and sdhci1
clk: berlin: bg2q: remove CLK_IGNORE_UNUSED flag for sdio clk
clk: berlin: bg2: remove CLK_IGNORE_UNUSED flag for sdio clk

 arch/arm/boot/dts/berlin2q.dtsi | 8 +++++---
 drivers/clk/berlin/bg2.c        | 4 ++--
 drivers/clk/berlin/bg2q.c       | 2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)
Signature · 1 line
2.6.1
#1 lore raw

PATCH v2 1/4 ARM: dts: berlin: correct BG2Q's sdhci2 2nd clock

The optional 2nd clock is CLKID_SDIO.

---
 arch/arm/boot/dts/berlin2q.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/berlin2q.dtsi +1 -1
index 63a4849..2cb07fa 100644
@@ -119,7 +119,7 @@
 			compatible = "mrvl,pxav3-mmc";
 			reg = <0xab1000 0x200>;
 			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&chip_clk CLKID_NFC_ECC>, <&chip_clk CLKID_NFC>;
+			clocks = <&chip_clk CLKID_NFC_ECC>, <&chip_clk CLKID_SDIO>;
 			clock-names = "io", "core";
 			status = "disabled";
 		};
Signature · 1 line
2.6.1
#2 lore raw

PATCH v2 2/4 ARM: dts: berlin: add 2nd clock for BG2Q sdhci0 and sdhci1

In reply to Jisheng Zhang

Add the optional 2nd clock for BG2Q's sdhci0 and sdhci1. This would let the clock be disabled during runtime pm, so saves power a bit.

---
 arch/arm/boot/dts/berlin2q.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/berlin2q.dtsi +4 -2
index 2cb07fa..71b5d5e 100644
@@ -102,7 +102,8 @@
 		sdhci0: sdhci at ab0000 {
 			compatible = "mrvl,pxav3-mmc";
 			reg = <0xab0000 0x200>;
-			clocks = <&chip_clk CLKID_SDIO1XIN>;
+			clocks = <&chip_clk CLKID_SDIO1XIN>, <&chip_clk CLKID_SDIO>;
+			clock-names = "io", "core";
 			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
 			status = "disabled";
 		};
@@ -110,7 +111,8 @@
 		sdhci1: sdhci at ab0800 {
 			compatible = "mrvl,pxav3-mmc";
 			reg = <0xab0800 0x200>;
-			clocks = <&chip_clk CLKID_SDIO1XIN>;
+			clocks = <&chip_clk CLKID_SDIO1XIN>, <&chip_clk CLKID_SDIO>;
+			clock-names = "io", "core";
 			interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
 			status = "disabled";
 		};
Signature · 1 line
2.6.1
#3 lore raw

PATCH v2 3/4 clk: berlin: bg2q: remove CLK_IGNORE_UNUSED flag for sdio clk

In reply to Jisheng Zhang

Since we have added the necessary two clks' properties in dts, we can remove the "sdio" clk's CLK_IGNORE_UNUSED flag now.

---
 drivers/clk/berlin/bg2q.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/berlin/bg2q.c +1 -1
index 221f40c..243f421 100644
@@ -283,7 +283,7 @@ static const struct berlin2_gate_data bg2q_gates[] __initconst = {
 	{ "usb2",	"perif",	13 },
 	{ "usb3",	"perif",	14 },
 	{ "pbridge",	"perif",	15, CLK_IGNORE_UNUSED },
-	{ "sdio",	"perif",	16, CLK_IGNORE_UNUSED },
+	{ "sdio",	"perif",	16 },
 	{ "nfc",	"perif",	18 },
 	{ "pcie",	"perif",	22 },
 };
Signature · 1 line
2.6.1
#7 lore raw

PATCH v2 4/4 clk: berlin: bg2: remove CLK_IGNORE_UNUSED flag for sdio clk

In reply to Jisheng Zhang

The clocks' properties have been already properly set, so there's no need to set this flag for sdio0 and sdio1 clk any more.

---
 drivers/clk/berlin/bg2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/berlin/bg2.c +2 -2
index 73153fc..23e0e3b 100644
@@ -490,8 +490,8 @@ static const struct berlin2_gate_data bg2_gates[] __initconst = {
 	{ "usb0",	"perif",	11 },
 	{ "usb1",	"perif",	12 },
 	{ "pbridge",	"perif",	13, CLK_IGNORE_UNUSED },
-	{ "sdio0",	"perif",	14, CLK_IGNORE_UNUSED },
-	{ "sdio1",	"perif",	15, CLK_IGNORE_UNUSED },
+	{ "sdio0",	"perif",	14 },
+	{ "sdio1",	"perif",	15 },
 	{ "nfc",	"perif",	17 },
 	{ "smemc",	"perif",	19 },
 	{ "audiohd",	"audiohd_pll",	26 },
Signature · 1 line
2.6.1
#4 lore raw

Re: [PATCH v2 3/4] clk: berlin: bg2q: remove CLK_IGNORE_UNUSED flag for sdio clk

In reply to Jisheng Zhang

Quoting Jisheng Zhang (2015-10-20 04:16:46)

Quoted 4 lines

Since we have added the necessary two clks' properties in dts, we can remove the "sdio" clk's CLK_IGNORE_UNUSED flag now.

Applied to clk-next.

Regards,
Mike

Quoted 20 lines
---
 drivers/clk/berlin/bg2q.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/berlin/bg2q.c +1 -1
index 221f40c..243f421 100644
@@ -283,7 +283,7 @@ static const struct berlin2_gate_data bg2q_gates[] __initconst = {
        { "usb2",       "perif",        13 },
        { "usb3",       "perif",        14 },
        { "pbridge",    "perif",        15, CLK_IGNORE_UNUSED },
-       { "sdio",       "perif",        16, CLK_IGNORE_UNUSED },
+       { "sdio",       "perif",        16 },
        { "nfc",        "perif",        18 },
        { "pcie",       "perif",        22 },
 };
Signature · 1 line
2.6.1
#8 lore raw

Re: [PATCH v2 4/4] clk: berlin: bg2: remove CLK_IGNORE_UNUSED flag for sdio clk

In reply to Jisheng Zhang

Quoting Jisheng Zhang (2015-10-20 04:16:47)

Quoted 4 lines

The clocks' properties have been already properly set, so there's no need to set this flag for sdio0 and sdio1 clk any more.

Applied to clk-next.

Regards,
Mike

Quoted 22 lines
---
 drivers/clk/berlin/bg2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/berlin/bg2.c +2 -2
index 73153fc..23e0e3b 100644
@@ -490,8 +490,8 @@ static const struct berlin2_gate_data bg2_gates[] __initconst = {
        { "usb0",       "perif",        11 },
        { "usb1",       "perif",        12 },
        { "pbridge",    "perif",        13, CLK_IGNORE_UNUSED },
-       { "sdio0",      "perif",        14, CLK_IGNORE_UNUSED },
-       { "sdio1",      "perif",        15, CLK_IGNORE_UNUSED },
+       { "sdio0",      "perif",        14 },
+       { "sdio1",      "perif",        15 },
        { "nfc",        "perif",        17 },
        { "smemc",      "perif",        19 },
        { "audiohd",    "audiohd_pll",  26 },
Signature · 1 line
2.6.1
#5 lore raw

Re: [PATCH v2 3/4] clk: berlin: bg2q: remove CLK_IGNORE_UNUSED flag for sdio clk

In reply to Michael Turquette

Quoting Michael Turquette (2015-10-21 02:30:39)

Quoted 7 lines

Quoting Jisheng Zhang (2015-10-20 04:16:46)

Quoted 4 lines

Since we have added the necessary two clks' properties in dts, we can remove the "sdio" clk's CLK_IGNORE_UNUSED flag now.

Applied to clk-next.

So the sdhci change was dropped from v2. Do you want me to Ack these instead so you can send them all together?

Regards,
Mike

Quoted 24 lines

Regards,
Mike

Quoted 20 lines
---
 drivers/clk/berlin/bg2q.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/berlin/bg2q.c +1 -1
index 221f40c..243f421 100644
@@ -283,7 +283,7 @@ static const struct berlin2_gate_data bg2q_gates[] __initconst = {
        { "usb2",       "perif",        13 },
        { "usb3",       "perif",        14 },
        { "pbridge",    "perif",        15, CLK_IGNORE_UNUSED },
-       { "sdio",       "perif",        16, CLK_IGNORE_UNUSED },
+       { "sdio",       "perif",        16 },
        { "nfc",        "perif",        18 },
        { "pcie",       "perif",        22 },
 };
Signature · 1 line
2.6.1
#6 lore raw

Re: [PATCH v2 3/4] clk: berlin: bg2q: remove CLK_IGNORE_UNUSED flag for sdio clk

Dear Michael,

Quoted 11 lines · On Wed, 21 Oct 2015 02:54:54 -0700 Michael Turquette <[email protected]>…

Quoting Michael Turquette (2015-10-21 02:30:39)

Quoted 7 lines

Quoting Jisheng Zhang (2015-10-20 04:16:46)

Quoted 4 lines

Since we have added the necessary two clks' properties in dts, we can remove the "sdio" clk's CLK_IGNORE_UNUSED flag now.

Applied to clk-next.

So the sdhci change was dropped from v2. Do you want me to Ack these instead so you can send them all together?

I'll send another patch to for the sdhci change. it doesn't matter even the sdhci change delay a merge window because no functionality changes in the sdhci commit.

It's better we firstly take these clk clean ups because it saves power a bit and clean up the CLK_IGNORE_UNUSED flag.

Hi Sebastian,

What do you think?

Thanks,
Jisheng