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

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

ARM: S3C24XX: convert s3c2440 and s3c2442 to common clock framework



Convert all machines using these cpus to use the ccf clock driver
instead of the legacy Samsung clock implementation.

Some of the more esotheric machines will probably need a fixup, as they
do strange things to the clkout outputs, that I did not really understand
nor have the hardware to check.

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 4659c534
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -73,10 +73,10 @@ config CPU_S3C2416


config CPU_S3C2440
config CPU_S3C2440
	bool "SAMSUNG S3C2440"
	bool "SAMSUNG S3C2440"
	depends on SAMSUNG_CLOCK
	select COMMON_CLK
	select CPU_ARM920T
	select CPU_ARM920T
	select CPU_LLSERIAL_S3C2440
	select CPU_LLSERIAL_S3C2440
	select S3C2410_CLOCK
	select S3C2410_COMMON_CLK
	select S3C2410_PM if PM
	select S3C2410_PM if PM
	select S3C2440_DMA if S3C24XX_DMA
	select S3C2440_DMA if S3C24XX_DMA
	help
	help
@@ -84,10 +84,10 @@ config CPU_S3C2440


config CPU_S3C2442
config CPU_S3C2442
	bool "SAMSUNG S3C2442"
	bool "SAMSUNG S3C2442"
	depends on SAMSUNG_CLOCK
	select COMMON_CLK
	select CPU_ARM920T
	select CPU_ARM920T
	select CPU_LLSERIAL_S3C2440
	select CPU_LLSERIAL_S3C2440
	select S3C2410_CLOCK
	select S3C2410_COMMON_CLK
	select S3C2410_DMA if S3C24XX_DMA
	select S3C2410_DMA if S3C24XX_DMA
	select S3C2410_PM if PM
	select S3C2410_PM if PM
	help
	help
+2 −2
Original line number Original line Diff line number Diff line
@@ -29,9 +29,9 @@ obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep-s3c2412.o
obj-$(CONFIG_CPU_S3C2416)	+= s3c2416.o
obj-$(CONFIG_CPU_S3C2416)	+= s3c2416.o
obj-$(CONFIG_S3C2416_PM)	+= pm-s3c2416.o
obj-$(CONFIG_S3C2416_PM)	+= pm-s3c2416.o


obj-$(CONFIG_CPU_S3C2440)	+= s3c2440.o clock-s3c2440.o
obj-$(CONFIG_CPU_S3C2440)	+= s3c2440.o
obj-$(CONFIG_CPU_S3C2442)	+= s3c2442.o
obj-$(CONFIG_CPU_S3C2442)	+= s3c2442.o
obj-$(CONFIG_CPU_S3C244X)	+= s3c244x.o clock-s3c244x.o
obj-$(CONFIG_CPU_S3C244X)	+= s3c244x.o
obj-$(CONFIG_S3C2440_DMA)	+= dma-s3c2440.o
obj-$(CONFIG_S3C2440_DMA)	+= dma-s3c2440.o
obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o
obj-$(CONFIG_S3C2440_PLL_12000000) += pll-s3c2440-12000000.o
obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o
obj-$(CONFIG_S3C2440_PLL_16934400) += pll-s3c2440-16934400.o
+0 −4
Original line number Original line Diff line number Diff line
@@ -92,7 +92,6 @@ static struct cpu_table cpu_ids[] __initdata = {
		.idcode		= 0x32440000,
		.idcode		= 0x32440000,
		.idmask		= 0xffffffff,
		.idmask		= 0xffffffff,
		.map_io		= s3c2440_map_io,
		.map_io		= s3c2440_map_io,
		.init_clocks	= s3c244x_init_clocks,
		.init_uarts	= s3c244x_init_uarts,
		.init_uarts	= s3c244x_init_uarts,
		.init		= s3c2440_init,
		.init		= s3c2440_init,
		.name		= name_s3c2440
		.name		= name_s3c2440
@@ -101,7 +100,6 @@ static struct cpu_table cpu_ids[] __initdata = {
		.idcode		= 0x32440001,
		.idcode		= 0x32440001,
		.idmask		= 0xffffffff,
		.idmask		= 0xffffffff,
		.map_io		= s3c2440_map_io,
		.map_io		= s3c2440_map_io,
		.init_clocks	= s3c244x_init_clocks,
		.init_uarts	= s3c244x_init_uarts,
		.init_uarts	= s3c244x_init_uarts,
		.init		= s3c2440_init,
		.init		= s3c2440_init,
		.name		= name_s3c2440a
		.name		= name_s3c2440a
@@ -110,7 +108,6 @@ static struct cpu_table cpu_ids[] __initdata = {
		.idcode		= 0x32440aaa,
		.idcode		= 0x32440aaa,
		.idmask		= 0xffffffff,
		.idmask		= 0xffffffff,
		.map_io		= s3c2442_map_io,
		.map_io		= s3c2442_map_io,
		.init_clocks	= s3c244x_init_clocks,
		.init_uarts	= s3c244x_init_uarts,
		.init_uarts	= s3c244x_init_uarts,
		.init		= s3c2442_init,
		.init		= s3c2442_init,
		.name		= name_s3c2442
		.name		= name_s3c2442
@@ -119,7 +116,6 @@ static struct cpu_table cpu_ids[] __initdata = {
		.idcode		= 0x32440aab,
		.idcode		= 0x32440aab,
		.idmask		= 0xffffffff,
		.idmask		= 0xffffffff,
		.map_io		= s3c2442_map_io,
		.map_io		= s3c2442_map_io,
		.init_clocks	= s3c244x_init_clocks,
		.init_uarts	= s3c244x_init_uarts,
		.init_uarts	= s3c244x_init_uarts,
		.init		= s3c2442_init,
		.init		= s3c2442_init,
		.name		= name_s3c2442b
		.name		= name_s3c2442b
+7 −3
Original line number Original line Diff line number Diff line
@@ -46,7 +46,6 @@


#include <net/ax88796.h>
#include <net/ax88796.h>


#include <plat/clock.h>
#include <plat/devs.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/cpu.h>
#include <linux/platform_data/asoc-s3c24xx_simtec.h>
#include <linux/platform_data/asoc-s3c24xx_simtec.h>
@@ -415,7 +414,6 @@ static void __init anubis_map_io(void)
#endif
#endif


	s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
	s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
	s3c24xx_init_clocks(0);
	s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
	s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);


@@ -433,6 +431,12 @@ static void __init anubis_map_io(void)
	}
	}
}
}


