1 /* linux/arch/arm/mach-s3c2410/mach-tct_hammer.c
3 * Copyright (c) 2007 TinCanTools
4 * David Anders <danders@amltd.com>
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.
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.
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,
22 * derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by
23 * Ben Dooks <ben@simtec.co.uk>
25 ***********************************************************************/
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/serial_s3c.h>
39 #include <asm/mach/arch.h>
40 #include <asm/mach/map.h>
41 #include <asm/mach/irq.h>
42 #include <asm/mach/flash.h>
44 #include <mach/hardware.h>
46 #include <asm/mach-types.h>
48 #include <linux/platform_data/i2c-s3c2410.h>
49 #include <plat/devs.h>
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 #include <plat/samsung-time.h>
60 static struct resource tct_hammer_nor_resource
=
61 DEFINE_RES_MEM(0x00000000, SZ_16M
);
63 static struct mtd_partition tct_hammer_mtd_partitions
[] = {
68 .mask_flags
= MTD_WRITEABLE
, /* force read-only */
71 .size
= MTDPART_SIZ_FULL
,
72 .offset
= MTDPART_OFS_APPEND
,
76 static struct physmap_flash_data tct_hammer_flash_data
= {
78 .parts
= tct_hammer_mtd_partitions
,
79 .nr_parts
= ARRAY_SIZE(tct_hammer_mtd_partitions
),
82 static struct platform_device tct_hammer_device_nor
= {
83 .name
= "physmap-flash",
86 .platform_data
= &tct_hammer_flash_data
,
89 .resource
= &tct_hammer_nor_resource
,
92 static struct map_desc tct_hammer_iodesc
[] __initdata
= {
95 #define UCON S3C2410_UCON_DEFAULT
96 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
97 #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
99 static struct s3c2410_uartcfg tct_hammer_uartcfgs
[] = {
124 static struct platform_device
*tct_hammer_devices
[] __initdata
= {
130 &s3c_device_usbgadget
,
132 &tct_hammer_device_nor
,
135 static void __init
tct_hammer_map_io(void)
137 s3c24xx_init_io(tct_hammer_iodesc
, ARRAY_SIZE(tct_hammer_iodesc
));
138 s3c24xx_init_uarts(tct_hammer_uartcfgs
, ARRAY_SIZE(tct_hammer_uartcfgs
));
139 samsung_set_timer_source(SAMSUNG_PWM3
, SAMSUNG_PWM4
);
142 static void __init
tct_hammer_init_time(void)
144 s3c2410_init_clocks(12000000);
145 samsung_timer_init();
148 static void __init
tct_hammer_init(void)
150 s3c_i2c0_set_platdata(NULL
);
151 platform_add_devices(tct_hammer_devices
, ARRAY_SIZE(tct_hammer_devices
));
154 MACHINE_START(TCT_HAMMER
, "TCT_HAMMER")
155 .atag_offset
= 0x100,
156 .map_io
= tct_hammer_map_io
,
157 .init_irq
= s3c2410_init_irq
,
158 .init_machine
= tct_hammer_init
,
159 .init_time
= tct_hammer_init_time
,