Merge branch 'drm-next-5.2' of git://people.freedesktop.org/~agd5f/linux into drm...
[linux-2.6-block.git] / arch / arm / mach-s3c24xx / mach-smdk2410.c
CommitLineData
84b21701
KK
1// SPDX-License-Identifier: GPL-2.0+
2//
3// Copyright (C) 2004 by FS Forth-Systeme GmbH
4// All rights reserved.
5//
6// @Author: Jonas Dietsche
7//
8// @History:
9// derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by
10// Ben Dooks <ben@simtec.co.uk>
1da177e4
LT
11
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>
b6d1f542 18#include <linux/serial_core.h>
334a1c70 19#include <linux/serial_s3c.h>
d052d1be 20#include <linux/platform_device.h>
fced80c7 21#include <linux/io.h>
1da177e4
LT
22
23#include <asm/mach/arch.h>
24#include <asm/mach/map.h>
25#include <asm/mach/irq.h>
26
a09e64fb 27#include <mach/hardware.h>
1da177e4
LT
28#include <asm/irq.h>
29#include <asm/mach-types.h>
30
436d42c6 31#include <linux/platform_data/i2c-s3c2410.h>
1da177e4 32
a2b7ba9c
BD
33#include <plat/devs.h>
34#include <plat/cpu.h>
7f78b6eb 35#include <plat/samsung-time.h>
1da177e4 36
b27b0727 37#include "common.h"
4d512a90 38#include "common-smdk.h"
b27b0727 39
1da177e4
LT
40static struct map_desc smdk2410_iodesc[] __initdata = {
41 /* nothing here yet */
42};
43
44#define UCON S3C2410_UCON_DEFAULT
45#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
46#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
47
66a9b49a 48static struct s3c2410_uartcfg smdk2410_uartcfgs[] __initdata = {
1da177e4
LT
49 [0] = {
50 .hwport = 0,
51 .flags = 0,
52 .ucon = UCON,
53 .ulcon = ULCON,
54 .ufcon = UFCON,
55 },
56 [1] = {
57 .hwport = 1,
58 .flags = 0,
59 .ucon = UCON,
60 .ulcon = ULCON,
61 .ufcon = UFCON,
62 },
63 [2] = {
64 .hwport = 2,
65 .flags = 0,
66 .ucon = UCON,
67 .ulcon = ULCON,
68 .ufcon = UFCON,
69 }
70};
71
72static struct platform_device *smdk2410_devices[] __initdata = {
b813248c 73 &s3c_device_ohci,
1da177e4
LT
74 &s3c_device_lcd,
75 &s3c_device_wdt,
3e1b776c 76 &s3c_device_i2c0,
1da177e4
LT
77 &s3c_device_iis,
78};
79
5fe10ab1 80static void __init smdk2410_map_io(void)
1da177e4
LT
81{
82 s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc));
1da177e4 83 s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
7f78b6eb 84 samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
57e5171c
BD
85}
86
07ee5e7c
HS
87static void __init smdk2410_init_time(void)
88{
89 s3c2410_init_clocks(12000000);
90 samsung_timer_init();
91}
92
57e5171c
BD
93static void __init smdk2410_init(void)
94{
3e1b776c 95 s3c_i2c0_set_platdata(NULL);
57e5171c
BD
96 platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
97 smdk_machine_init();
1da177e4
LT
98}
99
1da177e4
LT
100MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch
101 * to SMDK2410 */
e9dea0c6 102 /* Maintainer: Jonas Dietsche */
69d50710 103 .atag_offset = 0x100,
e9dea0c6 104 .map_io = smdk2410_map_io,
f182aa1d 105 .init_irq = s3c2410_init_irq,
57e5171c 106 .init_machine = smdk2410_init,
07ee5e7c 107 .init_time = smdk2410_init_time,
1da177e4 108MACHINE_END