Commit 04a49b71 authored by Romain Naour's avatar Romain Naour Committed by Kukjin Kim

ARM: S3C64XX: Add samsung-time support for s3c64xx

Signed-off-by: default avatarNaour Romain <romain.naour@openwide.fr>
[tomasz.figa@gmail.com: tested on a Tiny6410 board]
Reviewed-and-Tested-by: default avatarTomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent 7f78b6eb
...@@ -790,10 +790,11 @@ config ARCH_S3C64XX ...@@ -790,10 +790,11 @@ config ARCH_S3C64XX
bool "Samsung S3C64XX" bool "Samsung S3C64XX"
select ARCH_HAS_CPUFREQ select ARCH_HAS_CPUFREQ
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select ARCH_USES_GETTIMEOFFSET
select ARM_VIC select ARM_VIC
select CLKDEV_LOOKUP select CLKDEV_LOOKUP
select CLKSRC_MMIO
select CPU_V6 select CPU_V6
select GENERIC_CLOCKEVENTS
select HAVE_CLK select HAVE_CLK
select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_I2C if I2C
select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C2410_WATCHDOG if WATCHDOG
......
...@@ -17,11 +17,13 @@ config PLAT_S3C64XX ...@@ -17,11 +17,13 @@ config PLAT_S3C64XX
# Configuration options for the S3C6410 CPU # Configuration options for the S3C6410 CPU
config CPU_S3C6400 config CPU_S3C6400
select SAMSUNG_HRT
bool bool
help help
Enable S3C6400 CPU support Enable S3C6400 CPU support
config CPU_S3C6410 config CPU_S3C6410
select SAMSUNG_HRT
bool bool
help help
Enable S3C6410 CPU support Enable S3C6410 CPU support
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/cpu.h> #include <plat/cpu.h>
#include <mach/regs-gpio.h> #include <mach/regs-gpio.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
#include "regs-modem.h" #include "regs-modem.h"
...@@ -208,6 +209,7 @@ static void __init anw6410_map_io(void) ...@@ -208,6 +209,7 @@ static void __init anw6410_map_io(void)
s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc)); s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc));
s3c24xx_init_clocks(12000000); s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs)); s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
anw6410_lcd_mode_set(); anw6410_lcd_mode_set();
} }
...@@ -232,6 +234,6 @@ MACHINE_START(ANW6410, "A&W6410") ...@@ -232,6 +234,6 @@ MACHINE_START(ANW6410, "A&W6410")
.map_io = anw6410_map_io, .map_io = anw6410_map_io,
.init_machine = anw6410_machine_init, .init_machine = anw6410_machine_init,
.init_late = s3c64xx_init_late, .init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init, .init_time = samsung_timer_init,
.restart = s3c64xx_restart, .restart = s3c64xx_restart,
MACHINE_END MACHINE_END
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
#include <plat/adc.h> #include <plat/adc.h>
#include <linux/platform_data/i2c-s3c2410.h> #include <linux/platform_data/i2c-s3c2410.h>
#include <plat/pm.h> #include <plat/pm.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
#include "crag6410.h" #include "crag6410.h"
...@@ -744,6 +745,7 @@ static void __init crag6410_map_io(void) ...@@ -744,6 +745,7 @@ static void __init crag6410_map_io(void)
s3c64xx_init_io(NULL, 0); s3c64xx_init_io(NULL, 0);
s3c24xx_init_clocks(12000000); s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs)); s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
/* LCD type and Bypass set by bootloader */ /* LCD type and Bypass set by bootloader */
} }
...@@ -868,6 +870,6 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") ...@@ -868,6 +870,6 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410")
.map_io = crag6410_map_io, .map_io = crag6410_map_io,
.init_machine = crag6410_machine_init, .init_machine = crag6410_machine_init,
.init_late = s3c64xx_init_late, .init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init, .init_time = samsung_timer_init,
.restart = s3c64xx_restart, .restart = s3c64xx_restart,
MACHINE_END MACHINE_END
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <plat/clock.h> #include <plat/clock.h>
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/cpu.h> #include <plat/cpu.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
...@@ -248,6 +249,7 @@ static void __init hmt_map_io(void) ...@@ -248,6 +249,7 @@ static void __init hmt_map_io(void)
s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc)); s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc));
s3c24xx_init_clocks(12000000); s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs)); s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
} }
static void __init hmt_machine_init(void) static void __init hmt_machine_init(void)
...@@ -275,6 +277,6 @@ MACHINE_START(HMT, "Airgoo-HMT") ...@@ -275,6 +277,6 @@ MACHINE_START(HMT, "Airgoo-HMT")
.map_io = hmt_map_io, .map_io = hmt_map_io,
.init_machine = hmt_machine_init, .init_machine = hmt_machine_init,
.init_late = s3c64xx_init_late, .init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init, .init_time = samsung_timer_init,
.restart = s3c64xx_restart, .restart = s3c64xx_restart,
MACHINE_END MACHINE_END
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <video/platform_lcd.h> #include <video/platform_lcd.h>
#include <video/samsung_fimd.h> #include <video/samsung_fimd.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
#include "regs-modem.h" #include "regs-modem.h"
...@@ -232,6 +233,7 @@ static void __init mini6410_map_io(void) ...@@ -232,6 +233,7 @@ static void __init mini6410_map_io(void)
s3c64xx_init_io(NULL, 0); s3c64xx_init_io(NULL, 0);
s3c24xx_init_clocks(12000000); s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(mini6410_uartcfgs, ARRAY_SIZE(mini6410_uartcfgs)); s3c24xx_init_uarts(mini6410_uartcfgs, ARRAY_SIZE(mini6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
/* set the LCD type */ /* set the LCD type */
tmp = __raw_readl(S3C64XX_SPCON); tmp = __raw_readl(S3C64XX_SPCON);
...@@ -354,6 +356,6 @@ MACHINE_START(MINI6410, "MINI6410") ...@@ -354,6 +356,6 @@ MACHINE_START(MINI6410, "MINI6410")
.map_io = mini6410_map_io, .map_io = mini6410_map_io,
.init_machine = mini6410_machine_init, .init_machine = mini6410_machine_init,
.init_late = s3c64xx_init_late, .init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init, .init_time = samsung_timer_init,
.restart = s3c64xx_restart, .restart = s3c64xx_restart,
MACHINE_END MACHINE_END
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <plat/clock.h> #include <plat/clock.h>
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/cpu.h> #include <plat/cpu.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
...@@ -87,6 +88,7 @@ static void __init ncp_map_io(void) ...@@ -87,6 +88,7 @@ static void __init ncp_map_io(void)
s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc)); s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc));
s3c24xx_init_clocks(12000000); s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs)); s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
} }
static void __init ncp_machine_init(void) static void __init ncp_machine_init(void)
...@@ -103,6 +105,6 @@ MACHINE_START(NCP, "NCP") ...@@ -103,6 +105,6 @@ MACHINE_START(NCP, "NCP")
.map_io = ncp_map_io, .map_io = ncp_map_io,
.init_machine = ncp_machine_init, .init_machine = ncp_machine_init,
.init_late = s3c64xx_init_late, .init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init, .init_time = samsung_timer_init,
.restart = s3c64xx_restart, .restart = s3c64xx_restart,
MACHINE_END MACHINE_END
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <video/platform_lcd.h> #include <video/platform_lcd.h>
#include <video/samsung_fimd.h> #include <video/samsung_fimd.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
#include "regs-modem.h" #include "regs-modem.h"
...@@ -211,6 +212,7 @@ static void __init real6410_map_io(void) ...@@ -211,6 +212,7 @@ static void __init real6410_map_io(void)
s3c64xx_init_io(NULL, 0); s3c64xx_init_io(NULL, 0);
s3c24xx_init_clocks(12000000); s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs)); s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
/* set the LCD type */ /* set the LCD type */
tmp = __raw_readl(S3C64XX_SPCON); tmp = __raw_readl(S3C64XX_SPCON);
...@@ -333,6 +335,6 @@ MACHINE_START(REAL6410, "REAL6410") ...@@ -333,6 +335,6 @@ MACHINE_START(REAL6410, "REAL6410")
.map_io = real6410_map_io, .map_io = real6410_map_io,
.init_machine = real6410_machine_init, .init_machine = real6410_machine_init,
.init_late = s3c64xx_init_late, .init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init, .init_time = samsung_timer_init,
.restart = s3c64xx_restart, .restart = s3c64xx_restart,
MACHINE_END MACHINE_END
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <linux/platform_data/touchscreen-s3c2410.h> #include <linux/platform_data/touchscreen-s3c2410.h>
#include <video/platform_lcd.h> #include <video/platform_lcd.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
#include "regs-modem.h" #include "regs-modem.h"
...@@ -378,6 +379,7 @@ void __init smartq_map_io(void) ...@@ -378,6 +379,7 @@ void __init smartq_map_io(void)
s3c64xx_init_io(smartq_iodesc, ARRAY_SIZE(smartq_iodesc)); s3c64xx_init_io(smartq_iodesc, ARRAY_SIZE(smartq_iodesc));
s3c24xx_init_clocks(12000000); s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs)); s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
smartq_lcd_mode_set(); smartq_lcd_mode_set();
} }
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/fb.h> #include <plat/fb.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
#include "mach-smartq.h" #include "mach-smartq.h"
...@@ -155,6 +156,6 @@ MACHINE_START(SMARTQ5, "SmartQ 5") ...@@ -155,6 +156,6 @@ MACHINE_START(SMARTQ5, "SmartQ 5")
.map_io = smartq_map_io, .map_io = smartq_map_io,
.init_machine = smartq5_machine_init, .init_machine = smartq5_machine_init,
.init_late = s3c64xx_init_late, .init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init, .init_time = samsung_timer_init,
.restart = s3c64xx_restart, .restart = s3c64xx_restart,
MACHINE_END MACHINE_END
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/fb.h> #include <plat/fb.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
#include "mach-smartq.h" #include "mach-smartq.h"
...@@ -171,6 +172,6 @@ MACHINE_START(SMARTQ7, "SmartQ 7") ...@@ -171,6 +172,6 @@ MACHINE_START(SMARTQ7, "SmartQ 7")
.map_io = smartq_map_io, .map_io = smartq_map_io,
.init_machine = smartq7_machine_init, .init_machine = smartq7_machine_init,
.init_late = s3c64xx_init_late, .init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init, .init_time = samsung_timer_init,
.restart = s3c64xx_restart, .restart = s3c64xx_restart,
MACHINE_END MACHINE_END
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/cpu.h> #include <plat/cpu.h>
#include <linux/platform_data/i2c-s3c2410.h> #include <linux/platform_data/i2c-s3c2410.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
...@@ -66,6 +67,7 @@ static void __init smdk6400_map_io(void) ...@@ -66,6 +67,7 @@ static void __init smdk6400_map_io(void)
s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc)); s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc));
s3c24xx_init_clocks(12000000); s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs)); s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
} }
static struct platform_device *smdk6400_devices[] __initdata = { static struct platform_device *smdk6400_devices[] __initdata = {
...@@ -92,6 +94,6 @@ MACHINE_START(SMDK6400, "SMDK6400") ...@@ -92,6 +94,6 @@ MACHINE_START(SMDK6400, "SMDK6400")
.map_io = smdk6400_map_io, .map_io = smdk6400_map_io,
.init_machine = smdk6400_machine_init, .init_machine = smdk6400_machine_init,
.init_late = s3c64xx_init_late, .init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init, .init_time = samsung_timer_init,
.restart = s3c64xx_restart, .restart = s3c64xx_restart,
MACHINE_END MACHINE_END
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
#include <linux/platform_data/touchscreen-s3c2410.h> #include <linux/platform_data/touchscreen-s3c2410.h>
#include <plat/keypad.h> #include <plat/keypad.h>
#include <plat/backlight.h> #include <plat/backlight.h>
#include <plat/samsung-time.h>
#include "common.h" #include "common.h"
#include "regs-modem.h" #include "regs-modem.h"
...@@ -634,6 +635,7 @@ static void __init smdk6410_map_io(void) ...@@ -634,6 +635,7 @@ static void __init smdk6410_map_io(void)
s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc)); s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc));
s3c24xx_init_clocks(12000000); s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs)); s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
/* set the LCD type */ /* set the LCD type */
...@@ -702,6 +704,6 @@ MACHINE_START(SMDK6410, "SMDK6410") ...@@ -702,6 +704,6 @@ MACHINE_START(SMDK6410, "SMDK6410")
.map_io = smdk6410_map_io, .map_io = smdk6410_map_io,
.init_machine = smdk6410_machine_init, .init_machine = smdk6410_machine_init,
.init_late = s3c64xx_init_late, .init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init, .init_time = samsung_timer_init,
.restart = s3c64xx_restart, .restart = s3c64xx_restart,
MACHINE_END MACHINE_END
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