1 /* linux/arch/arm/mach-s3c2410/mach-h1940.c
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
6 * http://www.handhelds.org/projects/h1940.html
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.
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 * 21-Aug-2004 BJD Added struct s3c2410_board
20 * 04-Sep-2004 BJD Changed uart init, renamed ipaq_ -> h1940_
21 * 18-Oct-2004 BJD Updated new board structure name
22 * 04-Nov-2004 BJD Change for new serial clock
23 * 04-Jan-2005 BJD Updated uart init call
24 * 10-Jan-2005 BJD Removed include of s3c2410.h
25 * 14-Jan-2005 BJD Added clock init
26 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
27 * 20-Sep-2005 BJD Added static to non-exported items
28 * 26-Oct-2005 BJD Changed name of fb init call
31 #include <linux/kernel.h>
32 #include <linux/types.h>
33 #include <linux/interrupt.h>
34 #include <linux/list.h>
35 #include <linux/timer.h>
36 #include <linux/init.h>
37 #include <linux/platform_device.h>
39 #include <asm/mach/arch.h>
40 #include <asm/mach/map.h>
41 #include <asm/mach/irq.h>
43 #include <asm/hardware.h>
44 #include <asm/hardware/iomd.h>
47 #include <asm/mach-types.h>
49 //#include <asm/debug-ll.h>
50 #include <asm/arch/regs-serial.h>
51 #include <asm/arch/regs-lcd.h>
53 #include <asm/arch/fb.h>
55 #include <linux/serial_core.h>
61 static struct map_desc h1940_iodesc
[] __initdata
= {
62 /* nothing here yet */
65 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
66 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
67 #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
69 static struct s3c2410_uartcfg h1940_uartcfgs
[] = {
88 .uart_flags
= UPF_CONS_FLOW
,
100 static struct s3c2410fb_mach_info h1940_lcdcfg __initdata
= {
103 .lcdcon1
= S3C2410_LCDCON1_TFT16BPP
| \
104 S3C2410_LCDCON1_TFT
| \
105 S3C2410_LCDCON1_CLKVAL(0x0C),
107 .lcdcon2
= S3C2410_LCDCON2_VBPD(7) | \
108 S3C2410_LCDCON2_LINEVAL(319) | \
109 S3C2410_LCDCON2_VFPD(6) | \
110 S3C2410_LCDCON2_VSPW(0),
112 .lcdcon3
= S3C2410_LCDCON3_HBPD(19) | \
113 S3C2410_LCDCON3_HOZVAL(239) | \
114 S3C2410_LCDCON3_HFPD(7),
116 .lcdcon4
= S3C2410_LCDCON4_MVAL(0) | \
117 S3C2410_LCDCON4_HSPW(3),
119 .lcdcon5
= S3C2410_LCDCON5_FRM565
| \
120 S3C2410_LCDCON5_INVVLINE
| \
121 S3C2410_LCDCON5_HWSWP
,
125 .gpccon_mask
= 0xffffffff,
127 .gpcup_mask
= 0xffffffff,
129 .gpdcon_mask
= 0xffffffff,
131 .gpdup_mask
= 0xffffffff,
135 .xres
= {240,240,240},
136 .yres
= {320,320,320},
140 static struct platform_device
*h1940_devices
[] __initdata
= {
148 static struct s3c24xx_board h1940_board __initdata
= {
149 .devices
= h1940_devices
,
150 .devices_count
= ARRAY_SIZE(h1940_devices
)
153 static void __init
h1940_map_io(void)
155 s3c24xx_init_io(h1940_iodesc
, ARRAY_SIZE(h1940_iodesc
));
156 s3c24xx_init_clocks(0);
157 s3c24xx_init_uarts(h1940_uartcfgs
, ARRAY_SIZE(h1940_uartcfgs
));
158 s3c24xx_set_board(&h1940_board
);
161 static void __init
h1940_init_irq(void)
167 static void __init
h1940_init(void)
169 s3c24xx_fb_set_platdata(&h1940_lcdcfg
);
172 MACHINE_START(H1940
, "IPAQ-H1940")
173 /* Maintainer: Ben Dooks <ben@fluff.org> */
174 .phys_ram
= S3C2410_SDRAM_PA
,
175 .phys_io
= S3C2410_PA_UART
,
176 .io_pg_offst
= (((u32
)S3C24XX_VA_UART
) >> 18) & 0xfffc,
177 .boot_params
= S3C2410_SDRAM_PA
+ 0x100,
178 .map_io
= h1940_map_io
,
179 .init_irq
= h1940_init_irq
,
180 .init_machine
= h1940_init
,
181 .timer
= &s3c24xx_timer
,