ARM: shmobile: r8a7778: implement SoC and board CCF support

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>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
This commit is contained in:
Ulrich Hecht 2015-02-16 17:58:49 +01:00 committed by Simon Horman
parent 93aa970d2b
commit 43cbec8577
2 changed files with 21 additions and 0 deletions

View file

@ -36,7 +36,9 @@ static void __init bockw_init(void)
void __iomem *fpga; void __iomem *fpga;
void __iomem *pfc; void __iomem *pfc;
#ifndef CONFIG_COMMON_CLK
r8a7778_clock_init(); r8a7778_clock_init();
#endif
r8a7778_init_irq_extpin_dt(1); r8a7778_init_irq_extpin_dt(1);
r8a7778_add_dt_devices(); r8a7778_add_dt_devices();

View file

@ -15,6 +15,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
*/ */
#include <linux/clk/shmobile.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
@ -41,6 +42,21 @@
#include "irqs.h" #include "irqs.h"
#include "r8a7778.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 */ /* SCIF */
#define R8A7778_SCIF(index, baseaddr, irq) \ #define R8A7778_SCIF(index, baseaddr, irq) \
static struct plat_sci_port scif##index##_platform_data = { \ 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_early = shmobile_init_delay,
.init_irq = r8a7778_init_irq_dt, .init_irq = r8a7778_init_irq_dt,
.init_late = shmobile_init_late, .init_late = shmobile_init_late,
#ifdef CONFIG_COMMON_CLK
.init_time = r8a7778_timer_init,
#endif
.dt_compat = r8a7778_compat_dt, .dt_compat = r8a7778_compat_dt,
MACHINE_END MACHINE_END