Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07ee5e7c authored by Heiko Stuebner's avatar Heiko Stuebner Committed by Kukjin Kim
Browse files

ARM: S3C24XX: convert s3c2410 to common clock framework



Convert the machines using the s3c2410 to use the new driver based
on the common clock framework instead of the legacy Samsung clock driver.

As with the s3c244x, machines using the clkout output will need a fixup
from someone with the hardware.

Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Reviewed-by: default avatarTomasz Figa <t.figa@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent a28d618e
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -37,10 +37,10 @@ comment "S3C24XX SoCs"
config CPU_S3C2410
config CPU_S3C2410
	bool "SAMSUNG S3C2410"
	bool "SAMSUNG S3C2410"
	default y
	default y
	depends on SAMSUNG_CLOCK
	select COMMON_CLK
	select CPU_ARM920T
	select CPU_ARM920T
	select CPU_LLSERIAL_S3C2410
	select CPU_LLSERIAL_S3C2410
	select S3C2410_CLOCK
	select S3C2410_COMMON_CLK
	select S3C2410_DMA if S3C24XX_DMA
	select S3C2410_DMA if S3C24XX_DMA
	select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ
	select ARM_S3C2410_CPUFREQ if ARM_S3C24XX_CPUFREQ
	select S3C2410_PM if PM
	select S3C2410_PM if PM
+0 −2
Original line number Original line Diff line number Diff line
@@ -74,7 +74,6 @@ static struct cpu_table cpu_ids[] __initdata = {
		.idcode		= 0x32410000,
		.idcode		= 0x32410000,
		.idmask		= 0xffffffff,
		.idmask		= 0xffffffff,
		.map_io		= s3c2410_map_io,
		.map_io		= s3c2410_map_io,
		.init_clocks	= s3c2410_init_clocks,
		.init_uarts	= s3c2410_init_uarts,
		.init_uarts	= s3c2410_init_uarts,
		.init		= s3c2410_init,
		.init		= s3c2410_init,
		.name		= name_s3c2410
		.name		= name_s3c2410
@@ -83,7 +82,6 @@ static struct cpu_table cpu_ids[] __initdata = {
		.idcode		= 0x32410002,
		.idcode		= 0x32410002,
		.idmask		= 0xffffffff,
		.idmask		= 0xffffffff,
		.map_io		= s3c2410_map_io,
		.map_io		= s3c2410_map_io,
		.init_clocks	= s3c2410_init_clocks,
		.init_uarts	= s3c2410_init_uarts,
		.init_uarts	= s3c2410_init_uarts,
		.init		= s3c2410a_init,
		.init		= s3c2410a_init,
		.name		= name_s3c2410a
		.name		= name_s3c2410a
+7 −2
Original line number Original line Diff line number Diff line
@@ -161,11 +161,16 @@ static struct platform_device *amlm5900_devices[] __initdata = {
static void __init amlm5900_map_io(void)
static void __init amlm5900_map_io(void)
{
{
	s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc));
	s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc));
	s3c24xx_init_clocks(0);
	s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs));
	s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs));
	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}
}


static void __init amlm5900_init_time(void)
{
	s3c2410_init_clocks(12000000);
	samsung_timer_init();
}

#ifdef CONFIG_FB_S3C2410
#ifdef CONFIG_FB_S3C2410
static struct s3c2410fb_display __initdata amlm5900_lcd_info = {
static struct s3c2410fb_display __initdata amlm5900_lcd_info = {
	.width		= 160,
	.width		= 160,
@@ -241,6 +246,6 @@ MACHINE_START(AML_M5900, "AML_M5900")
	.map_io		= amlm5900_map_io,
	.map_io		= amlm5900_map_io,
	.init_irq	= s3c2410_init_irq,
	.init_irq	= s3c2410_init_irq,
	.init_machine	= amlm5900_init,
	.init_machine	= amlm5900_init,
	.init_time	= samsung_timer_init,
	.init_time	= amlm5900_init_time,
	.restart	= s3c2410_restart,
	.restart	= s3c2410_restart,
MACHINE_END
MACHINE_END
+7 −3
Original line number Original line Diff line number Diff line
@@ -51,7 +51,6 @@
#include <mach/regs-lcd.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
#include <mach/gpio-samsung.h>


#include <plat/clock.h>
#include <plat/cpu.h>
#include <plat/cpu.h>
#include <plat/cpu-freq.h>
#include <plat/cpu-freq.h>
#include <plat/devs.h>
#include <plat/devs.h>
@@ -581,11 +580,16 @@ static void __init bast_map_io(void)
	s3c_hwmon_set_platdata(&bast_hwmon_info);
	s3c_hwmon_set_platdata(&bast_hwmon_info);


	s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
	s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
	s3c24xx_init_clocks(0);
	s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
	s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}
}


static void __init bast_init_time(void)
{
	s3c2410_init_clocks(12000000);
	samsung_timer_init();
}

static void __init bast_init(void)
static void __init bast_init(void)
{
{
	register_syscore_ops(&bast_pm_syscore_ops);
	register_syscore_ops(&bast_pm_syscore_ops);
@@ -613,6 +617,6 @@ MACHINE_START(BAST, "Simtec-BAST")
	.map_io		= bast_map_io,
	.map_io		= bast_map_io,
	.init_irq	= s3c2410_init_irq,
	.init_irq	= s3c2410_init_irq,
	.init_machine	= bast_init,
	.init_machine	= bast_init,
	.init_time	= samsung_timer_init,
	.init_time	= bast_init_time,
	.restart	= s3c2410_restart,
	.restart	= s3c2410_restart,
MACHINE_END
MACHINE_END
+7 −3
Original line number Original line Diff line number Diff line
@@ -57,7 +57,6 @@
#include <mach/regs-lcd.h>
#include <mach/regs-lcd.h>
#include <mach/gpio-samsung.h>
#include <mach/gpio-samsung.h>


#include <plat/clock.h>
#include <plat/cpu.h>
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/devs.h>
#include <plat/gpio-cfg.h>
#include <plat/gpio-cfg.h>
@@ -646,7 +645,6 @@ static struct platform_device *h1940_devices[] __initdata = {
static void __init h1940_map_io(void)
static void __init h1940_map_io(void)
{
{
	s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc));
	s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc));
	s3c24xx_init_clocks(0);
	s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
	s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);


@@ -662,6 +660,12 @@ static void __init h1940_map_io(void)
	WARN_ON(gpiochip_add(&h1940_latch_gpiochip));
	WARN_ON(gpiochip_add(&h1940_latch_gpiochip));
}
}


static void __init h1940_init_time(void)
{
	s3c2410_init_clocks(12000000);
	samsung_timer_init();
}

/* H1940 and RX3715 need to reserve this for suspend */
/* H1940 and RX3715 need to reserve this for suspend */
static void __init h1940_reserve(void)
static void __init h1940_reserve(void)
{
{
@@ -739,6 +743,6 @@ MACHINE_START(H1940, "IPAQ-H1940")
	.reserve	= h1940_reserve,
	.reserve	= h1940_reserve,
	.init_irq	= s3c2410_init_irq,
	.init_irq	= s3c2410_init_irq,
	.init_machine	= h1940_init,
	.init_machine	= h1940_init,
	.init_time	= samsung_timer_init,
	.init_time	= h1940_init_time,
	.restart	= s3c2410_restart,
	.restart	= s3c2410_restart,
MACHINE_END
MACHINE_END
Loading