* [RFC 00/17] ARM: shmobile: r8a7779, marzen: multiplatform
@ 2013-11-25 1:18 Simon Horman
[not found] ` <1385342312-1967-16-git-send-email-horms+renesas@verge.net.au>
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Simon Horman @ 2013-11-25 1:18 UTC (permalink / raw)
To: linux-arm-kernel
The aim of this series is to adding common clock framework and in turn
multiplatform support to the r8a7779 SoC and marzen-reference. It
subsequently removes non-multiplatform support from marzen-reference. This
last step is provided to illustrate that it can be done, it may not be
desirable to do so for some time.
This is based on work for R-Car Gen2 by Laurent Pinchart and Magnus Damm.
I expect the R-Car Gen2 work in this area to change and
I intend to update this series as necessary.
This series is based on the clocks/ccf/rcar-gen2 branch
of Laurent's fbdev tree. I expect that branch to be rebased/changed,
but it seems to be an adequate base for an RFC.
I have made this series, including its base, available
in the topic/clocks/ccf/r8a7779-marzen branch of my renesas tree.
That branch is likely to be rebased/changed in the future.
Simon Horman (17):
clk: shmobile: r8a7779: Add clocks support
clk: shmobile: r8a7779: Add MSTP clock support
ARM: shmobile: r8a7779: Add clock index macros for DT sources
ARM: shmobile: r8a7779: Add clocks
ARM: shmobile: r8a7779: Reference clocks
ARM: shmobile: Sync Marzen DTS with Marzen reference DTS
ARM: shmobile: r8a7779: Sort headers alphabetically
ARM: shmobile: r8a7779: Add helper to read mode pins
ARM: shmobile: r8a7779: Move r8a7779_earlytimer_init to
clock-r8a7779.c
ARM: shmobile: marzen-reference: Move clock and OF device
initialisation into board code
ARM: shmobile: r8a7779: Do not include sh_clk.h in r8a7779.h
ARM: shmobile: r8a7779: Initial multiplatform support
ARM: shmobile: marzen-reference: Initialize CPG device
ARM: shmobile: marzen-reference: Instantiate clkdevs for SCIF and CMT
ARM: shmobile: Remove non-multiplatform Marzen reference support
ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB
ARM: shmobile: Remove Marzen reference DTS
.../bindings/clock/renesas,cpg-mstp-clocks.txt | 1 +
.../bindings/clock/renesas,r8a7779-cpg-clocks.txt | 22 +++
arch/arm/boot/dts/Makefile | 2 +-
arch/arm/boot/dts/r8a7779-marzen-reference.dts | 110 --------------
arch/arm/boot/dts/r8a7779-marzen.dts | 82 ++++++++++
arch/arm/boot/dts/r8a7779.dtsi | 132 ++++++++++++++++
arch/arm/mach-shmobile/Kconfig | 21 +--
arch/arm/mach-shmobile/Makefile | 4 +-
arch/arm/mach-shmobile/Makefile.boot | 1 -
arch/arm/mach-shmobile/board-koelsch-reference.c | 1 +
arch/arm/mach-shmobile/board-marzen-reference.c | 44 ++++++
arch/arm/mach-shmobile/board-marzen.c | 28 ++--
arch/arm/mach-shmobile/clock-r8a7779.c | 22 +--
arch/arm/mach-shmobile/include/mach/r8a7779.h | 2 +-
arch/arm/mach-shmobile/setup-r8a7779.c | 28 ++--
drivers/clk/shmobile/Makefile | 1 +
drivers/clk/shmobile/clk-r8a7779.c | 166 +++++++++++++++++++++
include/dt-bindings/clock/r8a7779-clock.h | 61 ++++++++
include/linux/clk/shmobile.h | 1 +
19 files changed, 564 insertions(+), 165 deletions(-)
create mode 100644 Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt
delete mode 100644 arch/arm/boot/dts/r8a7779-marzen-reference.dts
create mode 100644 drivers/clk/shmobile/clk-r8a7779.c
create mode 100644 include/dt-bindings/clock/r8a7779-clock.h
--
1.8.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC 15/17] ARM: shmobile: Remove non-multiplatform Marzen reference support
[not found] ` <1385342312-1967-16-git-send-email-horms+renesas@verge.net.au>
@ 2013-11-25 6:51 ` Kuninori Morimoto
2013-11-26 0:26 ` Simon Horman
0 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2013-11-25 6:51 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon
> Now that r8a7779 has CCF support remove the legacy Marzen reference
> Kconfig bits CONFIG_MACH_KOELSCH_REFERENCE for the non-multiplatform
> case.
I guess
- CONFIG_MACH_KOELSCH_REFERENCE
+ CONFIG_MACH_MARZEN_REFERENCE
> Starting from this commit Marzen board support is always enabled via
> CONFIG_MACH_KOELSCH, and CONFIG_ARCH_MULTIPLATFORM is used to select
ditto ?
> between board-koelsch.c and board-koelsch-reference.c
> The file board-koelsch-reference.c can no longer be used together with
koelsch <-> marzen ?
> --- a/arch/arm/mach-shmobile/Makefile
> +++ b/arch/arm/mach-shmobile/Makefile
> @@ -69,8 +69,7 @@ obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o
> obj-$(CONFIG_MACH_GENMAI) += board-genmai.o
> obj-$(CONFIG_MACH_GENMAI_REFERENCE) += board-genmai-reference.o
> obj-$(CONFIG_MACH_MARZEN) += board-marzen.o
> -obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o
> -obj-$(CONFIG_MACH_LAGER) += board-lager.o
> +obj-$(CONFIG_MACH_LAGER) += boardo-lager.o
boardo-lager ??
^
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC 16/17] ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB
[not found] ` <1385342312-1967-17-git-send-email-horms+renesas@verge.net.au>
@ 2013-11-25 6:56 ` Kuninori Morimoto
2013-11-26 0:27 ` Simon Horman
0 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2013-11-25 6:56 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon
> Let the multiplatform Marzen support boot with the legacy DTS for
> Marzen as well as the Marzen reference DTS.
>
> Based on work for the Koelsch board by Laurent Pinchart.
>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
(snip)
> --- a/arch/arm/mach-shmobile/board-koelsch-reference.c
> +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
> @@ -38,6 +38,7 @@ static void __init koelsch_add_standard_devices(void)
> }
>
> static const char * const koelsch_boards_compat_dt[] __initconst = {
> + "renesas,koelsch",
> "renesas,koelsch-reference",
> NULL,
> };
You are modifying koelsch file in marzen patch ?
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC 08/17] ARM: shmobile: r8a7779: Add helper to read mode pins
[not found] ` <1385342312-1967-9-git-send-email-horms+renesas@verge.net.au>
@ 2013-11-25 11:53 ` Sergei Shtylyov
2013-11-26 0:34 ` Simon Horman
0 siblings, 1 reply; 9+ messages in thread
From: Sergei Shtylyov @ 2013-11-25 11:53 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 25-11-2013 5:18, Simon Horman wrote:
> Add and use helper to read mode pins.
> This will be re-used when moving marzen-reference to
> the common clock framework.
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> arch/arm/mach-shmobile/clock-r8a7779.c | 11 ++---------
> arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 +
> arch/arm/mach-shmobile/setup-r8a7779.c | 14 ++++++++++++++
> 3 files changed, 17 insertions(+), 9 deletions(-)
> diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
> index b7ce0e7..decf122 100644
> --- a/arch/arm/mach-shmobile/clock-r8a7779.c
> +++ b/arch/arm/mach-shmobile/clock-r8a7779.c
[...]
> diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
> index 8f94531..4e3fbfb 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7779.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7779.c
> @@ -874,6 +874,20 @@ void __init r8a7779_add_standard_devices_dt(void)
> of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> }
>
> +#define MODEMR 0xffcc0020
> +
> +u32 __init r8a7779_read_mode_pins(void)
> +{
> + void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
Why waste 2 4K pages if you're only interested in 4 bytes (i.e. 1 page)? I
remember I've already asked that question...
> + u32 mode;
> +
> + BUG_ON(!modemr);
> + mode = ioread32(modemr);
> + iounmap(modemr);
> +
> + return mode;
> +}
> +
WBR, Sergei
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC 13/17] ARM: shmobile: marzen-reference: Initialize CPG device
[not found] ` <1385342312-1967-14-git-send-email-horms+renesas@verge.net.au>
@ 2013-11-25 12:15 ` Sergei Shtylyov
2013-11-26 0:35 ` Simon Horman
0 siblings, 1 reply; 9+ messages in thread
From: Sergei Shtylyov @ 2013-11-25 12:15 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 25-11-2013 5:18, Simon Horman wrote:
> On multiplatform kernels clocks are handled by the CCF CPG driver. It
> must be explicitly initialized by a call to rcar_gen2_clocks_init() with
You meant r8a7779_clocks_init() instead?
> the value of the boot mode pins.
> Based on similar work for the Koelsch board by Laurent Pinchart.
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> arch/arm/mach-shmobile/board-marzen-reference.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
> diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
> index 782907f..3a7c0fc 100644
> --- a/arch/arm/mach-shmobile/board-marzen-reference.c
> +++ b/arch/arm/mach-shmobile/board-marzen-reference.c
[...]
> @@ -28,11 +29,17 @@
> #include <asm/mach/arch.h>
>
>
> -static void __init marzen_init(void)
> +static void __init marzen_init_timer(void)
> {
> #ifdef CONFIG_COMMON_CLK
> - of_clk_init(NULL);
> -#else
> + r8a7779_clocks_init(r8a7779_read_mode_pins());
> +#endif
> + clocksource_of_init();
> +}
> +
> +static void __init marzen_init(void)
> +{
> +#ifndef CONFIG_COMMON_CLK
> r8a7779_clock_init();
> #endif
> r8a7779_add_standard_devices_dt();
WBR, Sergei
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC 15/17] ARM: shmobile: Remove non-multiplatform Marzen reference support
2013-11-25 6:51 ` [RFC 15/17] ARM: shmobile: Remove non-multiplatform Marzen reference support Kuninori Morimoto
@ 2013-11-26 0:26 ` Simon Horman
0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-11-26 0:26 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Nov 24, 2013 at 10:51:33PM -0800, Kuninori Morimoto wrote:
>
> Hi Simon
>
> > Now that r8a7779 has CCF support remove the legacy Marzen reference
> > Kconfig bits CONFIG_MACH_KOELSCH_REFERENCE for the non-multiplatform
> > case.
>
> I guess
>
> - CONFIG_MACH_KOELSCH_REFERENCE
> + CONFIG_MACH_MARZEN_REFERENCE
>
> > Starting from this commit Marzen board support is always enabled via
> > CONFIG_MACH_KOELSCH, and CONFIG_ARCH_MULTIPLATFORM is used to select
>
> ditto ?
>
> > between board-koelsch.c and board-koelsch-reference.c
> > The file board-koelsch-reference.c can no longer be used together with
>
> koelsch <-> marzen ?
>
> > --- a/arch/arm/mach-shmobile/Makefile
> > +++ b/arch/arm/mach-shmobile/Makefile
> > @@ -69,8 +69,7 @@ obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o
> > obj-$(CONFIG_MACH_GENMAI) += board-genmai.o
> > obj-$(CONFIG_MACH_GENMAI_REFERENCE) += board-genmai-reference.o
> > obj-$(CONFIG_MACH_MARZEN) += board-marzen.o
> > -obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o
> > -obj-$(CONFIG_MACH_LAGER) += board-lager.o
> > +obj-$(CONFIG_MACH_LAGER) += boardo-lager.o
>
> boardo-lager ??
Thanks. Sorry for the silly errors.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC 16/17] ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB
2013-11-25 6:56 ` [RFC 16/17] ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB Kuninori Morimoto
@ 2013-11-26 0:27 ` Simon Horman
0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-11-26 0:27 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Nov 24, 2013 at 10:56:19PM -0800, Kuninori Morimoto wrote:
>
> Hi Simon
>
> > Let the multiplatform Marzen support boot with the legacy DTS for
> > Marzen as well as the Marzen reference DTS.
> >
> > Based on work for the Koelsch board by Laurent Pinchart.
> >
> > Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > ---
> (snip)
> > --- a/arch/arm/mach-shmobile/board-koelsch-reference.c
> > +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
> > @@ -38,6 +38,7 @@ static void __init koelsch_add_standard_devices(void)
> > }
> >
> > static const char * const koelsch_boards_compat_dt[] __initconst = {
> > + "renesas,koelsch",
> > "renesas,koelsch-reference",
> > NULL,
> > };
>
> You are modifying koelsch file in marzen patch ?
Sorry, my mistake. I'll fix that.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC 08/17] ARM: shmobile: r8a7779: Add helper to read mode pins
2013-11-25 11:53 ` [RFC 08/17] ARM: shmobile: r8a7779: Add helper to read mode pins Sergei Shtylyov
@ 2013-11-26 0:34 ` Simon Horman
0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-11-26 0:34 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 25, 2013 at 03:53:25PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 25-11-2013 5:18, Simon Horman wrote:
>
> >Add and use helper to read mode pins.
> >This will be re-used when moving marzen-reference to
> >the common clock framework.
>
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >---
> > arch/arm/mach-shmobile/clock-r8a7779.c | 11 ++---------
> > arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 +
> > arch/arm/mach-shmobile/setup-r8a7779.c | 14 ++++++++++++++
> > 3 files changed, 17 insertions(+), 9 deletions(-)
>
> >diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
> >index b7ce0e7..decf122 100644
> >--- a/arch/arm/mach-shmobile/clock-r8a7779.c
> >+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
> [...]
> >diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
> >index 8f94531..4e3fbfb 100644
> >--- a/arch/arm/mach-shmobile/setup-r8a7779.c
> >+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
> >@@ -874,6 +874,20 @@ void __init r8a7779_add_standard_devices_dt(void)
> > of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> > }
> >
> >+#define MODEMR 0xffcc0020
> >+
> >+u32 __init r8a7779_read_mode_pins(void)
> >+{
> >+ void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
>
> Why waste 2 4K pages if you're only interested in 4 bytes (i.e. 1
> page)? I remember I've already asked that question...
I don't recall if there was a conclusion to that discussion.
In any case, this patch just shuffles code around.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC 13/17] ARM: shmobile: marzen-reference: Initialize CPG device
2013-11-25 12:15 ` [RFC 13/17] ARM: shmobile: marzen-reference: Initialize CPG device Sergei Shtylyov
@ 2013-11-26 0:35 ` Simon Horman
0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-11-26 0:35 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 25, 2013 at 04:15:28PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 25-11-2013 5:18, Simon Horman wrote:
>
> >On multiplatform kernels clocks are handled by the CCF CPG driver. It
> >must be explicitly initialized by a call to rcar_gen2_clocks_init() with
>
> You meant r8a7779_clocks_init() instead?
Yes, thanks. I will fix that.
>
> >the value of the boot mode pins.
>
> >Based on similar work for the Koelsch board by Laurent Pinchart.
>
> >Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >---
> > arch/arm/mach-shmobile/board-marzen-reference.c | 16 ++++++++++++----
> > 1 file changed, 12 insertions(+), 4 deletions(-)
>
> >diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
> >index 782907f..3a7c0fc 100644
> >--- a/arch/arm/mach-shmobile/board-marzen-reference.c
> >+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
> [...]
> >@@ -28,11 +29,17 @@
> > #include <asm/mach/arch.h>
> >
> >
> >-static void __init marzen_init(void)
> >+static void __init marzen_init_timer(void)
> > {
> > #ifdef CONFIG_COMMON_CLK
> >- of_clk_init(NULL);
> >-#else
> >+ r8a7779_clocks_init(r8a7779_read_mode_pins());
> >+#endif
> >+ clocksource_of_init();
> >+}
> >+
> >+static void __init marzen_init(void)
> >+{
> >+#ifndef CONFIG_COMMON_CLK
> > r8a7779_clock_init();
> > #endif
> > r8a7779_add_standard_devices_dt();
>
> WBR, Sergei
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-11-26 0:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 1:18 [RFC 00/17] ARM: shmobile: r8a7779, marzen: multiplatform Simon Horman
[not found] ` <1385342312-1967-16-git-send-email-horms+renesas@verge.net.au>
2013-11-25 6:51 ` [RFC 15/17] ARM: shmobile: Remove non-multiplatform Marzen reference support Kuninori Morimoto
2013-11-26 0:26 ` Simon Horman
[not found] ` <1385342312-1967-17-git-send-email-horms+renesas@verge.net.au>
2013-11-25 6:56 ` [RFC 16/17] ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB Kuninori Morimoto
2013-11-26 0:27 ` Simon Horman
[not found] ` <1385342312-1967-9-git-send-email-horms+renesas@verge.net.au>
2013-11-25 11:53 ` [RFC 08/17] ARM: shmobile: r8a7779: Add helper to read mode pins Sergei Shtylyov
2013-11-26 0:34 ` Simon Horman
[not found] ` <1385342312-1967-14-git-send-email-horms+renesas@verge.net.au>
2013-11-25 12:15 ` [RFC 13/17] ARM: shmobile: marzen-reference: Initialize CPG device Sergei Shtylyov
2013-11-26 0:35 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).