http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / kernel / linux / arch / arm / mach-s3c2410 / mach-h1940.c
1 /* linux/arch/arm/mach-s3c2410/mach-ipaq.c
2  *
3  * Copyright (c) 2003 Simtec Electronics
4  *   Ben Dooks <ben@simtec.co.uk>
5  *
6  * http://www.handhelds.org/projects/h1940.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-May-2003 BJD  Created initial version
14  *     16-Aug-2003 BJD  Fixed header files and copyright, added URL
15  *     05-Sep-2003 BJD  Moved to v2.6 kernel
16  *     06-Jan-2003 BJD  Updates for <arch/map.h>
17  *     18-Jan-2003 BJD  Added serial port configuration
18  *     17-Feb-2003 BJD  Copied to mach-ipaq.c
19 */
20
21 #include <linux/kernel.h>
22 #include <linux/types.h>
23 #include <linux/interrupt.h>
24 #include <linux/list.h>
25 #include <linux/timer.h>
26 #include <linux/init.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/debug-ll.h>
39 #include <asm/arch/regs-serial.h>
40
41 #include "s3c2410.h"
42
43 static struct map_desc ipaq_iodesc[] __initdata = {
44         /* nothing here yet */
45 };
46
47 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
48 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
49 #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
50
51 static struct s3c2410_uartcfg ipaq_uartcfgs[] = {
52         [0] = {
53                 .hwport      = 0,
54                 .flags       = 0,
55                 .clock       = &s3c2410_pclk,
56                 .ucon        = 0x3c5,
57                 .ulcon       = 0x03,
58                 .ufcon       = 0x51,
59         },
60         [1] = {
61                 .hwport      = 1,
62                 .flags       = 0,
63                 .clock       = &s3c2410_pclk,
64                 .ucon        = 0x245,
65                 .ulcon       = 0x03,
66                 .ufcon       = 0x00,
67         },
68         /* IR port */
69         [2] = {
70                 .hwport      = 2,
71                 .flags       = 0,
72                 .clock       = &s3c2410_pclk,
73                 .ucon        = 0x3c5,
74                 .ulcon       = 0x43,
75                 .ufcon       = 0x51,
76         }
77 };
78
79
80 void __init ipaq_map_io(void)
81 {
82         s3c2410_map_io(ipaq_iodesc, ARRAY_SIZE(ipaq_iodesc));
83         s3c2410_uartcfgs = ipaq_uartcfgs;
84 }
85
86 void __init ipaq_init_irq(void)
87 {
88         //llprintk("ipaq_init_irq:\n");
89
90         s3c2410_init_irq();
91
92 }
93
94 void __init ipaq_init_time(void)
95 {
96         s3c2410_init_time();
97 }
98
99 MACHINE_START(H1940, "IPAQ-H1940")
100      MAINTAINER("Ben Dooks <ben@fluff.org>")
101      BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART)
102      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
103      MAPIO(ipaq_map_io)
104      INITIRQ(ipaq_init_irq)
105      INITTIME(ipaq_init_time)
106 MACHINE_END