Commit 495b3cea authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt

ARM: mach-shmobile: sh7372 clock framework support V2

This patch is V2 of clock framework tables/code for sh7372.
MSTP are included for KEYSC, SCIF, IIC, USB, SDHI and UIO.
Signed-off-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent e47bb515
...@@ -21,6 +21,7 @@ config ARCH_SH7372 ...@@ -21,6 +21,7 @@ config ARCH_SH7372
select CPU_V7 select CPU_V7
select HAVE_CLK select HAVE_CLK
select COMMON_CLKDEV select COMMON_CLKDEV
select SH_CLK_CPG
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
comment "SH-Mobile Board Type" comment "SH-Mobile Board Type"
......
...@@ -8,7 +8,7 @@ obj-y := timer.o console.o clock.o ...@@ -8,7 +8,7 @@ obj-y := timer.o console.o clock.o
# CPU objects # CPU objects
obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o
obj-$(CONFIG_ARCH_SH7377) += setup-sh7377.o clock-sh7367.o intc-sh7377.o obj-$(CONFIG_ARCH_SH7377) += setup-sh7377.o clock-sh7367.o intc-sh7377.o
obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7367.o intc-sh7372.o obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o
# Pinmux setup # Pinmux setup
pfc-$(CONFIG_ARCH_SH7367) := pfc-sh7367.o pfc-$(CONFIG_ARCH_SH7367) := pfc-sh7367.o
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/time.h>
/* /*
* Address Interface BusWidth note * Address Interface BusWidth note
...@@ -328,9 +329,8 @@ static void __init ap4evb_map_io(void) ...@@ -328,9 +329,8 @@ static void __init ap4evb_map_io(void)
{ {
iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc)); iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc));
/* setup early devices, clocks and console here as well */ /* setup early devices and console here as well */
sh7372_add_early_devices(); sh7372_add_early_devices();
sh7367_clock_init(); /* use g3 clocks for now */
shmobile_setup_console(); shmobile_setup_console();
} }
...@@ -419,11 +419,21 @@ static void __init ap4evb_init(void) ...@@ -419,11 +419,21 @@ static void __init ap4evb_init(void)
platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices));
} }
static void __init ap4evb_timer_init(void)
{
sh7372_clock_init();
shmobile_timer.init();
}
static struct sys_timer ap4evb_timer = {
.init = ap4evb_timer_init,
};
MACHINE_START(AP4EVB, "ap4evb") MACHINE_START(AP4EVB, "ap4evb")
.phys_io = 0xe6000000, .phys_io = 0xe6000000,
.io_pg_offst = ((0xe6000000) >> 18) & 0xfffc, .io_pg_offst = ((0xe6000000) >> 18) & 0xfffc,
.map_io = ap4evb_map_io, .map_io = ap4evb_map_io,
.init_irq = sh7372_init_irq, .init_irq = sh7372_init_irq,
.init_machine = ap4evb_init, .init_machine = ap4evb_init,
.timer = &shmobile_timer, .timer = &ap4evb_timer,
MACHINE_END MACHINE_END
This diff is collapsed.
...@@ -20,6 +20,7 @@ extern void sh7377_pinmux_init(void); ...@@ -20,6 +20,7 @@ extern void sh7377_pinmux_init(void);
extern void sh7372_init_irq(void); extern void sh7372_init_irq(void);
extern void sh7372_add_early_devices(void); extern void sh7372_add_early_devices(void);
extern void sh7372_add_standard_devices(void); extern void sh7372_add_standard_devices(void);
extern void sh7372_clock_init(void);
extern void sh7372_pinmux_init(void); extern void sh7372_pinmux_init(void);
#endif /* __ARCH_MACH_COMMON_H */ #endif /* __ARCH_MACH_COMMON_H */
...@@ -143,7 +143,7 @@ static struct sh_timer_config cmt10_platform_data = { ...@@ -143,7 +143,7 @@ static struct sh_timer_config cmt10_platform_data = {
.name = "CMT10", .name = "CMT10",
.channel_offset = 0x10, .channel_offset = 0x10,
.timer_bit = 0, .timer_bit = 0,
.clk = "r_clk", .clk = "cmt1",
.clockevent_rating = 125, .clockevent_rating = 125,
.clocksource_rating = 125, .clocksource_rating = 125,
}; };
...@@ -233,14 +233,8 @@ void __init sh7372_add_standard_devices(void) ...@@ -233,14 +233,8 @@ void __init sh7372_add_standard_devices(void)
ARRAY_SIZE(sh7372_early_devices)); ARRAY_SIZE(sh7372_early_devices));
} }
#define SMSTPCR3 0xe615013c
#define SMSTPCR3_CMT1 (1 << 29)
void __init sh7372_add_early_devices(void) void __init sh7372_add_early_devices(void)
{ {
/* enable clock to CMT1 */
__raw_writel(__raw_readl(SMSTPCR3) & ~SMSTPCR3_CMT1, SMSTPCR3);
early_platform_add_devices(sh7372_early_devices, early_platform_add_devices(sh7372_early_devices,
ARRAY_SIZE(sh7372_early_devices)); ARRAY_SIZE(sh7372_early_devices));
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment