This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / arch / arm / mach-s3c2410 / mach-rx3715.c
1 /* linux/arch/arm/mach-s3c2410/mach-rx3715.c
2  *
3  * Copyright (c) 2003,2004 Simtec Electronics
4  *      Ben Dooks <ben@simtec.co.uk>
5  *
6  * http://www.handhelds.org/projects/rx3715.html
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11  *
12  * Modifications:
13  *      16-Sep-2004 BJD Copied from mach-h1940.c
14  *      25-Oct-2004 BJD Updates for 2.6.10-rc1
15 */
16
17 #include <linux/kernel.h>
18 #include <linux/types.h>
19 #include <linux/interrupt.h>
20 #include <linux/list.h>
21 #include <linux/timer.h>
22 #include <linux/init.h>
23 #include <linux/tty.h>
24 #include <linux/console.h>
25 #include <linux/serial_core.h>
26 #include <linux/serial.h>
27
28 #include <asm/mach/arch.h>
29 #include <asm/mach/map.h>
30 #include <asm/mach/irq.h>
31
32 #include <asm/hardware.h>
33 #include <asm/hardware/iomd.h>
34 #include <asm/io.h>
35 #include <asm/irq.h>
36 #include <asm/mach-types.h>
37
38 #include <asm/arch/regs-serial.h>
39 #include <asm/arch/regs-gpio.h>
40
41 #include "s3c2410.h"
42 #include "s3c2440.h"
43 #include "clock.h"
44 #include "devs.h"
45 #include "cpu.h"
46 #include "pm.h"
47
48 static struct map_desc rx3715_iodesc[] __initdata = {
49         /* dump ISA space somewhere unused */
50
51         { S3C2410_VA_ISA_WORD, S3C2410_CS3, SZ_16M, MT_DEVICE },
52         { S3C2410_VA_ISA_BYTE, S3C2410_CS3, SZ_16M, MT_DEVICE },
53 };
54
55 static struct s3c2410_uartcfg rx3715_uartcfgs[] = {
56         [0] = {
57                 .hwport      = 0,
58                 .flags       = 0,
59                 .ucon        = 0x3c5,
60                 .ulcon       = 0x03,
61                 .ufcon       = 0x51,
62         },
63         [1] = {
64                 .hwport      = 1,
65                 .flags       = 0,
66                 .ucon        = 0x3c5,
67                 .ulcon       = 0x03,
68                 .ufcon       = 0x00,
69         },
70         /* IR port */
71         [2] = {
72                 .hwport      = 2,
73                 .uart_flags  = UPF_CONS_FLOW,
74                 .ucon        = 0x3c5,
75                 .ulcon       = 0x43,
76                 .ufcon       = 0x51,
77         }
78 };
79
80 static struct platform_device *rx3715_devices[] __initdata = {
81         &s3c_device_usb,
82         &s3c_device_lcd,
83         &s3c_device_wdt,
84         &s3c_device_i2c,
85         &s3c_device_iis,
86 };
87
88 static struct s3c24xx_board rx3715_board __initdata = {
89         .devices       = rx3715_devices,
90         .devices_count = ARRAY_SIZE(rx3715_devices)
91 };
92
93 void __init rx3715_map_io(void)
94 {
95         s3c24xx_xtal = 16934000;
96
97         s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
98         s3c2440_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
99         s3c24xx_set_board(&rx3715_board);
100 }
101
102 void __init rx3715_init_irq(void)
103 {
104         s3c2410_init_irq();
105 }
106
107 #ifdef CONFIG_PM
108 static void __init rx3715_init_machine(void)
109 {
110         s3c2410_pm_init();
111 }
112 #else
113 #define rx3715_init_machine NULL
114 #endif
115
116 MACHINE_START(RX3715, "IPAQ-RX3715")
117      MAINTAINER("Ben Dooks <ben@fluff.org>")
118      BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART)
119      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
120      MAPIO(rx3715_map_io)
121      INITIRQ(rx3715_init_irq)
122      INIT_MACHINE(rx3715_init_machine)
123      .timer             = &s3c2410_timer,
124 MACHINE_END