CCF support for Renesas r7s72100
Subsystems (7)
v6 cover CCF support for Renesas r7s72100
This series moves the r7s72100 platfrom from the legacy clock implementation to the common clock framework.
This series has been tested with the renesas-devel-v3.15-rc2-20140428 tag. If you want to boot into a console, you have a runtime dependency [1] which is expected to go away in 3.15-rc6.
Changes since V5:
* rebased and tested against latest renesas/devel-tag (with and without CCF)
* added acks
* added the patch from Geert, and folded another into the series
PS: A tree can be found here with this series and the dependency patch:
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/r7s-ccf
[1] http://www.spinics.net/lists/linux-sh/msg30918.html (clk: shmobile: clk-mstp: change to using clock-indices)
Geert Uytterhoeven (1):
ARM: shmobile: Add forward declaration of struct clk to silence
warning
Wolfram Sang (11):
ARM: shmobile: r7s72100: document MSTP clock support
ARM: shmobile: r7s72100: add essential clock nodes to dtsi
ARM: shmobile: r7s72100: genmai: populate nodes for external clocks
ARM: shmobile: r7s72100: add scif nodes to dtsi
ARM: shmobile: r7s72100: genmai: add uart alias and activate scif2 as
console
ARM: shmobile: r7s72100: genmai: platform scif devices only for legacy
support
ARM: shmobile: r7s72100: add i2c clocks to dtsi
ARM: shmobile: r7s72100: remove I2C DT clocks from legacy clock
support
ARM: shmobile: r7s72100: add spi clocks to dtsi
ARM: shmobile: r7s72100: remove SPI DT clocks from legacy clock
support
ARM: shmobile: r7s72100: use workaround for non DT-clocks
.../bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + arch/arm/boot/dts/r7s72100-genmai-reference.dts | 19 +- arch/arm/boot/dts/r7s72100.dtsi | 215 ++++++++++++++++++++- arch/arm/mach-shmobile/board-genmai-reference.c | 14 +- arch/arm/mach-shmobile/board-genmai.c | 44 +++++ arch/arm/mach-shmobile/clock-r7s72100.c | 9 - arch/arm/mach-shmobile/include/mach/clock.h | 1 + arch/arm/mach-shmobile/setup-r7s72100.c | 43 ----- include/dt-bindings/clock/r7s72100-clock.h | 41 ++++ 9 files changed, 331 insertions(+), 56 deletions(-) create mode 100644 include/dt-bindings/clock/r7s72100-clock.h
Signature · 1 line
1.9.2
PATCH v6 1/12 ARM: shmobile: r7s72100: document MSTP clock support
From: Wolfram Sang <[email protected]>
--- Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +1 -0
@@ -10,6 +10,7 @@ index in the group, from 0 to 31. Required Properties: - compatible: Must be one of the following + - "renesas,r7s72100-mstp-clocks" for R7S72100 (RZ) MSTP gate clocks - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks - "renesas,cpg-mstp-clock" for generic MSTP gate clocks
Signature · 1 line
1.9.2
PATCH v6 2/12 ARM: shmobile: r7s72100: add essential clock nodes to dtsi
In reply to Wolfram SangFrom: Wolfram Sang <[email protected]>
Only essential clocks are added for now. Other clocks will be added when needed.
--- arch/arm/boot/dts/r7s72100.dtsi | 86 +++++++++++++++++++++++++++++- include/dt-bindings/clock/r7s72100-clock.h | 28 ++++++++++ 2 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/clock/r7s72100-clock.h
arch/arm/boot/dts/r7s72100.dtsi +85 -1
@@ -1,13 +1,15 @@ /* * Device Tree Source for the r7s72100 SoC * - * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013-14 Renesas Solutions Corp. + * Copyright (C) 2014 Wolfram Sang, Sang Engineering <[email protected]> * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any * kind, whether express or implied. */ +#include <dt-bindings/clock/r7s72100-clock.h> #include <dt-bindings/interrupt-controller/irq.h> / {
@@ -28,6 +30,88 @@ spi4 = &spi4; }; + clocks { + ranges; + #address-cells = <1>; + #size-cells = <1>; + + /* External clocks */ + extal_clk: extal_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + /* If clk present, value must be set by board */ + clock-frequency = <0>; + clock-output-names = "extal"; + }; + + usb_x1_clk: usb_x1_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + /* If clk present, value must be set by board */ + clock-frequency = <0>; + clock-output-names = "usb_x1"; + }; + + /* Special CPG clocks */ + cpg_clocks: cpg_clocks at fcfe0000 { + #clock-cells = <1>; + compatible = "renesas,r7s72100-cpg-clocks", + "renesas,rz-cpg-clocks"; + reg = <0xfcfe0000 0x18>; + clocks = <&extal_clk>, <&usb_x1_clk>; + clock-output-names = "pll", "i", "g"; + }; + + /* Fixed factor clocks */ + b_clk: b_clk { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&cpg_clocks R7S72100_CLK_PLL>; + clock-mult = <1>; + clock-div = <3>; + clock-output-names = "b"; + }; + p1_clk: p1_clk { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&cpg_clocks R7S72100_CLK_PLL>; + clock-mult = <1>; + clock-div = <6>; + clock-output-names = "p1"; + }; + p0_clk: p0_clk { + #clock-cells = <0>; + compatible = "fixed-factor-clock"; + clocks = <&cpg_clocks R7S72100_CLK_PLL>; + clock-mult = <1>; + clock-div = <12>; + clock-output-names = "p0"; + }; + + /* MSTP clocks */ + mstp3_clks: mstp3_clks at fcfe0420 { + #clock-cells = <1>; + compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks"; + reg = <0xfcfe0420 4>; + clocks = <&p0_clk>; + clock-indices = <R7S72100_CLK_MTU2>; + clock-output-names = "mtu2"; + }; + + mstp4_clks: mstp4_clks at fcfe0424 { + #clock-cells = <1>; + compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks"; + reg = <0xfcfe0424 4>; + clocks = <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>, + <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>; + clock-indices = < + R7S72100_CLK_SCIF0 R7S72100_CLK_SCIF1 R7S72100_CLK_SCIF2 R7S72100_CLK_SCIF3 + R7S72100_CLK_SCIF4 R7S72100_CLK_SCIF5 R7S72100_CLK_SCIF6 R7S72100_CLK_SCIF7 + >; + clock-output-names = "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scif6", "scif7"; + }; + }; + cpus { #address-cells = <1>; #size-cells = <0>;
include/dt-bindings/clock/r7s72100-clock.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* Copyright (C) 2014 Renesas Solutions Corp. +* Copyright (C) 2014 Wolfram Sang, Sang Engineering <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; version 2 of the License. +*/ + +#ifndef __DT_BINDINGS_CLOCK_R7S72100_H__ +#define __DT_BINDINGS_CLOCK_R7S72100_H__ + +#define R7S72100_CLK_PLL 0 + +/* MSTP3 */ +#define R7S72100_CLK_MTU2 3 + +/* MSTP4 */ +#define R7S72100_CLK_SCIF0 7 +#define R7S72100_CLK_SCIF1 6 +#define R7S72100_CLK_SCIF2 5 +#define R7S72100_CLK_SCIF3 4 +#define R7S72100_CLK_SCIF4 3 +#define R7S72100_CLK_SCIF5 2 +#define R7S72100_CLK_SCIF6 1 +#define R7S72100_CLK_SCIF7 0 + +#endif /* __DT_BINDINGS_CLOCK_R7S72100_H__ */
Signature · 1 line
1.9.2
PATCH v6 3/12 ARM: shmobile: r7s72100: genmai: populate nodes for external clocks
In reply to Wolfram SangFrom: Wolfram Sang <[email protected]>
--- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/r7s72100-genmai-reference.dts +8 -0
@@ -30,6 +30,14 @@ }; }; +&extal_clk { + clock-frequency = <13330000>; +}; + +&usb_x1_clk { + clock-frequency = <48000000>; +}; + &i2c2 { status = "okay"; clock-frequency = <400000>;
Signature · 1 line
1.9.2
PATCH v6 4/12 ARM: shmobile: r7s72100: add scif nodes to dtsi
In reply to Wolfram SangFrom: Wolfram Sang <[email protected]>
--- arch/arm/boot/dts/r7s72100.dtsi | 96 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+)
arch/arm/boot/dts/r7s72100.dtsi +96 -0
@@ -200,6 +200,102 @@ status = "disabled"; }; + scif0: serial at e8007000 { + compatible = "renesas,scif-r7s72100", "renesas,scif"; + reg = <0xe8007000 64>; + interrupts = <0 190 IRQ_TYPE_LEVEL_HIGH>, + <0 191 IRQ_TYPE_LEVEL_HIGH>, + <0 192 IRQ_TYPE_LEVEL_HIGH>, + <0 189 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp4_clks R7S72100_CLK_SCIF0>; + clock-names = "sci_ick"; + status = "disabled"; + }; + + scif1: serial at e8007800 { + compatible = "renesas,scif-r7s72100", "renesas,scif"; + reg = <0xe8007800 64>; + interrupts = <0 194 IRQ_TYPE_LEVEL_HIGH>, + <0 195 IRQ_TYPE_LEVEL_HIGH>, + <0 196 IRQ_TYPE_LEVEL_HIGH>, + <0 193 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp4_clks R7S72100_CLK_SCIF1>; + clock-names = "sci_ick"; + status = "disabled"; + }; + + scif2: serial at e8008000 { + compatible = "renesas,scif-r7s72100", "renesas,scif"; + reg = <0xe8008000 64>; + interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>, + <0 199 IRQ_TYPE_LEVEL_HIGH>, + <0 200 IRQ_TYPE_LEVEL_HIGH>, + <0 197 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp4_clks R7S72100_CLK_SCIF2>; + clock-names = "sci_ick"; + status = "disabled"; + }; + + scif3: serial at e8008800 { + compatible = "renesas,scif-r7s72100", "renesas,scif"; + reg = <0xe8008800 64>; + interrupts = <0 202 IRQ_TYPE_LEVEL_HIGH>, + <0 203 IRQ_TYPE_LEVEL_HIGH>, + <0 204 IRQ_TYPE_LEVEL_HIGH>, + <0 201 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp4_clks R7S72100_CLK_SCIF3>; + clock-names = "sci_ick"; + status = "disabled"; + }; + + scif4: serial at e8009000 { + compatible = "renesas,scif-r7s72100", "renesas,scif"; + reg = <0xe8009000 64>; + interrupts = <0 206 IRQ_TYPE_LEVEL_HIGH>, + <0 207 IRQ_TYPE_LEVEL_HIGH>, + <0 208 IRQ_TYPE_LEVEL_HIGH>, + <0 205 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp4_clks R7S72100_CLK_SCIF4>; + clock-names = "sci_ick"; + status = "disabled"; + }; + + scif5: serial at e8009800 { + compatible = "renesas,scif-r7s72100", "renesas,scif"; + reg = <0xe8009800 64>; + interrupts = <0 210 IRQ_TYPE_LEVEL_HIGH>, + <0 211 IRQ_TYPE_LEVEL_HIGH>, + <0 212 IRQ_TYPE_LEVEL_HIGH>, + <0 209 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp4_clks R7S72100_CLK_SCIF5>; + clock-names = "sci_ick"; + status = "disabled"; + }; + + scif6: serial at e800a000 { + compatible = "renesas,scif-r7s72100", "renesas,scif"; + reg = <0xe800a000 64>; + interrupts = <0 214 IRQ_TYPE_LEVEL_HIGH>, + <0 215 IRQ_TYPE_LEVEL_HIGH>, + <0 216 IRQ_TYPE_LEVEL_HIGH>, + <0 213 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp4_clks R7S72100_CLK_SCIF6>; + clock-names = "sci_ick"; + status = "disabled"; + }; + + scif7: serial at e800a800 { + compatible = "renesas,scif-r7s72100", "renesas,scif"; + reg = <0xe800a800 64>; + interrupts = <0 218 IRQ_TYPE_LEVEL_HIGH>, + <0 219 IRQ_TYPE_LEVEL_HIGH>, + <0 220 IRQ_TYPE_LEVEL_HIGH>, + <0 217 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp4_clks R7S72100_CLK_SCIF7>; + clock-names = "sci_ick"; + status = "disabled"; + }; + spi0: spi at e800c800 { compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz"; reg = <0xe800c800 0x24>;
Signature · 1 line
1.9.2
PATCH v6 5/12 ARM: shmobile: r7s72100: genmai: add uart alias and activate scif2 as console
In reply to Wolfram SangFrom: Wolfram Sang <[email protected]>
We keep the UART naming backwards compatible with the legacy version.
--- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
arch/arm/boot/dts/r7s72100-genmai-reference.dts +10 -1
@@ -1,7 +1,8 @@ /* * Device Tree Source for the Genmai board * - * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013-14 Renesas Solutions Corp. + * Copyright (C) 2014 Wolfram Sang, Sang Engineering <[email protected]> * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any
@@ -15,6 +16,10 @@ model = "Genmai"; compatible = "renesas,genmai-reference", "renesas,r7s72100"; + aliases { + serial2 = &scif2; + }; + chosen { bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; };
@@ -48,3 +53,7 @@ pagesize = <64>; }; }; + +&scif2 { + status = "okay"; +};
Signature · 1 line
1.9.2
PATCH v6 6/12 ARM: shmobile: r7s72100: genmai: platform scif devices only for legacy support
In reply to Wolfram SangFrom: Wolfram Sang <[email protected]>
We have now DT support for SCIF, so use the platform_device initialization only for the legacy support.
--- arch/arm/mach-shmobile/board-genmai.c | 44 +++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/setup-r7s72100.c | 43 -------------------------------- 2 files changed, 44 insertions(+), 43 deletions(-)
arch/arm/mach-shmobile/board-genmai.c +44 -0
@@ -21,6 +21,7 @@#include <linux/kernel.h> #include <linux/platform_device.h> +#include <linux/serial_sci.h> #include <linux/sh_eth.h> #include <linux/spi/rspi.h> #include <linux/spi/spi.h>
@@ -89,6 +90,40 @@ static const struct spi_board_info spi_info[] __initconst = { }, }; +/* SCIF */ +#define R7S72100_SCIF (index, baseaddr, irq) \ +static const struct plat_sci_port scif##index##_platform_data = { \ + .type = PORT_SCIF, \ + .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, \ + .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ + .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | \ + SCSCR_REIE, \ +}; \ + \ +static struct resource scif##index##_resources[] = { \ + DEFINE_RES_MEM(baseaddr, 0x100), \ + DEFINE_RES_IRQ(irq + 1), \ + DEFINE_RES_IRQ(irq + 2), \ + DEFINE_RES_IRQ(irq + 3), \ + DEFINE_RES_IRQ(irq), \ +} \ + +R7S72100_SCIF (0 ,0xe8007000 ,gic_iid (221 )); +R7S72100_SCIF (1 ,0xe8007800 ,gic_iid (225 )); +R7S72100_SCIF (2 ,0xe8008000 ,gic_iid (229 )); +R7S72100_SCIF (3 ,0xe8008800 ,gic_iid (233 )); +R7S72100_SCIF (4 ,0xe8009000 ,gic_iid (237 )); +R7S72100_SCIF (5 ,0xe8009800 ,gic_iid (241 )); +R7S72100_SCIF (6 ,0xe800a000 ,gic_iid (245 )); +R7S72100_SCIF (7 ,0xe800a800 ,gic_iid (249 )); + +#define r7s72100_register_scif (index) \ + platform_device_register_resndata(&platform_bus, "sh-sci", index, \ + scif##index##_resources, \ + ARRAY_SIZE(scif##index##_resources), \ + &scif##index##_platform_data, \ + sizeof(scif##index##_platform_data)) +static void __init genmai_add_standard_devices (void ) {r7s72100_clock_init ();
@@ -102,6 +137,15 @@ static void __init genmai_add_standard_devices(void)r7s72100_register_rspi (3 );r7s72100_register_rspi (4 );spi_register_board_info (spi_info,ARRAY_SIZE (spi_info)); + +r7s72100_register_scif (0 ); +r7s72100_register_scif (1 ); +r7s72100_register_scif (2 ); +r7s72100_register_scif (3 ); +r7s72100_register_scif (4 ); +r7s72100_register_scif (5 ); +r7s72100_register_scif (6 ); +r7s72100_register_scif (7 ); }static const char *const genmai_boards_compat_dt[]__initconst = {
arch/arm/mach-shmobile/setup-r7s72100.c +0 -43
61 lines not on this page · raw message
Signature · 1 line
1.9.2
PATCH v6 7/12 ARM: shmobile: r7s72100: add i2c clocks to dtsi
In reply to Wolfram SangFrom: Wolfram Sang <[email protected]>
--- arch/arm/boot/dts/r7s72100.dtsi | 15 +++++++++++++++ include/dt-bindings/clock/r7s72100-clock.h | 6 ++++++ 2 files changed, 21 insertions(+)
arch/arm/boot/dts/r7s72100.dtsi +15 -0
@@ -110,6 +110,17 @@ >; clock-output-names = "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scif6", "scif7"; }; + + mstp9_clks: mstp9_clks at fcfe0438 { + #clock-cells = <1>; + compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks"; + reg = <0xfcfe0438 4>; + clocks = <&p0_clk>, <&p0_clk>, <&p0_clk>, <&p0_clk>; + clock-indices = < + R7S72100_CLK_I2C0 R7S72100_CLK_I2C1 R7S72100_CLK_I2C2 R7S72100_CLK_I2C3 + >; + clock-output-names = "i2c0", "i2c1", "i2c2", "i2c3"; + }; }; cpus {
@@ -145,6 +156,7 @@ <0 162 IRQ_TYPE_LEVEL_HIGH>, <0 163 IRQ_TYPE_LEVEL_HIGH>, <0 164 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R7S72100_CLK_I2C0>; clock-frequency = <100000>; status = "disabled"; };
@@ -162,6 +174,7 @@ <0 170 IRQ_TYPE_LEVEL_HIGH>, <0 171 IRQ_TYPE_LEVEL_HIGH>, <0 172 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R7S72100_CLK_I2C1>; clock-frequency = <100000>; status = "disabled"; };
@@ -179,6 +192,7 @@ <0 178 IRQ_TYPE_LEVEL_HIGH>, <0 179 IRQ_TYPE_LEVEL_HIGH>, <0 180 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R7S72100_CLK_I2C2>; clock-frequency = <100000>; status = "disabled"; };
@@ -196,6 +210,7 @@ <0 186 IRQ_TYPE_LEVEL_HIGH>, <0 187 IRQ_TYPE_LEVEL_HIGH>, <0 188 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp9_clks R7S72100_CLK_I2C3>; clock-frequency = <100000>; status = "disabled"; };
include/dt-bindings/clock/r7s72100-clock.h +6 -0
@@ -25,4 +25,10 @@#define R7S72100_CLK_SCIF6 1#define R7S72100_CLK_SCIF7 0 +/* MSTP9 */ +#define R7S72100_CLK_I2C0 7 +#define R7S72100_CLK_I2C1 6 +#define R7S72100_CLK_I2C2 5 +#define R7S72100_CLK_I2C3 4 +#endif /* __DT_BINDINGS_CLOCK_R7S72100_H__ */
Signature · 1 line
1.9.2
PATCH v6 8/12 ARM: shmobile: r7s72100: remove I2C DT clocks from legacy clock support
In reply to Wolfram SangFrom: Wolfram Sang <[email protected]>
Not used anymore since we switched to CCF.
--- arch/arm/mach-shmobile/clock-r7s72100.c | 4 ---- 1 file changed, 4 deletions(-)
arch/arm/mach-shmobile/clock-r7s72100.c +0 -4
@@ -199,10 +199,6 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("e800d800.spi" , &mstp_clks[MSTP105 ]),CLKDEV_DEV_ID ("e800e000.spi" , &mstp_clks[MSTP104 ]),CLKDEV_DEV_ID ("e800e800.spi" , &mstp_clks[MSTP103 ]), -CLKDEV_DEV_ID ("fcfee000.i2c" , &mstp_clks[MSTP97 ]), -CLKDEV_DEV_ID ("fcfee400.i2c" , &mstp_clks[MSTP96 ]), -CLKDEV_DEV_ID ("fcfee800.i2c" , &mstp_clks[MSTP95 ]), -CLKDEV_DEV_ID ("fcfeec00.i2c" , &mstp_clks[MSTP94 ]), CLKDEV_DEV_ID("r7s72100-ether", &mstp_clks[MSTP74]),/* ICK */
Signature · 1 line
1.9.2
PATCH v6 9/12 ARM: shmobile: r7s72100: add spi clocks to dtsi
In reply to Wolfram SangFrom: Wolfram Sang <[email protected]>
--- arch/arm/boot/dts/r7s72100.dtsi | 18 ++++++++++++++++++ include/dt-bindings/clock/r7s72100-clock.h | 7 +++++++ 2 files changed, 25 insertions(+)
arch/arm/boot/dts/r7s72100.dtsi +18 -0
@@ -121,6 +121,19 @@ >; clock-output-names = "i2c0", "i2c1", "i2c2", "i2c3"; }; + + mstp10_clks: mstp10_clks at fcfe043c { + #clock-cells = <1>; + compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks"; + reg = <0xfcfe043c 4>; + clocks = <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>, + <&p1_clk>; + clock-indices = < + R7S72100_CLK_SPI0 R7S72100_CLK_SPI1 R7S72100_CLK_SPI2 R7S72100_CLK_SPI3 + R7S72100_CLK_SPI4 + >; + clock-output-names = "spi0", "spi1", "spi2", "spi3", "spi4"; + }; }; cpus {
@@ -318,6 +331,7 @@ <0 239 IRQ_TYPE_LEVEL_HIGH>, <0 240 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "error", "rx", "tx"; + clocks = <&mstp10_clks R7S72100_CLK_SPI0>; num-cs = <1>; #address-cells = <1>; #size-cells = <0>;
@@ -331,6 +345,7 @@ <0 242 IRQ_TYPE_LEVEL_HIGH>, <0 243 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "error", "rx", "tx"; + clocks = <&mstp10_clks R7S72100_CLK_SPI1>; num-cs = <1>; #address-cells = <1>; #size-cells = <0>;
@@ -344,6 +359,7 @@ <0 245 IRQ_TYPE_LEVEL_HIGH>, <0 246 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "error", "rx", "tx"; + clocks = <&mstp10_clks R7S72100_CLK_SPI2>; num-cs = <1>; #address-cells = <1>; #size-cells = <0>;
@@ -357,6 +373,7 @@ <0 248 IRQ_TYPE_LEVEL_HIGH>, <0 249 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "error", "rx", "tx"; + clocks = <&mstp10_clks R7S72100_CLK_SPI3>; num-cs = <1>; #address-cells = <1>; #size-cells = <0>;
@@ -370,6 +387,7 @@ <0 251 IRQ_TYPE_LEVEL_HIGH>, <0 252 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "error", "rx", "tx"; + clocks = <&mstp10_clks R7S72100_CLK_SPI4>; num-cs = <1>; #address-cells = <1>; #size-cells = <0>;
include/dt-bindings/clock/r7s72100-clock.h +7 -0
@@ -31,4 +31,11 @@#define R7S72100_CLK_I2C2 5#define R7S72100_CLK_I2C3 4 +/* MSTP10 */ +#define R7S72100_CLK_SPI0 7 +#define R7S72100_CLK_SPI1 6 +#define R7S72100_CLK_SPI2 5 +#define R7S72100_CLK_SPI3 4 +#define R7S72100_CLK_SPI4 3 +#endif /* __DT_BINDINGS_CLOCK_R7S72100_H__ */
Signature · 1 line
1.9.2
PATCH v6 10/12 ARM: shmobile: r7s72100: remove SPI DT clocks from legacy clock support
In reply to Wolfram SangFrom: Wolfram Sang <[email protected]>
Not used anymore since we switched to CCF.
--- arch/arm/mach-shmobile/clock-r7s72100.c | 5 ----- 1 file changed, 5 deletions(-)
arch/arm/mach-shmobile/clock-r7s72100.c +0 -5
@@ -194,11 +194,6 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("rspi-rz.2" , &mstp_clks[MSTP105 ]),CLKDEV_DEV_ID ("rspi-rz.3" , &mstp_clks[MSTP104 ]),CLKDEV_DEV_ID ("rspi-rz.4" , &mstp_clks[MSTP103 ]), -CLKDEV_DEV_ID ("e800c800.spi" , &mstp_clks[MSTP107 ]), -CLKDEV_DEV_ID ("e800d000.spi" , &mstp_clks[MSTP106 ]), -CLKDEV_DEV_ID ("e800d800.spi" , &mstp_clks[MSTP105 ]), -CLKDEV_DEV_ID ("e800e000.spi" , &mstp_clks[MSTP104 ]), -CLKDEV_DEV_ID ("e800e800.spi" , &mstp_clks[MSTP103 ]), CLKDEV_DEV_ID("r7s72100-ether", &mstp_clks[MSTP74]),/* ICK */
Signature · 1 line
1.9.2
PATCH v6 11/12 ARM: shmobile: r7s72100: use workaround for non DT-clocks
In reply to Wolfram SangFrom: Wolfram Sang <[email protected]>
MTU2 is not yet prepared for DT usage, so use the common workaround via clkdev for now.
--- arch/arm/mach-shmobile/board-genmai-reference.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
arch/arm/mach-shmobile/board-genmai-reference.c +12 -2
@@ -18,18 +18,28 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/clk-provider.h> #include <linux/kernel.h> #include <linux/of_platform.h> +#include <mach/clock.h> #include <mach/common.h> #include <mach/r7s72100.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> +#ifdef CONFIG_COMMON_CLK +/* +* This is a really crude hack to provide clkdev support to platform +* devices until they get moved to DT. +*/ +static const struct clk_name clk_names[] = { + {"mtu2" ,"fck" ,"sh-mtu2" }, +}; +#endif +static void __init genmai_add_standard_devices (void ) {#ifdef CONFIG_COMMON_CLK -of_clk_init (NULL ); +shmobile_clk_workaround (clk_names,ARRAY_SIZE (clk_names), true);#else r7s72100_clock_init ();#endif
Signature · 1 line
1.9.2
PATCH v6 12/12 ARM: shmobile: Add forward declaration of struct clk to silence warning
In reply to Wolfram SangFrom: Geert Uytterhoeven <[email protected]>
arch/arm/mach-shmobile/board-genmai-reference.c:23:0:arch/arm/mach-shmobile/include/mach/clock.h:19:54: warning: 'struct clk' declared inside parameter list [enabled by default] arch/arm/mach-shmobile/include/mach/clock.h:19:54: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
--- arch/arm/mach-shmobile/include/mach/clock.h | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-shmobile/include/mach/clock.h +1 -0
@@ -16,6 +16,7 @@ void shmobile_clk_workaround(const struct clk_name *clks, int nr_clks,#else /* CONFIG_COMMON_CLK */ /* legacy clock implementation */ +struct clk ;unsigned long shmobile_fixed_ratio_clk_recalc (struct clk *clk);extern struct sh_clk_ops shmobile_fixed_ratio_clk_ops;
Signature · 1 line
1.9.2
v6 cover CCF support for Renesas r7s72100
In reply to Wolfram SangQuoted 16 lines · Wolfram Sang
This series moves the r7s72100 platfrom from the legacy clock implementation to the common clock framework.
This series has been tested with the renesas-devel-v3.15-rc2-20140428 tag. If you want to boot into a console, you have a runtime dependency [1] which is expected to go away in 3.15-rc6.
Changes since V5:
* rebased and tested against latest renesas/devel-tag (with and without CCF)
* added acks
* added the patch from Geert, and folded another into the seriesPS: A tree can be found here with this series and the dependency patch:
Quoted 7 lines
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.gitrenesas/r7s-ccf[1] http://www.spinics.net/lists/linux-sh/msg30918.html (clk: shmobile: clk-mstp: change to using clock-indices)
Geert Uytterhoeven (1):
ARM: shmobile: Add forward declaration of struct clk to silence
warning
Thanks, I have queued up this series.
v6 cover CCF support for Renesas r7s72100
Quoted 2 lines
Quoted 2 lines
This series has been tested with the renesas-devel-v3.15-rc2-20140428 tag. If
Just for completeness: The above mentioned tag was outdated. It was tested against "renesas-devel-v3.15-rc5-20140513v2"
Quoted 1 line
Thanks, I have queued up this series.
Thanks a ton!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140514/258524b7/attachment-0001.sig>
v6 cover CCF support for Renesas r7s72100
Quoted 5 lines · Wolfram Sang
Quoted 2 lines
Quoted 2 lines
This series has been tested with the renesas-devel-v3.15-rc2-20140428 tag. If
Just for completeness: The above mentioned tag was outdated. It was tested against "renesas-devel-v3.15-rc5-20140513v2"
Thanks.
Quoted 4 lines
Quoted 1 line
Thanks, I have queued up this series.
Thanks a ton!
v6 cover CCF support for Renesas r7s72100
In reply to Simon HormanHi Wolfram, Simon,
Quoted 4 lines · Simon Horman
Quoted 3 lines · Wolfram Sang
This series moves the r7s72100 platfrom from the legacy clock implementation to the common clock framework.
Quoted 8 lines
Quoted 8 lines
This series has been tested with the renesas-devel-v3.15-rc2-20140428 tag. If you want to boot into a console, you have a runtime dependency [1] which is expected to go away in 3.15-rc6.
Changes since V5:
* rebased and tested against latest renesas/devel-tag (with and without CCF)
That's genmai-legacy (ARCH_SHMOBILE_LEGACY=y, MACH_GENMAI=y), and genmai-multiplatform (ARCH_SHMOBILE_MULTI=y, MACH_GENMAI=y, right?
There's still a third variant: genmai-reference (ARCH_SHMOBILE_LEGACY=y, MACH_GENMAI_REFERENCE=y), which uses board-genmai-reference.c, but without CCF, i.e. with clock-r7s72100.c.
For that, you still need the legacy clocks (also for serial!), so I needed the (gmail-whitespace-damaged) temporary workaround below in my local tree.
Quoted 1 line
Thanks, I have queued up this series.
Do we want to go for the quick fix below, or just fix the issue for good, and merge genmai-reference and genmai-multiplatform now, just like we did for koelsch/lager?
I can send a proper patch for the quick fix, depending on your decision.
Quoted 1 line
From
1b7b851a5d1b7d10f42f68a35b65278827b03cc4Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <[email protected]>
Date: Mon, 12 May 2014 14:32:25 +0200
Subject: [PATCH] ARM: shmobile: genmai-reference: Re-add legacy clocks
genmai-reference still uses non-CCF, so it needs the legacy clocks
--- arch/arm/mach-shmobile/clock-r7s72100.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
(quoted diff) +0 -0
b/arch/arm/mach-shmobile/clock-r7s72100.c
index df187484de5d..1b677e0a69c6 100644
arch/arm/mach-shmobile/clock-r7s72100.c +10 -0
@@ -194,6 +194,16 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("rspi-rz.2" , &mstp_clks[MSTP105 ]),CLKDEV_DEV_ID ("rspi-rz.3" , &mstp_clks[MSTP104 ]),CLKDEV_DEV_ID ("rspi-rz.4" , &mstp_clks[MSTP103 ]), +CLKDEV_DEV_ID ("e800c800.spi" , &mstp_clks[MSTP107 ]), +CLKDEV_DEV_ID ("e800d000.spi" , &mstp_clks[MSTP106 ]), +CLKDEV_DEV_ID ("e800d800.spi" , &mstp_clks[MSTP105 ]), +CLKDEV_DEV_ID ("e800e000.spi" , &mstp_clks[MSTP104 ]), +CLKDEV_DEV_ID ("e800e800.spi" , &mstp_clks[MSTP103 ]), +CLKDEV_DEV_ID ("fcfee000.i2c" , &mstp_clks[MSTP97 ]), +CLKDEV_DEV_ID ("fcfee400.i2c" , &mstp_clks[MSTP96 ]), +CLKDEV_DEV_ID ("fcfee800.i2c" , &mstp_clks[MSTP95 ]), +CLKDEV_DEV_ID ("fcfeec00.i2c" , &mstp_clks[MSTP94 ]), +CLKDEV_DEV_ID ("e8008000.serial" , &mstp_clks[MSTP45 ]),CLKDEV_DEV_ID ("r7s72100-ether" , &mstp_clks[MSTP74 ]), /* ICK */
Signature · 12 lines
1.7.9.5
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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 Torvaldsv6 cover CCF support for Renesas r7s72100
Quoted 26 lines · Geert Uytterhoeven
Hi Wolfram, Simon,
Quoted 4 lines · Simon Horman
Quoted 3 lines · Wolfram Sang
This series moves the r7s72100 platfrom from the legacy clock implementation to the common clock framework.
Quoted 8 lines
Quoted 8 lines
This series has been tested with the renesas-devel-v3.15-rc2-20140428 tag. If you want to boot into a console, you have a runtime dependency [1] which is expected to go away in 3.15-rc6.
Changes since V5:
* rebased and tested against latest renesas/devel-tag (with and without CCF)
That's genmai-legacy (ARCH_SHMOBILE_LEGACY=y, MACH_GENMAI=y), and genmai-multiplatform (ARCH_SHMOBILE_MULTI=y, MACH_GENMAI=y, right?
There's still a third variant: genmai-reference (ARCH_SHMOBILE_LEGACY=y, MACH_GENMAI_REFERENCE=y), which uses
board-genmai-reference.c, but without CCF, i.e. withclock-r7s72100.c.
For that, you still need the legacy clocks (also for serial!), so I needed the (gmail-whitespace-damaged) temporary workaround below in my local tree.
Quoted 7 lines
Quoted 1 line
Thanks, I have queued up this series.
Do we want to go for the quick fix below, or just fix the issue for good, and merge genmai-reference and genmai-multiplatform now, just like we did for koelsch/lager?
I can send a proper patch for the quick fix, depending on your decision.
I do not feel particularly strongly about this. But it seems to me that it would make sense to take the same approach as koelsch and lager.
Quoted 48 lines
Quoted 1 line
From
1b7b851a5d1b7d10f42f68a35b65278827b03cc4Mon Sep 17 00:00:00 2001From: Geert Uytterhoeven <[email protected]>
Date: Mon, 12 May 2014 14:32:25 +0200
Subject: [PATCH] ARM: shmobile: genmai-reference: Re-add legacy clocksgenmai-reference still uses non-CCF, so it needs the legacy clocks
Signed-off-by Geert Uytterhoeven <[email protected]>--- arch/arm/mach-shmobile/clock-r7s72100.c | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm/mach-shmobile/clock-r7s72100.c +10
-0@@ -194,6 +194,16 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("rspi-rz.2" , &mstp_clks[MSTP105 ]),CLKDEV_DEV_ID ("rspi-rz.3" , &mstp_clks[MSTP104 ]),CLKDEV_DEV_ID ("rspi-rz.4" , &mstp_clks[MSTP103 ]), +CLKDEV_DEV_ID ("e800c800.spi" , &mstp_clks[MSTP107 ]), +CLKDEV_DEV_ID ("e800d000.spi" , &mstp_clks[MSTP106 ]), +CLKDEV_DEV_ID ("e800d800.spi" , &mstp_clks[MSTP105 ]), +CLKDEV_DEV_ID ("e800e000.spi" , &mstp_clks[MSTP104 ]), +CLKDEV_DEV_ID ("e800e800.spi" , &mstp_clks[MSTP103 ]), +CLKDEV_DEV_ID ("fcfee000.i2c" , &mstp_clks[MSTP97 ]), +CLKDEV_DEV_ID ("fcfee400.i2c" , &mstp_clks[MSTP96 ]), +CLKDEV_DEV_ID ("fcfee800.i2c" , &mstp_clks[MSTP95 ]), +CLKDEV_DEV_ID ("fcfeec00.i2c" , &mstp_clks[MSTP94 ]), +CLKDEV_DEV_ID ("e8008000.serial" , &mstp_clks[MSTP45 ]),CLKDEV_DEV_ID ("r7s72100-ether" , &mstp_clks[MSTP74 ]), /* ICK */Signature · 12 lines
1.7.9.5 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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
v6 cover CCF support for Renesas r7s72100
Quoted 29 lines · Simon Horman
Quoted 28 lines · Geert Uytterhoeven
Hi Wolfram, Simon,
Quoted 4 lines · Simon Horman
Quoted 3 lines · Wolfram Sang
This series moves the r7s72100 platfrom from the legacy clock implementation to the common clock framework.
Quoted 8 lines
Quoted 8 lines
This series has been tested with the renesas-devel-v3.15-rc2-20140428 tag. If you want to boot into a console, you have a runtime dependency [1] which is expected to go away in 3.15-rc6.
Changes since V5:
* rebased and tested against latest renesas/devel-tag (with and without CCF)
That's genmai-legacy (ARCH_SHMOBILE_LEGACY=y, MACH_GENMAI=y), and genmai-multiplatform (ARCH_SHMOBILE_MULTI=y, MACH_GENMAI=y, right?
There's still a third variant: genmai-reference (ARCH_SHMOBILE_LEGACY=y, MACH_GENMAI_REFERENCE=y), which uses
board-genmai-reference.c, but without CCF, i.e. withclock-r7s72100.c.
For that, you still need the legacy clocks (also for serial!), so I needed the (gmail-whitespace-damaged) temporary workaround below in my local tree.Quoted 1 line
Thanks, I have queued up this series.
Quoted 8 lines
Quoted 5 lines
Do we want to go for the quick fix below, or just fix the issue for good, and merge genmai-reference and genmai-multiplatform now, just like we did for koelsch/lager?
I can send a proper patch for the quick fix, depending on your decision.
I do not feel particularly strongly about this. But it seems to me that it would make sense to take the same approach as koelsch and lager.
Wolfram, are you planing to handle this one way or another?
Quoted 53 lines
Quoted 48 lines
Quoted 1 line
From
1b7b851a5d1b7d10f42f68a35b65278827b03cc4Mon Sep 17 00:00:00 2001From: Geert Uytterhoeven <[email protected]>
Date: Mon, 12 May 2014 14:32:25 +0200
Subject: [PATCH] ARM: shmobile: genmai-reference: Re-add legacy clocksgenmai-reference still uses non-CCF, so it needs the legacy clocks
Signed-off-by Geert Uytterhoeven <[email protected]>--- arch/arm/mach-shmobile/clock-r7s72100.c | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm/mach-shmobile/clock-r7s72100.c +10
-0@@ -194,6 +194,16 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("rspi-rz.2" , &mstp_clks[MSTP105 ]),CLKDEV_DEV_ID ("rspi-rz.3" , &mstp_clks[MSTP104 ]),CLKDEV_DEV_ID ("rspi-rz.4" , &mstp_clks[MSTP103 ]), +CLKDEV_DEV_ID ("e800c800.spi" , &mstp_clks[MSTP107 ]), +CLKDEV_DEV_ID ("e800d000.spi" , &mstp_clks[MSTP106 ]), +CLKDEV_DEV_ID ("e800d800.spi" , &mstp_clks[MSTP105 ]), +CLKDEV_DEV_ID ("e800e000.spi" , &mstp_clks[MSTP104 ]), +CLKDEV_DEV_ID ("e800e800.spi" , &mstp_clks[MSTP103 ]), +CLKDEV_DEV_ID ("fcfee000.i2c" , &mstp_clks[MSTP97 ]), +CLKDEV_DEV_ID ("fcfee400.i2c" , &mstp_clks[MSTP96 ]), +CLKDEV_DEV_ID ("fcfee800.i2c" , &mstp_clks[MSTP95 ]), +CLKDEV_DEV_ID ("fcfeec00.i2c" , &mstp_clks[MSTP94 ]), +CLKDEV_DEV_ID ("e8008000.serial" , &mstp_clks[MSTP45 ]),CLKDEV_DEV_ID ("r7s72100-ether" , &mstp_clks[MSTP74 ]), /* ICK */Signature · 12 lines
1.7.9.5 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
v6 cover CCF support for Renesas r7s72100
Quoted 4 lines
Quoted 2 lines
I do not feel particularly strongly about this. But it seems to me that it would make sense to take the same approach as koelsch and lager.
Wolfram, are you planing to handle this one way or another?
I'll check what it takes for the reference removal. Hopefully it is not too late in the cycle for this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140516/6a5644f2/attachment.sig>
v6 cover CCF support for Renesas r7s72100
Quoted 7 lines · Wolfram Sang
Quoted 4 lines
Quoted 2 lines
I do not feel particularly strongly about this. But it seems to me that it would make sense to take the same approach as koelsch and lager.
Wolfram, are you planing to handle this one way or another?
I'll check what it takes for the reference removal. Hopefully it is not too late in the cycle for this?
It is my hope that such a change can be treated as a fix and thus it is not too late.
I suspect that if you look at the reference removal of koelsch and lager, or the more recent marzen patches, that you should be able to see a pattern that works for genmai too.
v6 cover CCF support for Renesas r7s72100
Quoted 3 lines
It is my hope that such a change can be treated as a fix and thus it is not too late.
Makes sense. Good.
Quoted 3 lines
I suspect that if you look at the reference removal of koelsch and lager, or the more recent marzen patches, that you should be able to see a pattern that works for genmai too.
Yeah, that was my plan. I'll start after I finished my mails.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140516/4024744f/attachment-0001.sig>