Skip to content

Commit

Permalink
ARM: S3C24XX: Add samsung-time support for s3c24xx
Browse files Browse the repository at this point in the history
Signed-off-by: Naour Romain <romain.naour@openwide.fr>
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
[heiko@sntech.de: tested on a s3c2416 based machine]
Reviewed-and-Tested-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 c1fcd40 commit 7f78b6e
Show file tree
Hide file tree
Showing 28 changed files with 100 additions and 35 deletions.
4 changes: 3 additions & 1 deletion arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,10 @@ config ARCH_SA1100
config ARCH_S3C24XX
bool "Samsung S3C24XX SoCs"
select ARCH_HAS_CPUFREQ
select ARCH_USES_GETTIMEOFFSET
select CLKDEV_LOOKUP
select CLKSRC_MMIO
select GENERIC_CLOCKEVENTS
select GENERIC_GPIO
select HAVE_CLK
select HAVE_S3C2410_I2C if I2C
select HAVE_S3C2410_WATCHDOG if WATCHDOG
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-s3c24xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ config CPU_S3C2410
select S3C2410_CLOCK
select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX
select S3C2410_PM if PM
select SAMSUNG_HRT
help
Support for S3C2410 and S3C2410A family from the S3C24XX line
of Samsung Mobile CPUs.
Expand All @@ -41,6 +42,7 @@ config CPU_S3C2412
select CPU_LLSERIAL_S3C2440
select S3C2412_DMA if S3C24XX_DMA
select S3C2412_PM if PM
select SAMSUNG_HRT
help
Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line

Expand All @@ -53,6 +55,7 @@ config CPU_S3C2416
select S3C2443_COMMON
select S3C2443_DMA if S3C24XX_DMA
select SAMSUNG_CLKSRC
select SAMSUNG_HRT
help
Support for the S3C2416 SoC from the S3C24XX line

Expand All @@ -63,6 +66,7 @@ config CPU_S3C2440
select S3C2410_CLOCK
select S3C2410_PM if PM
select S3C2440_DMA if S3C24XX_DMA
select SAMSUNG_HRT
help
Support for S3C2440 Samsung Mobile CPU based systems.

Expand All @@ -72,6 +76,7 @@ config CPU_S3C2442
select CPU_LLSERIAL_S3C2440
select S3C2410_CLOCK
select S3C2410_PM if PM
select SAMSUNG_HRT
help
Support for S3C2442 Samsung Mobile CPU based systems.

Expand All @@ -87,6 +92,7 @@ config CPU_S3C2443
select S3C2443_COMMON
select S3C2443_DMA if S3C24XX_DMA
select SAMSUNG_CLKSRC
select SAMSUNG_HRT
help
Support for the S3C2443 SoC from the S3C24XX line

Expand Down
5 changes: 4 additions & 1 deletion arch/arm/mach-s3c24xx/mach-amlm5900.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
#include <linux/mtd/map.h>
#include <linux/mtd/physmap.h>

#include <plat/samsung-time.h>

#include "common.h"

