~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-s3c24xx/mach-otom.c

Version: ~ [ linux-5.10-rc6 ] ~ [ linux-5.9.12 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.81 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.161 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.210 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.247 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.247 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *
  3  * Copyright (c) 2004 Nex Vision
  4  *   Guillaume GOURAT <guillaume.gourat@nexvision.fr>
  5  *
  6  * This program is free software; you can redistribute it and/or modify
  7  * it under the terms of the GNU General Public License version 2 as
  8  * published by the Free Software Foundation.
  9  */
 10 
 11 #include <linux/kernel.h>
 12 #include <linux/types.h>
 13 #include <linux/interrupt.h>
 14 #include <linux/list.h>
 15 #include <linux/timer.h>
 16 #include <linux/init.h>
 17 #include <linux/serial_core.h>
 18 #include <linux/serial_s3c.h>
 19 #include <linux/platform_device.h>
 20 #include <linux/io.h>
 21 
 22 #include <linux/platform_data/i2c-s3c2410.h>
 23 
 24 #include <asm/irq.h>
 25 #include <asm/mach-types.h>
 26 #include <asm/mach/arch.h>
 27 #include <asm/mach/map.h>
 28 #include <asm/mach/irq.h>
 29 
 30 #include <mach/hardware.h>
 31 #include <mach/regs-gpio.h>
 32 
 33 #include <plat/cpu.h>
 34 #include <plat/devs.h>
 35 #include <plat/samsung-time.h>
 36 
 37 #include "common.h"
 38 #include "otom.h"
 39 
 40 static struct map_desc otom11_iodesc[] __initdata = {
 41   /* Device area */
 42         { (u32)OTOM_VA_CS8900A_BASE, OTOM_PA_CS8900A_BASE, SZ_16M, MT_DEVICE },
 43 };
 44 
 45 #define UCON S3C2410_UCON_DEFAULT
 46 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
 47 #define UFCON S3C2410_UFCON_RXTRIG12 | S3C2410_UFCON_FIFOMODE
 48 
 49 static struct s3c2410_uartcfg otom11_uartcfgs[] __initdata = {
 50         [0] = {
 51                 .hwport      = 0,
 52                 .flags       = 0,
 53                 .ucon        = UCON,
 54                 .ulcon       = ULCON,
 55                 .ufcon       = UFCON,
 56         },
 57         [1] = {
 58                 .hwport      = 1,
 59                 .flags       = 0,
 60                 .ucon        = UCON,
 61                 .ulcon       = ULCON,
 62                 .ufcon       = UFCON,
 63         },
 64         /* port 2 is not actually used */
 65         [2] = {
 66                 .hwport      = 2,
 67                 .flags       = 0,
 68                 .ucon        = UCON,
 69                 .ulcon       = ULCON,
 70                 .ufcon       = UFCON,
 71         }
 72 };
 73 
 74 /* NOR Flash on NexVision OTOM board */
 75 
 76 static struct resource otom_nor_resource[] = {
 77         [0] = DEFINE_RES_MEM(S3C2410_CS0, SZ_4M),
 78 };
 79 
 80 static struct platform_device otom_device_nor = {
 81         .name           = "mtd-flash",
 82         .id             = -1,
 83         .num_resources  = ARRAY_SIZE(otom_nor_resource),
 84         .resource       = otom_nor_resource,
 85 };
 86 
 87 /* Standard OTOM devices */
 88 
 89 static struct platform_device *otom11_devices[] __initdata = {
 90         &s3c_device_ohci,
 91         &s3c_device_lcd,
 92         &s3c_device_wdt,
 93         &s3c_device_i2c0,
 94         &s3c_device_iis,
 95         &s3c_device_rtc,
 96         &otom_device_nor,
 97 };
 98 
 99 static void __init otom11_map_io(void)
100 {
101         s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc));
102         s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs));
103         samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
104 }
105 
106 static void __init otom11_init_time(void)
107 {
108         s3c2410_init_clocks(12000000);
109         samsung_timer_init();
110 }
111 
112 static void __init otom11_init(void)
113 {
114         s3c_i2c0_set_platdata(NULL);
115         platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices));
116 }
117 
118 MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
119         /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
120         .atag_offset    = 0x100,
121         .map_io         = otom11_map_io,
122         .init_machine   = otom11_init,
123         .init_irq       = s3c2410_init_irq,
124         .init_time      = otom11_init_time,
125 MACHINE_END
126 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp