1 // SPDX-License-Identifier: GPL-2.0
3 // Copyright (c) 2004 Nex Vision
4 // Guillaume GOURAT <guillaume.gourat@nexvision.fr>
6 #include <linux/kernel.h>
7 #include <linux/types.h>
8 #include <linux/interrupt.h>
9 #include <linux/list.h>
10 #include <linux/timer.h>
11 #include <linux/init.h>
12 #include <linux/serial_core.h>
13 #include <linux/serial_s3c.h>
14 #include <linux/platform_device.h>
17 #include <linux/platform_data/i2c-s3c2410.h>
20 #include <asm/mach-types.h>
21 #include <asm/mach/arch.h>
22 #include <asm/mach/map.h>
23 #include <asm/mach/irq.h>
25 #include "gpio-samsung.h"
34 static struct map_desc otom11_iodesc
[] __initdata
= {
36 { (u32
)OTOM_VA_CS8900A_BASE
, OTOM_PA_CS8900A_BASE
, SZ_16M
, MT_DEVICE
},
39 #define UCON S3C2410_UCON_DEFAULT
40 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
41 #define UFCON S3C2410_UFCON_RXTRIG12 | S3C2410_UFCON_FIFOMODE
43 static struct s3c2410_uartcfg otom11_uartcfgs
[] __initdata
= {
58 /* port 2 is not actually used */
68 /* NOR Flash on NexVision OTOM board */
70 static struct resource otom_nor_resource
[] = {
71 [0] = DEFINE_RES_MEM(S3C2410_CS0
, SZ_4M
),
74 static struct platform_device otom_device_nor
= {
77 .num_resources
= ARRAY_SIZE(otom_nor_resource
),
78 .resource
= otom_nor_resource
,
81 /* Standard OTOM devices */
83 static struct platform_device
*otom11_devices
[] __initdata
= {
93 static void __init
otom11_map_io(void)
95 s3c24xx_init_io(otom11_iodesc
, ARRAY_SIZE(otom11_iodesc
));
96 s3c24xx_init_uarts(otom11_uartcfgs
, ARRAY_SIZE(otom11_uartcfgs
));
97 s3c24xx_set_timer_source(S3C24XX_PWM3
, S3C24XX_PWM4
);
100 static void __init
otom11_init_time(void)
102 s3c2410_init_clocks(12000000);
103 s3c24xx_timer_init();
106 static void __init
otom11_init(void)
108 s3c_i2c0_set_platdata(NULL
);
110 /* Configure the I2S pins (GPE0...GPE4) in correct mode */
111 s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
113 platform_add_devices(otom11_devices
, ARRAY_SIZE(otom11_devices
));
116 MACHINE_START(OTOM
, "Nex Vision - Otom 1.1")
117 /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
118 .atag_offset
= 0x100,
119 .map_io
= otom11_map_io
,
120 .init_machine
= otom11_init
,
121 .init_irq
= s3c2410_init_irq
,
122 .init_time
= otom11_init_time
,