static struct resource amlm5900_nor_resource =
Expand Down Expand Up @@ -160,6 +162,7 @@ static void __init amlm5900_map_io(void)
s3c24xx_init_io(amlm5900_iodesc, ARRAY_SIZE(amlm5900_iodesc));
s3c24xx_init_clocks(0);
s3c24xx_init_uarts(amlm5900_uartcfgs, ARRAY_SIZE(amlm5900_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

#ifdef CONFIG_FB_S3C2410
Expand Down Expand Up @@ -237,6 +240,6 @@ MACHINE_START(AML_M5900, "AML_M5900")
.map_io = amlm5900_map_io,
.init_irq = s3c24xx_init_irq,
.init_machine = amlm5900_init,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c2410_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c24xx/mach-anubis.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 <linux/platform_data/asoc-s3c24xx_simtec.h>
#include <plat/samsung-time.h>

#include "anubis.h"
#include "common.h"
Expand Down Expand Up @@ -410,6 +411,7 @@ static void __init anubis_map_io(void)
s3c24xx_init_io(anubis_iodesc, ARRAY_SIZE(anubis_iodesc));
s3c24xx_init_clocks(0);
s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);

/* check for the newer revision boards with large page nand */

Expand Down Expand Up @@ -444,6 +446,6 @@ MACHINE_START(ANUBIS, "Simtec-Anubis")
.map_io = anubis_map_io,
.init_machine = anubis_init,
.init_irq = s3c24xx_init_irq,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c244x_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c24xx/mach-at2440evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <linux/platform_data/mmc-s3cmci.h>
#include <plat/samsung-time.h>

#include "common.h"

Expand Down Expand Up @@ -192,6 +193,7 @@ static void __init at2440evb_map_io(void)
s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc));
s3c24xx_init_clocks(16934400);
s3c24xx_init_uarts(at2440evb_uartcfgs, ARRAY_SIZE(at2440evb_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

static void __init at2440evb_init(void)
Expand All @@ -210,6 +212,6 @@ MACHINE_START(AT2440EVB, "AT2440EVB")
.map_io = at2440evb_map_io,
.init_machine = at2440evb_init,
.init_irq = s3c24xx_init_irq,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c244x_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c24xx/mach-bast.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include <plat/devs.h>
#include <plat/gpio-cfg.h>
#include <plat/regs-serial.h>
#include <plat/samsung-time.h>

#include "bast.h"
#include "common.h"
Expand Down Expand Up @@ -576,6 +577,7 @@ static void __init bast_map_io(void)
s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
s3c24xx_init_clocks(0);
s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

static void __init bast_init(void)
Expand Down Expand Up @@ -605,6 +607,6 @@ MACHINE_START(BAST, "Simtec-BAST")
.map_io = bast_map_io,
.init_irq = s3c24xx_init_irq,
.init_machine = bast_init,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c2410_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c24xx/mach-gta02.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
#include <plat/gpio-cfg.h>
#include <plat/pm.h>
#include <plat/regs-serial.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "gta02.h"
Expand Down Expand Up @@ -501,6 +502,7 @@ static void __init gta02_map_io(void)
s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}


Expand Down Expand Up @@ -589,6 +591,6 @@ MACHINE_START(NEO1973_GTA02, "GTA02")
.map_io = gta02_map_io,
.init_irq = s3c24xx_init_irq,
.init_machine = gta02_machine_init,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c244x_restart,
MACHINE_END
5 changes: 3 additions & 2 deletions arch/arm/mach-s3c24xx/mach-h1940.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#include <plat/pll.h>
#include <plat/pm.h>
#include <plat/regs-serial.h>

#include <plat/samsung-time.h>

#include "common.h"
#include "h1940.h"
Expand Down Expand Up @@ -646,6 +646,7 @@ static void __init h1940_map_io(void)
s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc));
s3c24xx_init_clocks(0);
s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);

/* setup PM */

