1 /* linux/arch/arm/mach-s3c2412/mach-vstms.c
3 * (C) 2006 Thomas Gleixner <tglx@linutronix.de>
5 * Derived from mach-smdk2413.c - (C) 2006 Simtec Electronics
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/kernel.h>
13 #include <linux/types.h>
14 #include <linux/interrupt.h>
15 #include <linux/list.h>
16 #include <linux/timer.h>
17 #include <linux/init.h>
18 #include <linux/serial_core.h>
19 #include <linux/platform_device.h>
21 #include <linux/mtd/mtd.h>
22 #include <linux/mtd/nand.h>
23 #include <linux/mtd/nand_ecc.h>
24 #include <linux/mtd/partitions.h>
26 #include <asm/mach/arch.h>
27 #include <asm/mach/map.h>
28 #include <asm/mach/irq.h>
30 #include <mach/hardware.h>
31 #include <asm/setup.h>
33 #include <asm/mach-types.h>
35 #include <plat/regs-serial.h>
36 #include <mach/regs-gpio.h>
37 #include <mach/regs-lcd.h>
41 #include <linux/platform_data/i2c-s3c2410.h>
42 #include <linux/platform_data/mtd-nand-s3c2410.h>
44 #include <plat/clock.h>
45 #include <plat/devs.h>
47 #include <plat/samsung-time.h>
51 static struct map_desc vstms_iodesc[] __initdata = {
54 static struct s3c2410_uartcfg vstms_uartcfgs[] __initdata = {
78 static struct mtd_partition __initdata vstms_nand_part[] = {
85 .name = "UBoot Config",
101 static struct s3c2410_nand_set __initdata vstms_nand_sets[] = {
105 .nr_partitions = ARRAY_SIZE(vstms_nand_part),
106 .partitions = vstms_nand_part,
110 /* choose a set of timings which should suit most 512Mbit
114 static struct s3c2410_platform_nand __initdata vstms_nand_info = {
118 .nr_sets = ARRAY_SIZE(vstms_nand_sets),
119 .sets = vstms_nand_sets,
122 static struct platform_device *vstms_devices[] __initdata = {
132 static void __init vstms_fixup(struct tag *tags, char **cmdline,
135 if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) {
137 mi->bank[0].start = 0x30000000;
138 mi->bank[0].size = SZ_64M;
142 static void __init vstms_map_io(void)
144 s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc));
145 s3c24xx_init_clocks(12000000);
146 s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs));
147 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
150 static void __init vstms_init(void)
152 s3c_i2c0_set_platdata(NULL);
153 s3c_nand_set_platdata(&vstms_nand_info);
155 platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices));
158 MACHINE_START(VSTMS, "VSTMS")
159 .atag_offset = 0x100,
161 .fixup = vstms_fixup,
162 .init_irq = s3c2412_init_irq,
163 .init_machine = vstms_init,
164 .map_io = vstms_map_io,
165 .init_time = samsung_timer_init,
166 .restart = s3c2412_restart,