]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - arch/arm/mach-s3c/mach-otom.c
x86/speculation/mmio: Enable CPU Fill buffer clearing on idle
[mirror_ubuntu-jammy-kernel.git] / arch / arm / mach-s3c / mach-otom.c
CommitLineData
84b21701
KK
1// SPDX-License-Identifier: GPL-2.0
2//
3// Copyright (c) 2004 Nex Vision
4// Guillaume GOURAT <guillaume.gourat@nexvision.fr>
1da177e4
LT
5
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>
b6d1f542 12#include <linux/serial_core.h>
334a1c70 13#include <linux/serial_s3c.h>
d052d1be 14#include <linux/platform_device.h>
fced80c7 15#include <linux/io.h>
1da177e4 16
0afdff5d
KK
17#include <linux/platform_data/i2c-s3c2410.h>
18
19#include <asm/irq.h>
20#include <asm/mach-types.h>
1da177e4
LT
21#include <asm/mach/arch.h>
22#include <asm/mach/map.h>
23#include <asm/mach/irq.h>
24
c6ff132d
AB
25#include "gpio-samsung.h"
26#include "gpio-cfg.h"
1da177e4 27
c6ff132d
AB
28#include "cpu.h"
29#include "devs.h"
1da177e4 30
71b9114d 31#include "s3c24xx.h"
0afdff5d 32#include "otom.h"
b27b0727 33
1da177e4
LT
34static struct map_desc otom11_iodesc[] __initdata = {
35 /* Device area */
36 { (u32)OTOM_VA_CS8900A_BASE, OTOM_PA_CS8900A_BASE, SZ_16M, MT_DEVICE },
37};
38
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
42
66a9b49a 43static struct s3c2410_uartcfg otom11_uartcfgs[] __initdata = {
1da177e4
LT
44 [0] = {
45 .hwport = 0,
46 .flags = 0,
47 .ucon = UCON,
48 .ulcon = ULCON,
49 .ufcon = UFCON,
50 },
51 [1] = {
52 .hwport = 1,
53 .flags = 0,
54 .ucon = UCON,
55 .ulcon = ULCON,
56 .ufcon = UFCON,
57 },
58 /* port 2 is not actually used */
59 [2] = {
60 .hwport = 2,
61 .flags = 0,
62 .ucon = UCON,
63 .ulcon = ULCON,
64 .ufcon = UFCON,
65 }
66};
67
68/* NOR Flash on NexVision OTOM board */
69
70static struct resource otom_nor_resource[] = {
e21be38a 71 [0] = DEFINE_RES_MEM(S3C2410_CS0, SZ_4M),
1da177e4
LT
72};
73
74static struct platform_device otom_device_nor = {
75 .name = "mtd-flash",
76 .id = -1,
77 .num_resources = ARRAY_SIZE(otom_nor_resource),
78 .resource = otom_nor_resource,
79};
80
81/* Standard OTOM devices */
82
83static struct platform_device *otom11_devices[] __initdata = {
b813248c 84 &s3c_device_ohci,
1da177e4
LT
85 &s3c_device_lcd,
86 &s3c_device_wdt,
3e1b776c 87 &s3c_device_i2c0,
1da177e4
LT
88 &s3c_device_iis,
89 &s3c_device_rtc,
90 &otom_device_nor,
91};
92
5fe10ab1 93static void __init otom11_map_io(void)
1da177e4
LT
94{
95 s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc));
1da177e4 96 s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs));
a1342f6a 97 s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
1da177e4
LT
98}
99
07ee5e7c
HS
100static void __init otom11_init_time(void)
101{
102 s3c2410_init_clocks(12000000);
a1342f6a 103 s3c24xx_timer_init();
07ee5e7c
HS
104}
105
57e5171c
BD
106static void __init otom11_init(void)
107{
3e1b776c 108 s3c_i2c0_set_platdata(NULL);
673085f4
AB
109
110 /* Configure the I2S pins (GPE0...GPE4) in correct mode */
111 s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
112 S3C_GPIO_PULL_NONE);
57e5171c
BD
113 platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices));
114}
1da177e4
LT
115
116MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
e9dea0c6 117 /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
69d50710 118 .atag_offset = 0x100,
1da177e4 119 .map_io = otom11_map_io,
57e5171c 120 .init_machine = otom11_init,
f182aa1d 121 .init_irq = s3c2410_init_irq,
07ee5e7c 122 .init_time = otom11_init_time,
1da177e4 123MACHINE_END