Expand Down Expand Up @@ -741,6 +742,6 @@ MACHINE_START(H1940, "IPAQ-H1940")
.reserve = h1940_reserve,
.init_irq = h1940_init_irq,
.init_machine = h1940_init,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c2410_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c24xx/mach-jive.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <plat/cpu.h>
#include <plat/pm.h>
#include <linux/platform_data/usb-s3c2410_udc.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "s3c2412-power.h"
Expand Down Expand Up @@ -506,6 +507,7 @@ static void __init jive_map_io(void)
s3c24xx_init_io(jive_iodesc, ARRAY_SIZE(jive_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(jive_uartcfgs, ARRAY_SIZE(jive_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

static void jive_power_off(void)
Expand Down Expand Up @@ -661,6 +663,6 @@ MACHINE_START(JIVE, "JIVE")
.init_irq = s3c24xx_init_irq,
.map_io = jive_map_io,
.init_machine = jive_machine_init,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c2412_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c24xx/mach-mini2440.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include <plat/clock.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/samsung-time.h>

#include <sound/s3c24xx_uda134x.h>

Expand Down Expand Up @@ -525,6 +526,7 @@ static void __init mini2440_map_io(void)
s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

/*
Expand Down Expand Up @@ -687,6 +689,6 @@ MACHINE_START(MINI2440, "MINI2440")
.map_io = mini2440_map_io,
.init_machine = mini2440_init,
.init_irq = s3c24xx_init_irq,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c244x_restart,
MACHINE_END
6 changes: 4 additions & 2 deletions arch/arm/mach-s3c24xx/mach-n30.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <plat/devs.h>
#include <linux/platform_data/mmc-s3cmci.h>
#include <linux/platform_data/usb-s3c2410_udc.h>
#include <plat/samsung-time.h>

#include "common.h"

Expand Down Expand Up @@ -535,6 +536,7 @@ static void __init n30_map_io(void)
n30_hwinit();
s3c24xx_init_clocks(0);
s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

/* GPB3 is the line that controls the pull-up for the USB D+ line */
Expand Down Expand Up @@ -588,7 +590,7 @@ MACHINE_START(N30, "Acer-N30")
Ben Dooks <ben-linux@fluff.org>
*/
.atag_offset = 0x100,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.init_machine = n30_init,
.init_irq = s3c24xx_init_irq,
.map_io = n30_map_io,
Expand All @@ -599,7 +601,7 @@ MACHINE_START(N35, "Acer-N35")
/* Maintainer: Christer Weinigel <christer@weinigel.se>
*/
.atag_offset = 0x100,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.init_machine = n30_init,
.init_irq = s3c24xx_init_irq,
.map_io = n30_map_io,
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c24xx/mach-nexcoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,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 @@ -135,6 +136,7 @@ static void __init nexcoder_map_io(void)
s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc));
s3c24xx_init_clocks(0);
s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);

nexcoder_sensorboard_init();
}
Expand All @@ -151,6 +153,6 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
.map_io = nexcoder_map_io,
.init_machine = nexcoder_init,
.init_irq = s3c24xx_init_irq,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c244x_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c24xx/mach-osiris.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <plat/devs.h>
#include <plat/gpio-cfg.h>
#include <plat/regs-serial.h>
#include <plat/samsung-time.h>

#include <mach/hardware.h>
#include <mach/regs-gpio.h>
Expand Down Expand Up @@ -384,6 +385,7 @@ static void __init osiris_map_io(void)
s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
s3c24xx_init_clocks(0);
s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);

/* check for the newer revision boards with large page nand */

Expand Down Expand Up @@ -426,6 +428,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
.map_io = osiris_map_io,
.init_irq = s3c24xx_init_irq,
.init_machine = osiris_init,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c244x_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c24xx/mach-otom.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <plat/cpu.h>
#include <plat/devs.h>
#include <plat/regs-serial.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "otom.h"
Expand Down Expand Up @@ -101,6 +102,7 @@ static void __init otom11_map_io(void)
s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc));
s3c24xx_init_clocks(0);
s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

static void __init otom11_init(void)
Expand All @@ -115,6 +117,6 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
.map_io = otom11_map_io,
.init_machine = otom11_init,
.init_irq = s3c24xx_init_irq,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c2410_restart,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-s3c24xx/mach-qt2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/pm.h>
#include <plat/samsung-time.h>

#include "common.h"
#include "common-smdk.h"
Expand Down Expand Up @@ -304,6 +305,7 @@ static void __init qt2410_map_io(void)
s3c24xx_init_io(qt2410_iodesc, ARRAY_SIZE(qt2410_iodesc));
s3c24xx_init_clocks(12*1000*1000);
s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
}

static void __init qt2410_machine_init(void)
Expand Down Expand Up @@ -343,6 +345,6 @@ MACHINE_START(QT2410, "QT2410")
.map_io = qt2410_map_io,
.init_irq = s3c24xx_init_irq,
.init_machine = qt2410_machine_init,
.init_time = s3c24xx_timer_init,
.init_time = samsung_timer_init,
.restart = s3c2410_restart,
MACHINE_END
Loading

0 comments on commit 7f78b6e

Please sign in to comment.