Skip to content

Commit

Permalink
ARM: S3C64XX: Add samsung-time support for s3c64xx
Browse files Browse the repository at this point in the history
Signed-off-by: Naour Romain <romain.naour@openwide.fr>
[tomasz.figa@gmail.com: tested on a Tiny6410 board]
Reviewed-and-Tested-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Romain Naour authored and Kukjin Kim committed Mar 5, 2013
1 parent 7f78b6e commit 04a49b7
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 11 deletions.
3 changes: 2 additions & 1 deletion arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -790,10 +790,11 @@ config ARCH_S3C64XX
bool "Samsung S3C64XX"
select ARCH_HAS_CPUFREQ
select ARCH_REQUIRE_GPIOLIB
select ARCH_USES_GETTIMEOFFSET
select ARM_VIC
select CLKDEV_LOOKUP
select CLKSRC_MMIO
select CPU_V6
select GENERIC_CLOCKEVENTS
select HAVE_CLK
select HAVE_S3C2410_I2C if I2C
select HAVE_S3C2410_WATCHDOG if WATCHDOG
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-s3c64xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ config PLAT_S3C64XX
# Configuration options for the S3C6410 CPU

config CPU_S3C6400
select SAMSUNG_HRT
bool
help
Enable S3C6400 CPU support

config CPU_S3C6410
select SAMSUNG_HRT
bool
help
Enable S3C6410 CPU support
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c64xx/mach-anw6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <mach/regs-gpio.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "regs-modem.h"
Expand Down Expand Up @@ -208,6 +209,7 @@ static void __init anw6410_map_io(void)
s3c64xx_init_io(anw6410_iodesc, ARRAY_SIZE(anw6410_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(anw6410_uartcfgs, ARRAY_SIZE(anw6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);

anw6410_lcd_mode_set();
}
Expand All @@ -232,6 +234,6 @@ MACHINE_START(ANW6410, "A&W6410")
.map_io = anw6410_map_io,
.init_machine = anw6410_machine_init,
.init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c64xx/mach-crag6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#include <plat/adc.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/pm.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "crag6410.h"
Expand Down Expand Up @@ -744,6 +745,7 @@ static void __init crag6410_map_io(void)
s3c64xx_init_io(NULL, 0);
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(crag6410_uartcfgs, ARRAY_SIZE(crag6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);

/* LCD type and Bypass set by bootloader */
}
Expand Down Expand Up @@ -868,6 +870,6 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410")
.map_io = crag6410_map_io,
.init_machine = crag6410_machine_init,
.init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c64xx/mach-hmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <plat/clock.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/samsung-time.h>

#include "common.h"

Expand Down Expand Up @@ -248,6 +249,7 @@ static void __init hmt_map_io(void)
s3c64xx_init_io(hmt_iodesc, ARRAY_SIZE(hmt_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(hmt_uartcfgs, ARRAY_SIZE(hmt_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

static void __init hmt_machine_init(void)
Expand Down Expand Up @@ -275,6 +277,6 @@ MACHINE_START(HMT, "Airgoo-HMT")
.map_io = hmt_map_io,
.init_machine = hmt_machine_init,
.init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c64xx/mach-mini6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#include <video/platform_lcd.h>
#include <video/samsung_fimd.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "regs-modem.h"
Expand Down Expand Up @@ -232,6 +233,7 @@ static void __init mini6410_map_io(void)
s3c64xx_init_io(NULL, 0);
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(mini6410_uartcfgs, ARRAY_SIZE(mini6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);

/* set the LCD type */
tmp = __raw_readl(S3C64XX_SPCON);
Expand Down Expand Up @@ -354,6 +356,6 @@ MACHINE_START(MINI6410, "MINI6410")
.map_io = mini6410_map_io,
.init_machine = mini6410_machine_init,
.init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c64xx/mach-ncp.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <plat/clock.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/samsung-time.h>

#include "common.h"

Expand Down Expand Up @@ -87,6 +88,7 @@ static void __init ncp_map_io(void)
s3c64xx_init_io(ncp_iodesc, ARRAY_SIZE(ncp_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(ncp_uartcfgs, ARRAY_SIZE(ncp_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

static void __init ncp_machine_init(void)
Expand All @@ -103,6 +105,6 @@ MACHINE_START(NCP, "NCP")
.map_io = ncp_map_io,
.init_machine = ncp_machine_init,
.init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c64xx/mach-real6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

#include <video/platform_lcd.h>
#include <video/samsung_fimd.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "regs-modem.h"
Expand Down Expand Up @@ -211,6 +212,7 @@ static void __init real6410_map_io(void)
s3c64xx_init_io(NULL, 0);
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);

/* set the LCD type */
tmp = __raw_readl(S3C64XX_SPCON);
Expand Down Expand Up @@ -333,6 +335,6 @@ MACHINE_START(REAL6410, "REAL6410")
.map_io = real6410_map_io,
.init_machine = real6410_machine_init,
.init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
MACHINE_END
2 changes: 2 additions & 0 deletions arch/arm/mach-s3c64xx/mach-smartq.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <linux/platform_data/touchscreen-s3c2410.h>

#include <video/platform_lcd.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "regs-modem.h"
Expand Down Expand Up @@ -378,6 +379,7 @@ void __init smartq_map_io(void)
s3c64xx_init_io(smartq_iodesc, ARRAY_SIZE(smartq_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(smartq_uartcfgs, ARRAY_SIZE(smartq_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);

smartq_lcd_mode_set();
}
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-s3c64xx/mach-smartq5.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <plat/devs.h>
#include <plat/fb.h>
#include <plat/gpio-cfg.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "mach-smartq.h"
Expand Down Expand Up @@ -155,6 +156,6 @@ MACHINE_START(SMARTQ5, "SmartQ 5")
.map_io = smartq_map_io,
.init_machine = smartq5_machine_init,
.init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
MACHINE_END
3 changes: 2 additions & 1 deletion arch/arm/mach-s3c64xx/mach-smartq7.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <plat/devs.h>
#include <plat/fb.h>
#include <plat/gpio-cfg.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "mach-smartq.h"
Expand Down Expand Up @@ -171,6 +172,6 @@ MACHINE_START(SMARTQ7, "SmartQ 7")
.map_io = smartq_map_io,
.init_machine = smartq7_machine_init,
.init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c64xx/mach-smdk6400.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/samsung-time.h>

#include "common.h"

Expand Down Expand Up @@ -66,6 +67,7 @@ static void __init smdk6400_map_io(void)
s3c64xx_init_io(smdk6400_iodesc, ARRAY_SIZE(smdk6400_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(smdk6400_uartcfgs, ARRAY_SIZE(smdk6400_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

static struct platform_device *smdk6400_devices[] __initdata = {
Expand All @@ -92,6 +94,6 @@ MACHINE_START(SMDK6400, "SMDK6400")
.map_io = smdk6400_map_io,
.init_machine = smdk6400_machine_init,
.init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c64xx/mach-smdk6410.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
#include <linux/platform_data/touchscreen-s3c2410.h>
#include <plat/keypad.h>
#include <plat/backlight.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "regs-modem.h"
Expand Down Expand Up @@ -634,6 +635,7 @@ static void __init smdk6410_map_io(void)
s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);

/* set the LCD type */

Expand Down Expand Up @@ -702,6 +704,6 @@ MACHINE_START(SMDK6410, "SMDK6410")
.map_io = smdk6410_map_io,
.init_machine = smdk6410_machine_init,
.init_late = s3c64xx_init_late,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c64xx_restart,
MACHINE_END

0 comments on commit 04a49b7

Please sign in to comment.