aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c24xx/mach-tct_hammer.c
diff options
context:
space:
mode:
authorKukjin Kim <kgene.kim@samsung.com>2012-02-05 19:38:19 -0500
committerKukjin Kim <kgene.kim@samsung.com>2012-03-02 17:47:38 -0500
commit85fd6d63bf2927b9da7ab1b0d46723bfdb13808c (patch)
tree7033ac06e365209b09ba4b97eba0cf2f7ceb3312 /arch/arm/mach-s3c24xx/mach-tct_hammer.c
parentb130d5c29544fe4cedafd35b112d27a06550d844 (diff)
ARM: S3C2410: move mach-s3c2410/* into mach-s3c24xx/
This patch moves S3C2410 stuff into mach-s3c24xx/ directory so that we can merge the s3c24 series' directories to the just one mach-s3c24xx/ directory. And this patch is including following. - re-ordered alphabetically by option text at Kconfig and Makefile - removed unused option, MACH_N35 - fixed duplcated option name, S3C2410_DMA to S3C24XX_DMA which is in plat-s3c24xx/ Cc: Ben Dooks <ben-linux@fluff.org> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c24xx/mach-tct_hammer.c')
-rw-r--r--arch/arm/mach-s3c24xx/mach-tct_hammer.c157
1 files changed, 157 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
new file mode 100644
index 000000000000..1114666f0efb
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
@@ -0,0 +1,157 @@
1/* linux/arch/arm/mach-s3c2410/mach-tct_hammer.c
2 *
3 * Copyright (c) 2007 TinCanTools
4 * David Anders <danders@amltd.com>
5
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19 * MA 02111-1307 USA
20 *
21 * @History:
22 * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by
23 * Ben Dooks <ben@simtec.co.uk>
24 *
25 ***********************************************************************/
26
27#include <linux/kernel.h>
28#include <linux/types.h>
29#include <linux/interrupt.h>
30#include <linux/list.h>
31#include <linux/timer.h>
32#include <linux/init.h>
33#include <linux/device.h>
34#include <linux/platform_device.h>
35#include <linux/serial_core.h>
36#include <linux/io.h>
37
38#include <asm/mach/arch.h>
39#include <asm/mach/map.h>
40#include <asm/mach/irq.h>
41#include <asm/mach/flash.h>
42
43#include <mach/hardware.h>
44#include <asm/irq.h>
45#include <asm/mach-types.h>
46
47#include <plat/regs-serial.h>
48#include <plat/iic.h>
49#include <plat/devs.h>
50#include <plat/cpu.h>
51
52#include <linux/mtd/mtd.h>
53#include <linux/mtd/partitions.h>
54#include <linux/mtd/map.h>
55#include <linux/mtd/physmap.h>
56
57#include "common.h"
58
59static struct resource tct_hammer_nor_resource = {
60 .start = 0x00000000,
61 .end = 0x01000000 - 1,
62 .flags = IORESOURCE_MEM,
63};
64
65static struct mtd_partition tct_hammer_mtd_partitions[] = {
66 {
67 .name = "System",
68 .size = 0x240000,
69 .offset = 0,
70 .mask_flags = MTD_WRITEABLE, /* force read-only */
71 }, {
72 .name = "JFFS2",
73 .size = MTDPART_SIZ_FULL,
74 .offset = MTDPART_OFS_APPEND,
75 }
76};
77
78static struct physmap_flash_data tct_hammer_flash_data = {
79 .width = 2,
80 .parts = tct_hammer_mtd_partitions,
81 .nr_parts = ARRAY_SIZE(tct_hammer_mtd_partitions),
82};
83
84static struct platform_device tct_hammer_device_nor = {
85 .name = "physmap-flash",
86 .id = 0,
87 .dev = {
88 .platform_data = &tct_hammer_flash_data,
89 },
90 .num_resources = 1,
91 .resource = &tct_hammer_nor_resource,
92};
93
94static struct map_desc tct_hammer_iodesc[] __initdata = {
95};
96
97#define UCON S3C2410_UCON_DEFAULT
98#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
99#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
100
101static struct s3c2410_uartcfg tct_hammer_uartcfgs[] = {
102 [0] = {
103 .hwport = 0,
104 .flags = 0,
105 .ucon = UCON,
106 .ulcon = ULCON,
107 .ufcon = UFCON,
108 },
109 [1] = {
110 .hwport = 1,
111 .flags = 0,
112 .ucon = UCON,
113 .ulcon = ULCON,
114 .ufcon = UFCON,
115 },
116 [2] = {
117 .hwport = 2,
118 .flags = 0,
119 .ucon = UCON,
120 .ulcon = ULCON,
121 .ufcon = UFCON,
122 }
123};
124
125
126static struct platform_device *tct_hammer_devices[] __initdata = {
127 &s3c_device_adc,
128 &s3c_device_wdt,
129 &s3c_device_i2c0,
130 &s3c_device_ohci,
131 &s3c_device_rtc,
132 &s3c_device_usbgadget,
133 &s3c_device_sdi,
134 &tct_hammer_device_nor,
135};
136
137static void __init tct_hammer_map_io(void)
138{
139 s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc));
140 s3c24xx_init_clocks(0);
141 s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs));
142}
143
144static void __init tct_hammer_init(void)
145{
146 s3c_i2c0_set_platdata(NULL);
147 platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
148}
149
150MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
151 .atag_offset = 0x100,
152 .map_io = tct_hammer_map_io,
153 .init_irq = s3c24xx_init_irq,
154 .init_machine = tct_hammer_init,
155 .timer = &s3c24xx_timer,
156 .restart = s3c2410_restart,
157MACHINE_END