* [PATCH 1/7] irqchip: renesas-irqc: Add more register documentation
2015-03-18 18:55 [PATCH 0/7] ARM: shmobile: Add IRQC clock to device tree Geert Uytterhoeven
@ 2015-03-18 18:55 ` Geert Uytterhoeven
[not found] ` <1426704961-27322-2-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2015-03-18 18:55 ` [PATCH 2/7] irqchip: renesas-irqc: Add minimal runtime PM support Geert Uytterhoeven
` (7 subsequent siblings)
8 siblings, 1 reply; 15+ messages in thread
From: Geert Uytterhoeven @ 2015-03-18 18:55 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Simon Horman, Magnus Damm
Cc: linux-sh, devicetree, linux-pm, linux-kernel, Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/irqchip/irq-renesas-irqc.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index 2ea3412fdf8cc668..2ce2edf8ec8ec182 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -30,14 +30,24 @@
#include <linux/module.h>
#include <linux/platform_data/irq-renesas-irqc.h>
-#define IRQC_IRQ_MAX 32 /* maximum 32 interrupts per driver instance */
+#define IRQC_IRQ_MAX 32 /* maximum 32 interrupts per driver instance */
-#define IRQC_REQ_STS 0x00
-#define IRQC_EN_STS 0x04
-#define IRQC_EN_SET 0x08
+#define IRQC_REQ_STS 0x00 /* Interrupt Request Status Register */
+#define IRQC_EN_STS 0x04 /* Interrupt Enable Status Register */
+#define IRQC_EN_SET 0x08 /* Interrupt Enable Set Register */
#define IRQC_INT_CPU_BASE(n) (0x000 + ((n) * 0x10))
-#define DETECT_STATUS 0x100
+ /* SYS-CPU vs. RT-CPU */
+#define DETECT_STATUS 0x100 /* IRQn Detect Status Register */
+#define MONITOR 0x104 /* IRQn Signal Level Monitor Register */
+#define HLVL_STS 0x108 /* IRQn High Level Detect Status Register */
+#define LLVL_STS 0x10c /* IRQn Low Level Detect Status Register */
+#define S_R_EDGE_STS 0x110 /* IRQn Sync Rising Edge Detect Status Reg. */
+#define S_F_EDGE_STS 0x114 /* IRQn Sync Falling Edge Detect Status Reg. */
+#define A_R_EDGE_STS 0x118 /* IRQn Async Rising Edge Detect Status Reg. */
+#define A_F_EDGE_STS 0x11c /* IRQn Async Falling Edge Detect Status Reg. */
+#define CHTEN_STS 0x120 /* Chattering Reduction Status Register */
#define IRQC_CONFIG(n) (0x180 + ((n) * 0x04))
+ /* IRQn Configuration Register */
struct irqc_irq {
int hw_irq;
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/7] irqchip: renesas-irqc: Add minimal runtime PM support
2015-03-18 18:55 [PATCH 0/7] ARM: shmobile: Add IRQC clock to device tree Geert Uytterhoeven
2015-03-18 18:55 ` [PATCH 1/7] irqchip: renesas-irqc: Add more register documentation Geert Uytterhoeven
@ 2015-03-18 18:55 ` Geert Uytterhoeven
[not found] ` <1426704961-27322-3-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
[not found] ` <1426704961-27322-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
` (6 subsequent siblings)
8 siblings, 1 reply; 15+ messages in thread
From: Geert Uytterhoeven @ 2015-03-18 18:55 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Simon Horman, Magnus Damm
Cc: linux-sh, devicetree, linux-pm, linux-kernel, Geert Uytterhoeven
This is just enough to let pm_clk_*() enable the functional clock, and
manage it for suspend/resume, if present.
Before, it was assumed enabled by the bootloader or reset state.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/irqchip/irq-renesas-irqc.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index 2ce2edf8ec8ec182..718f01cd1aea19f6 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -29,6 +29,7 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/platform_data/irq-renesas-irqc.h>
+#include <linux/pm_runtime.h>
#define IRQC_IRQ_MAX 32 /* maximum 32 interrupts per driver instance */
@@ -180,6 +181,9 @@ static int irqc_probe(struct platform_device *pdev)
p->pdev = pdev;
platform_set_drvdata(pdev, p);
+ pm_runtime_enable(&pdev->dev);
+ pm_runtime_get_sync(&pdev->dev);
+
/* get hold of manadatory IOMEM */
io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!io) {
@@ -260,6 +264,8 @@ err3:
err2:
iounmap(p->iomem);
err1:
+ pm_runtime_put(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
kfree(p);
err0:
return ret;
@@ -275,6 +281,8 @@ static int irqc_remove(struct platform_device *pdev)
irq_domain_remove(p->irq_domain);
iounmap(p->iomem);
+ pm_runtime_put(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
kfree(p);
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
[parent not found: <1426704961-27322-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>]
* [PATCH 3/7] irqchip: renesas-irqc: Add functional clock to bindings
[not found] ` <1426704961-27322-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2015-03-18 18:55 ` Geert Uytterhoeven
2015-03-19 1:41 ` Simon Horman
0 siblings, 1 reply; 15+ messages in thread
From: Geert Uytterhoeven @ 2015-03-18 18:55 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Simon Horman, Magnus Damm
Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-pm-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven
The external IRQ controller has a functional clock, which is used for
power management. Document it.
Fix a typo in the r8a73a4 SoC name while we're at it.
Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
.../devicetree/bindings/interrupt-controller/renesas,irqc.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
index 1a88e62228e59631..4f85aeb658e4c833 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
@@ -4,7 +4,7 @@ Required properties:
- compatible: has to be "renesas,irqc-<soctype>", "renesas,irqc" as fallback.
Examples with soctypes are:
- - "renesas,irqc-r8a73a4" (R-Mobile AP6)
+ - "renesas,irqc-r8a73a4" (R-Mobile APE6)
- "renesas,irqc-r8a7790" (R-Car H2)
- "renesas,irqc-r8a7791" (R-Car M2-W)
- "renesas,irqc-r8a7792" (R-Car V2H)
@@ -12,6 +12,7 @@ Required properties:
- "renesas,irqc-r8a7794" (R-Car E2)
- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in
interrupts.txt in this directory
+- clocks: Must contain a reference to the functional clock.
Optional properties:
@@ -29,4 +30,5 @@ Example:
<0 1 IRQ_TYPE_LEVEL_HIGH>,
<0 2 IRQ_TYPE_LEVEL_HIGH>,
<0 3 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp4_clks R8A7790_CLK_IRQC>;
};
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 3/7] irqchip: renesas-irqc: Add functional clock to bindings
2015-03-18 18:55 ` [PATCH 3/7] irqchip: renesas-irqc: Add functional clock to bindings Geert Uytterhoeven
@ 2015-03-19 1:41 ` Simon Horman
0 siblings, 0 replies; 15+ messages in thread
From: Simon Horman @ 2015-03-19 1:41 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Thomas Gleixner, Jason Cooper, Magnus Damm, linux-sh, devicetree,
linux-pm, linux-kernel
On Wed, Mar 18, 2015 at 07:55:57PM +0100, Geert Uytterhoeven wrote:
> The external IRQ controller has a functional clock, which is used for
> power management. Document it.
>
> Fix a typo in the r8a73a4 SoC name while we're at it.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> .../devicetree/bindings/interrupt-controller/renesas,irqc.txt | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
> index 1a88e62228e59631..4f85aeb658e4c833 100644
> --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
> +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,irqc.txt
> @@ -4,7 +4,7 @@ Required properties:
>
> - compatible: has to be "renesas,irqc-<soctype>", "renesas,irqc" as fallback.
> Examples with soctypes are:
> - - "renesas,irqc-r8a73a4" (R-Mobile AP6)
> + - "renesas,irqc-r8a73a4" (R-Mobile APE6)
> - "renesas,irqc-r8a7790" (R-Car H2)
> - "renesas,irqc-r8a7791" (R-Car M2-W)
> - "renesas,irqc-r8a7792" (R-Car V2H)
> @@ -12,6 +12,7 @@ Required properties:
> - "renesas,irqc-r8a7794" (R-Car E2)
> - #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in
> interrupts.txt in this directory
> +- clocks: Must contain a reference to the functional clock.
>
> Optional properties:
>
> @@ -29,4 +30,5 @@ Example:
> <0 1 IRQ_TYPE_LEVEL_HIGH>,
> <0 2 IRQ_TYPE_LEVEL_HIGH>,
> <0 3 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&mstp4_clks R8A7790_CLK_IRQC>;
> };
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 4/7] ARM: shmobile: r8a7734: Add IRQC clock to device tree
2015-03-18 18:55 [PATCH 0/7] ARM: shmobile: Add IRQC clock to device tree Geert Uytterhoeven
` (2 preceding siblings ...)
[not found] ` <1426704961-27322-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2015-03-18 18:55 ` Geert Uytterhoeven
2015-03-18 18:55 ` [PATCH 5/7] ARM: shmobile: r8a7790: " Geert Uytterhoeven
` (4 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2015-03-18 18:55 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Simon Horman, Magnus Damm
Cc: linux-sh, devicetree, linux-pm, linux-kernel, Geert Uytterhoeven
Link the external IRQ controllers irqc0 and irqc1 to the IRQC module
clock, so they can be power managed using that clock.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r8a73a4.dtsi | 11 +++++++----
include/dt-bindings/clock/r8a73a4-clock.h | 1 +
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
index 0fd889f88109de17..7ee22a41c6c97488 100644
--- a/arch/arm/boot/dts/r8a73a4.dtsi
+++ b/arch/arm/boot/dts/r8a73a4.dtsi
@@ -163,6 +163,7 @@
<0 29 IRQ_TYPE_LEVEL_HIGH>,
<0 30 IRQ_TYPE_LEVEL_HIGH>,
<0 31 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp4_clks R8A73A4_CLK_IRQC>;
power-domains = <&pd_c4>;
};
@@ -197,6 +198,7 @@
<0 55 IRQ_TYPE_LEVEL_HIGH>,
<0 56 IRQ_TYPE_LEVEL_HIGH>,
<0 57 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp4_clks R8A73A4_CLK_IRQC>;
power-domains = <&pd_c4>;
};
@@ -724,15 +726,16 @@
mstp4_clks: mstp4_clks@e6150140 {
compatible = "renesas,r8a73a4-mstp-clocks", "renesas,cpg-mstp-clocks";
reg = <0 0xe6150140 0 4>, <0 0xe615004c 0 4>;
- clocks = <&main_div2_clk>, <&cpg_clocks R8A73A4_CLK_HP>,
+ clocks = <&main_div2_clk>, <&main_div2_clk>,
+ <&cpg_clocks R8A73A4_CLK_HP>,
<&cpg_clocks R8A73A4_CLK_HP>;
#clock-cells = <1>;
clock-indices = <
- R8A73A4_CLK_IIC5 R8A73A4_CLK_IIC4
- R8A73A4_CLK_IIC3
+ R8A73A4_CLK_IRQC R8A73A4_CLK_IIC5
+ R8A73A4_CLK_IIC4 R8A73A4_CLK_IIC3
>;
clock-output-names =
- "iic5", "iic4", "iic3";
+ "irqc", "iic5", "iic4", "iic3";
};
mstp5_clks: mstp5_clks@e6150144 {
compatible = "renesas,r8a73a4-mstp-clocks", "renesas,cpg-mstp-clocks";
diff --git a/include/dt-bindings/clock/r8a73a4-clock.h b/include/dt-bindings/clock/r8a73a4-clock.h
index 9a4b4c9ca44aba70..dd11ecdf837e8e65 100644
--- a/include/dt-bindings/clock/r8a73a4-clock.h
+++ b/include/dt-bindings/clock/r8a73a4-clock.h
@@ -54,6 +54,7 @@
#define R8A73A4_CLK_IIC3 11
#define R8A73A4_CLK_IIC4 10
#define R8A73A4_CLK_IIC5 9
+#define R8A73A4_CLK_IRQC 7
/* MSTP5 */
#define R8A73A4_CLK_THERMAL 22
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/7] ARM: shmobile: r8a7790: Add IRQC clock to device tree
2015-03-18 18:55 [PATCH 0/7] ARM: shmobile: Add IRQC clock to device tree Geert Uytterhoeven
` (3 preceding siblings ...)
2015-03-18 18:55 ` [PATCH 4/7] ARM: shmobile: r8a7734: Add IRQC clock to device tree Geert Uytterhoeven
@ 2015-03-18 18:55 ` Geert Uytterhoeven
2015-03-18 18:56 ` [PATCH 6/7] ARM: shmobile: r8a7791: " Geert Uytterhoeven
` (3 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2015-03-18 18:55 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Simon Horman, Magnus Damm
Cc: linux-sh, devicetree, linux-pm, linux-kernel, Geert Uytterhoeven
Link the external IRQ controller irqc0 to the IRQC module clock, so it
can be power managed using that clock.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r8a7790.dtsi | 9 +++++++++
include/dt-bindings/clock/r8a7790-clock.h | 3 +++
2 files changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 4bb2f4c17321bd55..a81cfda0872fc30a 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -252,6 +252,7 @@
<0 1 IRQ_TYPE_LEVEL_HIGH>,
<0 2 IRQ_TYPE_LEVEL_HIGH>,
<0 3 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp4_clks R8A7790_CLK_IRQC>;
};
dmac0: dma-controller@e6700000 {
@@ -1158,6 +1159,14 @@
"iic0", "pciec", "iic1", "ssusb", "cmt1",
"usbdmac0", "usbdmac1";
};
+ mstp4_clks: mstp4_clks@e6150140 {
+ compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+ reg = <0 0xe6150140 0 4>, <0 0xe615004c 0 4>;
+ clocks = <&cp_clk>;
+ #clock-cells = <1>;
+ clock-indices = <R8A7790_CLK_IRQC>;
+ clock-output-names = "irqc";
+ };
mstp5_clks: mstp5_clks@e6150144 {
compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h
index 3f2c6b198d4ac289..ff7ca3584e169589 100644
--- a/include/dt-bindings/clock/r8a7790-clock.h
+++ b/include/dt-bindings/clock/r8a7790-clock.h
@@ -79,6 +79,9 @@
#define R8A7790_CLK_USBDMAC0 30
#define R8A7790_CLK_USBDMAC1 31
+/* MSTP4 */
+#define R8A7790_CLK_IRQC 7
+
/* MSTP5 */
#define R8A7790_CLK_AUDIO_DMAC1 1
#define R8A7790_CLK_AUDIO_DMAC0 2
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 6/7] ARM: shmobile: r8a7791: Add IRQC clock to device tree
2015-03-18 18:55 [PATCH 0/7] ARM: shmobile: Add IRQC clock to device tree Geert Uytterhoeven
` (4 preceding siblings ...)
2015-03-18 18:55 ` [PATCH 5/7] ARM: shmobile: r8a7790: " Geert Uytterhoeven
@ 2015-03-18 18:56 ` Geert Uytterhoeven
2015-03-18 18:56 ` [PATCH 7/7] ARM: shmobile: r8a7794: " Geert Uytterhoeven
` (2 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2015-03-18 18:56 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Simon Horman, Magnus Damm
Cc: linux-sh, devicetree, linux-pm, linux-kernel, Geert Uytterhoeven
Link the external IRQ controller irqc0 to the IRQC module clock, so it
can be power managed using that clock.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r8a7791.dtsi | 9 +++++++++
include/dt-bindings/clock/r8a7791-clock.h | 3 +++
2 files changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 4696062f6ddeaaeb..20ab7668088493b9 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -239,6 +239,7 @@
<0 15 IRQ_TYPE_LEVEL_HIGH>,
<0 16 IRQ_TYPE_LEVEL_HIGH>,
<0 17 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp4_clks R8A7791_CLK_IRQC>;
};
dmac0: dma-controller@e6700000 {
@@ -1160,6 +1161,14 @@
"mmcif0", "i2c7", "pciec", "i2c8", "ssusb", "cmt1",
"usbdmac0", "usbdmac1";
};
+ mstp4_clks: mstp4_clks@e6150140 {
+ compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+ reg = <0 0xe6150140 0 4>, <0 0xe615004c 0 4>;
+ clocks = <&cp_clk>;
+ #clock-cells = <1>;
+ clock-indices = <R8A7791_CLK_IRQC>;
+ clock-output-names = "irqc";
+ };
mstp5_clks: mstp5_clks@e6150144 {
compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h
index 8fc5dc8faeea4051..402268384b99093c 100644
--- a/include/dt-bindings/clock/r8a7791-clock.h
+++ b/include/dt-bindings/clock/r8a7791-clock.h
@@ -70,6 +70,9 @@
#define R8A7791_CLK_USBDMAC0 30
#define R8A7791_CLK_USBDMAC1 31
+/* MSTP4 */
+#define R8A7791_CLK_IRQC 7
+
/* MSTP5 */
#define R8A7791_CLK_AUDIO_DMAC1 1
#define R8A7791_CLK_AUDIO_DMAC0 2
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 7/7] ARM: shmobile: r8a7794: Add IRQC clock to device tree
2015-03-18 18:55 [PATCH 0/7] ARM: shmobile: Add IRQC clock to device tree Geert Uytterhoeven
` (5 preceding siblings ...)
2015-03-18 18:56 ` [PATCH 6/7] ARM: shmobile: r8a7791: " Geert Uytterhoeven
@ 2015-03-18 18:56 ` Geert Uytterhoeven
2015-03-19 1:43 ` [PATCH 0/7] ARM: shmobile: " Simon Horman
2015-03-23 10:09 ` Jason Cooper
8 siblings, 0 replies; 15+ messages in thread
From: Geert Uytterhoeven @ 2015-03-18 18:56 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Simon Horman, Magnus Damm
Cc: linux-sh, devicetree, linux-pm, linux-kernel, Geert Uytterhoeven
Link the external IRQ controller irqc0 to the IRQC module clock, so it
can be power managed using that clock.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/arm/boot/dts/r8a7794.dtsi | 9 +++++++++
include/dt-bindings/clock/r8a7794-clock.h | 3 +++
2 files changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index 7a3ffa51a8bf2c8b..01cf54f70501e8c2 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -105,6 +105,7 @@
<0 15 IRQ_TYPE_LEVEL_HIGH>,
<0 16 IRQ_TYPE_LEVEL_HIGH>,
<0 17 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp4_clks R8A7794_CLK_IRQC>;
};
dmac0: dma-controller@e6700000 {
@@ -625,6 +626,14 @@
"sdhi2", "sdhi1", "sdhi0",
"mmcif0", "cmt1", "usbdmac0", "usbdmac1";
};
+ mstp4_clks: mstp4_clks@e6150140 {
+ compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
+ reg = <0 0xe6150140 0 4>, <0 0xe615004c 0 4>;
+ clocks = <&cp_clk>;
+ #clock-cells = <1>;
+ clock-indices = <R8A7794_CLK_IRQC>;
+ clock-output-names = "irqc";
+ };
mstp7_clks: mstp7_clks@e615014c {
compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
diff --git a/include/dt-bindings/clock/r8a7794-clock.h b/include/dt-bindings/clock/r8a7794-clock.h
index d63323032d6ef80e..09da38a58776b403 100644
--- a/include/dt-bindings/clock/r8a7794-clock.h
+++ b/include/dt-bindings/clock/r8a7794-clock.h
@@ -60,6 +60,9 @@
#define R8A7794_CLK_USBDMAC0 30
#define R8A7794_CLK_USBDMAC1 31
+/* MSTP4 */
+#define R8A7794_CLK_IRQC 7
+
/* MSTP5 */
#define R8A7794_CLK_THERMAL 22
#define R8A7794_CLK_PWM 23
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 0/7] ARM: shmobile: Add IRQC clock to device tree
2015-03-18 18:55 [PATCH 0/7] ARM: shmobile: Add IRQC clock to device tree Geert Uytterhoeven
` (6 preceding siblings ...)
2015-03-18 18:56 ` [PATCH 7/7] ARM: shmobile: r8a7794: " Geert Uytterhoeven
@ 2015-03-19 1:43 ` Simon Horman
[not found] ` <20150319014328.GJ14051-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2015-03-23 10:09 ` Jason Cooper
8 siblings, 1 reply; 15+ messages in thread
From: Simon Horman @ 2015-03-19 1:43 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Thomas Gleixner, Jason Cooper, Magnus Damm, linux-sh, devicetree,
linux-pm, linux-kernel
Thanks Geert,
On Wed, Mar 18, 2015 at 07:55:54PM +0100, Geert Uytterhoeven wrote:
> Hi,
>
> This patch series adds the IRQC clock to the device tree on SoCs that
> have such a clock (r8a73a4 and r8a779x), and adds mininal runtime PM
> support to the renesas-irqc driver, to make sure the clock is enabled
> when needed by the external IRQ controller(s).
> Before, the clock was assumed enabled by the bootloader or reset state.
>
> As usual when involving clocks, the DTS changes depend stricly on the
> driver changes. Else the clock will be disabled as assumed unused,
> breaking the boot.
>
> This was tested on r8a73a4/ape6evm and r8a7791/koelsch.
I will defer the DTS changes until the irqchip changes, which I
have reviewed, are accepted.
>
> Thanks!
>
> Geert Uytterhoeven (7):
> irqchip: renesas-irqc: Add more register documentation
> irqchip: renesas-irqc: Add minimal runtime PM support
> irqchip: renesas-irqc: Add functional clock to bindings
> ARM: shmobile: r8a7734: Add IRQC clock to device tree
> ARM: shmobile: r8a7790: Add IRQC clock to device tree
> ARM: shmobile: r8a7791: Add IRQC clock to device tree
> ARM: shmobile: r8a7794: Add IRQC clock to device tree
>
> .../bindings/interrupt-controller/renesas,irqc.txt | 4 +++-
> arch/arm/boot/dts/r8a73a4.dtsi | 11 +++++----
> arch/arm/boot/dts/r8a7790.dtsi | 9 +++++++
> arch/arm/boot/dts/r8a7791.dtsi | 9 +++++++
> arch/arm/boot/dts/r8a7794.dtsi | 9 +++++++
> drivers/irqchip/irq-renesas-irqc.c | 28 ++++++++++++++++++----
> include/dt-bindings/clock/r8a73a4-clock.h | 1 +
> include/dt-bindings/clock/r8a7790-clock.h | 3 +++
> include/dt-bindings/clock/r8a7791-clock.h | 3 +++
> include/dt-bindings/clock/r8a7794-clock.h | 3 +++
> 10 files changed, 70 insertions(+), 10 deletions(-)
>
> --
> 1.9.1
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 0/7] ARM: shmobile: Add IRQC clock to device tree
2015-03-18 18:55 [PATCH 0/7] ARM: shmobile: Add IRQC clock to device tree Geert Uytterhoeven
` (7 preceding siblings ...)
2015-03-19 1:43 ` [PATCH 0/7] ARM: shmobile: " Simon Horman
@ 2015-03-23 10:09 ` Jason Cooper
8 siblings, 0 replies; 15+ messages in thread
From: Jason Cooper @ 2015-03-23 10:09 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Thomas Gleixner, Simon Horman, Magnus Damm, linux-sh, devicetree,
linux-pm, linux-kernel
Geert,
On Wed, Mar 18, 2015 at 07:55:54PM +0100, Geert Uytterhoeven wrote:
> Hi,
>
> This patch series adds the IRQC clock to the device tree on SoCs that
> have such a clock (r8a73a4 and r8a779x), and adds mininal runtime PM
> support to the renesas-irqc driver, to make sure the clock is enabled
> when needed by the external IRQ controller(s).
> Before, the clock was assumed enabled by the bootloader or reset state.
>
> As usual when involving clocks, the DTS changes depend stricly on the
> driver changes. Else the clock will be disabled as assumed unused,
> breaking the boot.
>
> This was tested on r8a73a4/ape6evm and r8a7791/koelsch.
>
> Thanks!
>
> Geert Uytterhoeven (7):
> irqchip: renesas-irqc: Add more register documentation
> irqchip: renesas-irqc: Add minimal runtime PM support
> irqchip: renesas-irqc: Add functional clock to bindings
> ARM: shmobile: r8a7734: Add IRQC clock to device tree
> ARM: shmobile: r8a7790: Add IRQC clock to device tree
> ARM: shmobile: r8a7791: Add IRQC clock to device tree
> ARM: shmobile: r8a7794: Add IRQC clock to device tree
>
> .../bindings/interrupt-controller/renesas,irqc.txt | 4 +++-
> arch/arm/boot/dts/r8a73a4.dtsi | 11 +++++----
> arch/arm/boot/dts/r8a7790.dtsi | 9 +++++++
> arch/arm/boot/dts/r8a7791.dtsi | 9 +++++++
> arch/arm/boot/dts/r8a7794.dtsi | 9 +++++++
> drivers/irqchip/irq-renesas-irqc.c | 28 ++++++++++++++++++----
> include/dt-bindings/clock/r8a73a4-clock.h | 1 +
> include/dt-bindings/clock/r8a7790-clock.h | 3 +++
> include/dt-bindings/clock/r8a7791-clock.h | 3 +++
> include/dt-bindings/clock/r8a7794-clock.h | 3 +++
> 10 files changed, 70 insertions(+), 10 deletions(-)
Patches 1 - 3 applied to irqchip/renesas with Simon's Reviewed-by.
I'll give it a few days in -next, then merge it into irqchip/core. I'll leave
the branch up for you to base the rest of the series against.
thx,
Jason.
^ permalink raw reply [flat|nested] 15+ messages in thread