All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 05/15] ARM: shmobile: r8a7778: implement SoC and board CCF support
@ 2015-02-16 16:58 Ulrich Hecht
  2015-02-16 17:09 ` Laurent Pinchart
  2015-02-16 17:36 ` Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: Ulrich Hecht @ 2015-02-16 16:58 UTC (permalink / raw)
  To: linux-sh

Disables the legacy clock framework and passes the mode bits to the CPG
driver if CCF is enabled.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 arch/arm/mach-shmobile/board-bockw-reference.c |  2 ++
 arch/arm/mach-shmobile/setup-r8a7778.c         | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c
index d649ade..9a74efd 100644
--- a/arch/arm/mach-shmobile/board-bockw-reference.c
+++ b/arch/arm/mach-shmobile/board-bockw-reference.c
@@ -36,7 +36,9 @@ static void __init bockw_init(void)
 	void __iomem *fpga;
 	void __iomem *pfc;
 
+#ifndef CONFIG_COMMON_CLK
 	r8a7778_clock_init();
+#endif
 	r8a7778_init_irq_extpin_dt(1);
 	r8a7778_add_dt_devices();
 
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index cef8895..c49aa09 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -15,6 +15,7 @@
  * GNU General Public License for more details.
  */
 
+#include <linux/clk/shmobile.h>
 #include <linux/kernel.h>
 #include <linux/io.h>
 #include <linux/irqchip/arm-gic.h>
@@ -41,6 +42,21 @@
 #include "irqs.h"
 #include "r8a7778.h"
 
+#define MODEMR 0xffcc0020
+
+#ifdef CONFIG_COMMON_CLK
+static void __init r8a7778_timer_init(void)
+{
+	u32 mode;
+	void __iomem *modemr = ioremap_nocache(MODEMR, 4);
+
+	BUG_ON(!modemr);
+	mode = ioread32(modemr);
+	iounmap(modemr);
+	r8a7778_clocks_init(mode);
+}
+#endif
+
 /* SCIF */
 #define R8A7778_SCIF(index, baseaddr, irq)			\
 static struct plat_sci_port scif##index##_platform_data = {	\
@@ -608,6 +624,9 @@ DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
 	.init_early	= shmobile_init_delay,
 	.init_irq	= r8a7778_init_irq_dt,
 	.init_late	= shmobile_init_late,
+#ifdef CONFIG_COMMON_CLK
+	.init_time	= r8a7778_timer_init,
+#endif
 	.dt_compat	= r8a7778_compat_dt,
 MACHINE_END
 
-- 
2.2.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3 05/15] ARM: shmobile: r8a7778: implement SoC and board CCF support
  2015-02-16 16:58 [PATCH v3 05/15] ARM: shmobile: r8a7778: implement SoC and board CCF support Ulrich Hecht
@ 2015-02-16 17:09 ` Laurent Pinchart
  2015-02-16 17:36 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2015-02-16 17:09 UTC (permalink / raw)
  To: linux-sh

Hi Ulrich,

Thank you for the patch.

On Monday 16 February 2015 17:58:49 Ulrich Hecht wrote:
> Disables the legacy clock framework and passes the mode bits to the CPG
> driver if CCF is enabled.
> 
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  arch/arm/mach-shmobile/board-bockw-reference.c |  2 ++
>  arch/arm/mach-shmobile/setup-r8a7778.c         | 19 +++++++++++++++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c
> b/arch/arm/mach-shmobile/board-bockw-reference.c index d649ade..9a74efd
> 100644
> --- a/arch/arm/mach-shmobile/board-bockw-reference.c
> +++ b/arch/arm/mach-shmobile/board-bockw-reference.c
> @@ -36,7 +36,9 @@ static void __init bockw_init(void)
>  	void __iomem *fpga;
>  	void __iomem *pfc;
> 
> +#ifndef CONFIG_COMMON_CLK
>  	r8a7778_clock_init();
> +#endif
>  	r8a7778_init_irq_extpin_dt(1);
>  	r8a7778_add_dt_devices();
> 
> diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c
> b/arch/arm/mach-shmobile/setup-r8a7778.c index cef8895..c49aa09 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7778.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7778.c
> @@ -15,6 +15,7 @@
>   * GNU General Public License for more details.
>   */
> 
> +#include <linux/clk/shmobile.h>
>  #include <linux/kernel.h>
>  #include <linux/io.h>
>  #include <linux/irqchip/arm-gic.h>
> @@ -41,6 +42,21 @@
>  #include "irqs.h"
>  #include "r8a7778.h"
> 
> +#define MODEMR 0xffcc0020
> +
> +#ifdef CONFIG_COMMON_CLK
> +static void __init r8a7778_timer_init(void)
> +{
> +	u32 mode;
> +	void __iomem *modemr = ioremap_nocache(MODEMR, 4);
> +
> +	BUG_ON(!modemr);
> +	mode = ioread32(modemr);
> +	iounmap(modemr);
> +	r8a7778_clocks_init(mode);
> +}
> +#endif
> +
>  /* SCIF */
>  #define R8A7778_SCIF(index, baseaddr, irq)			\
>  static struct plat_sci_port scif##index##_platform_data = {	\
> @@ -608,6 +624,9 @@ DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened
> Device Tree)") .init_early	= shmobile_init_delay,
>  	.init_irq	= r8a7778_init_irq_dt,
>  	.init_late	= shmobile_init_late,
> +#ifdef CONFIG_COMMON_CLK
> +	.init_time	= r8a7778_timer_init,
> +#endif
>  	.dt_compat	= r8a7778_compat_dt,
>  MACHINE_END

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3 05/15] ARM: shmobile: r8a7778: implement SoC and board CCF support
  2015-02-16 16:58 [PATCH v3 05/15] ARM: shmobile: r8a7778: implement SoC and board CCF support Ulrich Hecht
  2015-02-16 17:09 ` Laurent Pinchart
@ 2015-02-16 17:36 ` Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2015-02-16 17:36 UTC (permalink / raw)
  To: linux-sh

On Mon, Feb 16, 2015 at 5:58 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> Disables the legacy clock framework and passes the mode bits to the CPG
> driver if CCF is enabled.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

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] 3+ messages in thread

end of thread, other threads:[~2015-02-16 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-16 16:58 [PATCH v3 05/15] ARM: shmobile: r8a7778: implement SoC and board CCF support Ulrich Hecht
2015-02-16 17:09 ` Laurent Pinchart
2015-02-16 17:36 ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.