aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410
diff options
context:
space:
mode:
authorDavid Anders <danders@amltd.com>2008-04-10 17:36:59 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-17 12:34:56 -0400
commit79b34afa68de4088081bcb7b4aed0fc4d8bf3618 (patch)
tree973a360661305f76e6a5ab722383ce6fb3f7adea /arch/arm/mach-s3c2410
parentde56a2f9228477866449963c2aff9df4728ea7fb (diff)
[ARM] 4963/1: S3C2410 - add basic machine support for the TCT Hammer
Add the TinCanTools Hammer board to list of supported machines in the arch/arm/mach-s3c2410 directory, as well as a default config entry. the mach-tct_hammer.c file initializes basic i/o, clocks, irqs, as well as the mtd flash layout if enabled in the kernel configuration. Signed-off-by: David Anders <danders@amltd.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r--arch/arm/mach-s3c2410/Kconfig7
-rw-r--r--arch/arm/mach-s3c2410/Makefile1
-rw-r--r--arch/arm/mach-s3c2410/mach-tct_hammer.c160
3 files changed, 168 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index e2079cf9266f..cd3dc0834b3b 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -97,6 +97,13 @@ config BAST_PC104_IRQ
97 Say Y here to enable the PC104 IRQ routing on the 97 Say Y here to enable the PC104 IRQ routing on the
98 Simtec BAST (EB2410ITX) 98 Simtec BAST (EB2410ITX)
99 99
100config MACH_TCT_HAMMER
101 bool "TCT Hammer Board"
102 select CPU_S3C2410
103 help
104 Say Y here if you are using the TinCanTools Hammer Board
105 <http://www.tincantools.com>
106
100config MACH_VR1000 107config MACH_VR1000
101 bool "Thorcom VR1000" 108 bool "Thorcom VR1000"
102 select PM_SIMTEC if PM 109 select PM_SIMTEC if PM
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
index 3e7a85594d9c..cabc13ce09e4 100644
--- a/arch/arm/mach-s3c2410/Makefile
+++ b/arch/arm/mach-s3c2410/Makefile
@@ -27,5 +27,6 @@ obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o
27obj-$(CONFIG_MACH_OTOM) += mach-otom.o 27obj-$(CONFIG_MACH_OTOM) += mach-otom.o
28obj-$(CONFIG_MACH_AML_M5900) += mach-amlm5900.o 28obj-$(CONFIG_MACH_AML_M5900) += mach-amlm5900.o
29obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o 29obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o
30obj-$(CONFIG_MACH_TCT_HAMMER) += mach-tct_hammer.o
30obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o 31obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o
31obj-$(CONFIG_MACH_QT2410) += mach-qt2410.o 32obj-$(CONFIG_MACH_QT2410) += mach-qt2410.o
diff --git a/arch/arm/mach-s3c2410/mach-tct_hammer.c b/arch/arm/mach-s3c2410/mach-tct_hammer.c
new file mode 100644
index 000000000000..d90d445ccfb4
--- /dev/null
+++ b/arch/arm/mach-s3c2410/mach-tct_hammer.c
@@ -0,0 +1,160 @@
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
37#include <asm/mach/arch.h>
38#include <asm/mach/map.h>
39#include <asm/mach/irq.h>
40#include <asm/mach/flash.h>
41
42#include <asm/hardware.h>
43#include <asm/io.h>
44#include <asm/irq.h>
45#include <asm/mach-types.h>
46
47#include <asm/plat-s3c/regs-serial.h>
48#include <asm/plat-s3c24xx/devs.h>
49#include <asm/plat-s3c24xx/cpu.h>
50
51#ifdef CONFIG_MTD_PARTITIONS
52
53#include <linux/mtd/mtd.h>
54#include <linux/mtd/partitions.h>
55#include <linux/mtd/map.h>
56#include <linux/mtd/physmap.h>
57
58static struct resource tct_hammer_nor_resource = {
59 .start = 0x00000000,
60 .end = 0x01000000 - 1,
61 .flags = IORESOURCE_MEM,
62};
63
64static struct mtd_partition tct_hammer_mtd_partitions[] = {
65 {
66 .name = "System",
67 .size = 0x240000,
68 .offset = 0,
69 .mask_flags = MTD_WRITEABLE, /* force read-only */
70 }, {
71 .name = "JFFS2",
72 .size = MTDPART_SIZ_FULL,
73 .offset = MTDPART_OFS_APPEND,
74 }
75};
76
77static struct physmap_flash_data tct_hammer_flash_data = {
78 .width = 2,
79 .parts = tct_hammer_mtd_partitions,
80 .nr_parts = ARRAY_SIZE(tct_hammer_mtd_partitions),
81};
82
83static struct platform_device tct_hammer_device_nor = {
84 .name = "physmap-flash",
85 .id = 0,
86 .dev = {
87 .platform_data = &tct_hammer_flash_data,
88 },
89 .num_resources = 1,
90 .resource = &tct_hammer_nor_resource,
91};
92
93#endif
94
95static struct map_desc tct_hammer_iodesc[] __initdata = {
96};
97
98#define UCON S3C2410_UCON_DEFAULT
99#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
100#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
101
102static struct s3c2410_uartcfg tct_hammer_uartcfgs[] = {
103 [0] = {
104 .hwport = 0,
105 .flags = 0,
106 .ucon = UCON,
107 .ulcon = ULCON,
108 .ufcon = UFCON,
109 },
110 [1] = {
111 .hwport = 1,
112 .flags = 0,
113 .ucon = UCON,
114 .ulcon = ULCON,
115 .ufcon = UFCON,
116 },
117 [2] = {
118 .hwport = 2,
119 .flags = 0,
120 .ucon = UCON,
121 .ulcon = ULCON,
122 .ufcon = UFCON,
123 }
124};
125
126
127static struct platform_device *tct_hammer_devices[] __initdata = {
128 &s3c_device_adc,
129 &s3c_device_wdt,
130 &s3c_device_i2c,
131 &s3c_device_usb,
132 &s3c_device_rtc,
133 &s3c_device_usbgadget,
134 &s3c_device_sdi,
135#ifdef CONFIG_MTD_PARTITIONS
136 &tct_hammer_device_nor,
137#endif
138};
139
140static void __init tct_hammer_map_io(void)
141{
142 s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc));
143 s3c24xx_init_clocks(0);
144 s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs));
145}
146
147static void __init tct_hammer_init(void)
148{
149 platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
150}
151
152MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
153 .phys_io = S3C2410_PA_UART,
154 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
155 .boot_params = S3C2410_SDRAM_PA + 0x100,
156 .map_io = tct_hammer_map_io,
157 .init_irq = s3c24xx_init_irq,
158 .init_machine = tct_hammer_init,
159 .timer = &s3c24xx_timer,
160MACHINE_END