Commit 0163acf3 authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt

ARM: mach-shmobile: sh7377 clock framework V2

This patch is V2 of clock framework tables/code for sh7377.
MSTP support is included for the following hardware blocks:
KEYSC, SCIF, IIC, IRDA, FLCTL, USB, SDHI and UIO.
Signed-off-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 4f0836b4
...@@ -15,6 +15,7 @@ config ARCH_SH7377 ...@@ -15,6 +15,7 @@ config ARCH_SH7377
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
config ARCH_SH7372 config ARCH_SH7372
......
...@@ -7,7 +7,7 @@ obj-y := timer.o console.o clock.o ...@@ -7,7 +7,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-sh7377.o intc-sh7377.o
obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o
# Pinmux setup # Pinmux setup
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,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>
/* /*
* SDHI * SDHI
...@@ -259,9 +260,8 @@ static void __init g4evm_map_io(void) ...@@ -259,9 +260,8 @@ static void __init g4evm_map_io(void)
{ {
iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc)); iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc));
/* setup early devices, clocks and console here as well */ /* setup early devices and console here as well */
sh7377_add_early_devices(); sh7377_add_early_devices();
sh7367_clock_init(); /* use g3 clocks for now */
shmobile_setup_console(); shmobile_setup_console();
} }
...@@ -327,9 +327,6 @@ static void __init g4evm_init(void) ...@@ -327,9 +327,6 @@ static void __init g4evm_init(void)
gpio_request(GPIO_FN_EXTLP, NULL); gpio_request(GPIO_FN_EXTLP, NULL);
gpio_request(GPIO_FN_IDIN, NULL); gpio_request(GPIO_FN_IDIN, NULL);
/* enable clock in SMSTPCR3 */
__raw_writel(__raw_readl(0xe615013c) & ~(1 << 22), 0xe615013c);
/* setup USB phy */ /* setup USB phy */
__raw_writew(0x0200, 0xe605810a); /* USBCR1 */ __raw_writew(0x0200, 0xe605810a); /* USBCR1 */
__raw_writew(0x00e0, 0xe60581c0); /* CPFCH */ __raw_writew(0x00e0, 0xe60581c0); /* CPFCH */
...@@ -384,11 +381,21 @@ static void __init g4evm_init(void) ...@@ -384,11 +381,21 @@ static void __init g4evm_init(void)
platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices)); platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices));
} }
static void __init g4evm_timer_init(void)
{
sh7377_clock_init();
shmobile_timer.init();
}
static struct sys_timer g4evm_timer = {
.init = g4evm_timer_init,
};
MACHINE_START(G4EVM, "g4evm") MACHINE_START(G4EVM, "g4evm")
.phys_io = 0xe6000000, .phys_io = 0xe6000000,
.io_pg_offst = ((0xe6000000) >> 18) & 0xfffc, .io_pg_offst = ((0xe6000000) >> 18) & 0xfffc,
.map_io = g4evm_map_io, .map_io = g4evm_map_io,
.init_irq = sh7377_init_irq, .init_irq = sh7377_init_irq,
.init_machine = g4evm_init, .init_machine = g4evm_init,
.timer = &shmobile_timer, .timer = &g4evm_timer,
MACHINE_END MACHINE_END
This diff is collapsed.
...@@ -17,7 +17,10 @@ extern struct clk sh7367_extal2_clk; ...@@ -17,7 +17,10 @@ extern struct clk sh7367_extal2_clk;
extern void sh7377_init_irq(void); extern void sh7377_init_irq(void);
extern void sh7377_add_early_devices(void); extern void sh7377_add_early_devices(void);
extern void sh7377_add_standard_devices(void); extern void sh7377_add_standard_devices(void);
extern void sh7377_clock_init(void);
extern void sh7377_pinmux_init(void); extern void sh7377_pinmux_init(void);
extern struct clk sh7377_extalc1_clk;
extern struct clk sh7377_extal2_clk;
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);
......
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