static void __init anubis_init_time(void)
{
	s3c2440_init_clocks(12000000);
	samsung_timer_init();
}

static void __init anubis_init(void)
static void __init anubis_init(void)
{
{
	s3c_i2c0_set_platdata(NULL);
	s3c_i2c0_set_platdata(NULL);
@@ -452,6 +456,6 @@ MACHINE_START(ANUBIS, "Simtec-Anubis")
	.map_io		= anubis_map_io,
	.map_io		= anubis_map_io,
	.init_machine	= anubis_init,
	.init_machine	= anubis_init,
	.init_irq	= s3c2440_init_irq,
	.init_irq	= s3c2440_init_irq,
	.init_time	= samsung_timer_init,
	.init_time	= anubis_init_time,
	.restart	= s3c244x_restart,
	.restart	= s3c244x_restart,
MACHINE_END
MACHINE_END
+7 −3
Original line number Original line Diff line number Diff line
@@ -45,7 +45,6 @@
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/partitions.h>


#include <plat/clock.h>
#include <plat/devs.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/cpu.h>
#include <linux/platform_data/mmc-s3cmci.h>
#include <linux/platform_data/mmc-s3cmci.h>
@@ -192,11 +191,16 @@ static struct platform_device *at2440evb_devices[] __initdata = {
static void __init at2440evb_map_io(void)
static void __init at2440evb_map_io(void)
{
{
	s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc));
	s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc));
	s3c24xx_init_clocks(16934400);
	s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs));
	s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs));
	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
	samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}
}


static void __init at2440evb_init_time(void)
{
	s3c2440_init_clocks(16934400);
	samsung_timer_init();
}

static void __init at2440evb_init(void)
static void __init at2440evb_init(void)
{
{
	s3c24xx_fb_set_platdata(&at2440evb_fb_info);
	s3c24xx_fb_set_platdata(&at2440evb_fb_info);
@@ -213,6 +217,6 @@ MACHINE_START(AT2440EVB, "AT2440EVB")
	.map_io		= at2440evb_map_io,
	.map_io		= at2440evb_map_io,
	.init_machine	= at2440evb_init,
	.init_machine	= at2440evb_init,
	.init_irq	= s3c2440_init_irq,
	.init_irq	= s3c2440_init_irq,
	.init_time	= samsung_timer_init,
	.init_time	= at2440evb_init_time,
	.restart	= s3c244x_restart,
	.restart	= s3c244x_restart,
MACHINE_END
MACHINE_END
Loading