Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / arch / arm / mach-s3c24xx / mach-tct_hammer.c
CommitLineData
79b34afa
DA
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>
fced80c7 36#include <linux/io.h>
79b34afa
DA
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
a09e64fb 43#include <mach/hardware.h>
79b34afa
DA
44#include <asm/irq.h>
45#include <asm/mach-types.h>
46
a2b7ba9c 47#include <plat/regs-serial.h>
436d42c6 48#include <linux/platform_data/i2c-s3c2410.h>
a2b7ba9c
BD
49#include <plat/devs.h>
50#include <plat/cpu.h>
79b34afa 51
79b34afa
DA
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
b27b0727
KK
57#include "common.h"
58
f8dadf5d
TB
59static struct resource tct_hammer_nor_resource =
60 DEFINE_RES_MEM(0x00000000, SZ_16M);
79b34afa
DA
61
62static struct mtd_partition tct_hammer_mtd_partitions[] = {
63 {
64 .name = "System",
65 .size = 0x240000,
66 .offset = 0,
67 .mask_flags = MTD_WRITEABLE, /* force read-only */
68 }, {
69 .name = "JFFS2",
70 .size = MTDPART_SIZ_FULL,
71 .offset = MTDPART_OFS_APPEND,
72 }
73};
74
75static struct physmap_flash_data tct_hammer_flash_data = {
76 .width = 2,
77 .parts = tct_hammer_mtd_partitions,
78 .nr_parts = ARRAY_SIZE(tct_hammer_mtd_partitions),
79};
80
81static struct platform_device tct_hammer_device_nor = {
82 .name = "physmap-flash",
83 .id = 0,
84 .dev = {
85 .platform_data = &tct_hammer_flash_data,
86 },
87 .num_resources = 1,
88 .resource = &tct_hammer_nor_resource,
89};
90
79b34afa
DA
91static struct map_desc tct_hammer_iodesc[] __initdata = {
92};
93
94#define UCON S3C2410_UCON_DEFAULT
95#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
96#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
97
98static struct s3c2410_uartcfg tct_hammer_uartcfgs[] = {
99 [0] = {
100 .hwport = 0,
101 .flags = 0,
102 .ucon = UCON,
103 .ulcon = ULCON,
104 .ufcon = UFCON,
105 },
106 [1] = {
107 .hwport = 1,
108 .flags = 0,
109 .ucon = UCON,
110 .ulcon = ULCON,
111 .ufcon = UFCON,
112 },
113 [2] = {
114 .hwport = 2,
115 .flags = 0,
116 .ucon = UCON,
117 .ulcon = ULCON,
118 .ufcon = UFCON,
119 }
120};
121
122
123static struct platform_device *tct_hammer_devices[] __initdata = {
124 &s3c_device_adc,
125 &s3c_device_wdt,
3e1b776c 126 &s3c_device_i2c0,
b813248c 127 &s3c_device_ohci,
79b34afa
DA
128 &s3c_device_rtc,
129 &s3c_device_usbgadget,
130 &s3c_device_sdi,
79b34afa 131 &tct_hammer_device_nor,
79b34afa
DA
132};
133
134static void __init tct_hammer_map_io(void)
135{
136 s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc));
137 s3c24xx_init_clocks(0);
138 s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs));
139}
140
141static void __init tct_hammer_init(void)
142{
3e1b776c 143 s3c_i2c0_set_platdata(NULL);
79b34afa
DA
144 platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
145}
146
147MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
69d50710 148 .atag_offset = 0x100,
79b34afa
DA
149 .map_io = tct_hammer_map_io,
150 .init_irq = s3c24xx_init_irq,
151 .init_machine = tct_hammer_init,
6bb27d73 152 .init_time = s3c24xx_timer_init,
b27b0727 153 .restart = s3c2410_restart,
79b34afa 154MACHINE_END
This page took 0.463155 seconds and 5 git commands to generate.