[ARM] Fix realview build
[deliverable/linux.git] / arch / arm / mach-pxa / e750.c
CommitLineData
7dc96414
IM
1/*
2 * Hardware definitions for the Toshiba eseries PDAs
3 *
4 * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
5 *
6 * This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 *
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
0ec3cf69
IM
15#include <linux/device.h>
16#include <linux/platform_device.h>
17#include <linux/fb.h>
b1ae1b7b 18#include <linux/mfd/tc6393xb.h>
0ec3cf69
IM
19
20#include <video/w100fb.h>
7dc96414
IM
21
22#include <asm/setup.h>
23#include <asm/mach/arch.h>
24#include <asm/mach-types.h>
25
26#include <mach/mfp-pxa25x.h>
b1ae1b7b 27#include <mach/pxa-regs.h>
7dc96414 28#include <mach/hardware.h>
b1ae1b7b 29#include <mach/eseries-gpio.h>
ebcce7b1 30#include <mach/udc.h>
36033422 31#include <mach/irda.h>
7dc96414
IM
32
33#include "generic.h"
34#include "eseries.h"
b1ae1b7b 35#include "clock.h"
7dc96414 36
0ec3cf69
IM
37/* ---------------------- E750 LCD definitions -------------------- */
38
39static struct w100_gen_regs e750_lcd_regs = {
40 .lcd_format = 0x00008003,
41 .lcdd_cntl1 = 0x00000000,
42 .lcdd_cntl2 = 0x0003ffff,
43 .genlcd_cntl1 = 0x00fff003,
44 .genlcd_cntl2 = 0x003c0f03,
45 .genlcd_cntl3 = 0x000143aa,
46};
47
48static struct w100_mode e750_lcd_mode = {
49 .xres = 240,
50 .yres = 320,
51 .left_margin = 21,
52 .right_margin = 22,
53 .upper_margin = 5,
54 .lower_margin = 4,
55 .crtc_ss = 0x80150014,
56 .crtc_ls = 0x8014000d,
57 .crtc_gs = 0xc1000005,
58 .crtc_vpos_gs = 0x00020147,
59 .crtc_rev = 0x0040010a,
60 .crtc_dclk = 0xa1700030,
61 .crtc_gclk = 0x80cc0015,
62 .crtc_goe = 0x80cc0015,
63 .crtc_ps1_active = 0x61060017,
64 .pll_freq = 57,
65 .pixclk_divider = 4,
66 .pixclk_divider_rotated = 4,
67 .pixclk_src = CLK_SRC_XTAL,
68 .sysclk_divider = 1,
69 .sysclk_src = CLK_SRC_PLL,
70};
71
72static struct w100_gpio_regs e750_w100_gpio_info = {
73 .init_data1 = 0x01192f1b,
74 .gpio_dir1 = 0xd5ffdeff,
75 .gpio_oe1 = 0x000020bf,
76 .init_data2 = 0x010f010f,
77 .gpio_dir2 = 0xffffffff,
78 .gpio_oe2 = 0x000001cf,
79};
80
81static struct w100fb_mach_info e750_fb_info = {
82 .modelist = &e750_lcd_mode,
83 .num_modes = 1,
84 .regs = &e750_lcd_regs,
85 .gpio = &e750_w100_gpio_info,
86 .xtal_freq = 14318000,
87 .xtal_dbl = 1,
88};
89
90static struct resource e750_fb_resources[] = {
91 [0] = {
92 .start = 0x0c000000,
93 .end = 0x0cffffff,
94 .flags = IORESOURCE_MEM,
95 },
96};
97
98static struct platform_device e750_fb_device = {
99 .name = "w100fb",
100 .id = -1,
101 .dev = {
102 .platform_data = &e750_fb_info,
103 },
104 .num_resources = ARRAY_SIZE(e750_fb_resources),
105 .resource = e750_fb_resources,
106};
107
b1ae1b7b
IM
108/* ----------------- e750 tc6393xb parameters ------------------ */
109
110static struct tc6393xb_platform_data e750_tc6393xb_info = {
111 .irq_base = IRQ_BOARD_START,
112 .scr_pll2cr = 0x0cc1,
113 .scr_gper = 0,
114 .gpio_base = -1,
115 .suspend = &eseries_tmio_suspend,
116 .resume = &eseries_tmio_resume,
117 .enable = &eseries_tmio_enable,
118 .disable = &eseries_tmio_disable,
119};
120
121static struct platform_device e750_tc6393xb_device = {
122 .name = "tc6393xb",
123 .id = -1,
124 .dev = {
125 .platform_data = &e750_tc6393xb_info,
126 },
127 .num_resources = 2,
128 .resource = eseries_tmio_resources,
129};
130
131/* ------------------------------------------------------------- */
0ec3cf69
IM
132
133static struct platform_device *devices[] __initdata = {
134 &e750_fb_device,
b1ae1b7b 135 &e750_tc6393xb_device,
0ec3cf69
IM
136};
137
138static void __init e750_init(void)
139{
b1ae1b7b
IM
140 clk_add_alias("CLK_CK3P6MI", &e750_tc6393xb_device.dev,
141 "GPIO11_CLK", NULL),
142 eseries_get_tmio_gpios();
0ec3cf69 143 platform_add_devices(devices, ARRAY_SIZE(devices));
ebcce7b1 144 pxa_set_udc_info(&e7xx_udc_mach_info);
36033422
IM
145 e7xx_irda_init();
146 pxa_set_ficp_info(&e7xx_ficp_platform_data);
0ec3cf69
IM
147}
148
7dc96414
IM
149MACHINE_START(E750, "Toshiba e750")
150 /* Maintainer: Ian Molton (spyro@f2s.com) */
151 .phys_io = 0x40000000,
152 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
153 .boot_params = 0xa0000100,
154 .map_io = pxa_map_io,
155 .init_irq = pxa25x_init_irq,
156 .fixup = eseries_fixup,
0ec3cf69 157 .init_machine = e750_init,
7dc96414
IM
158 .timer = &pxa_timer,
159MACHINE_END
160
This page took 0.059751 seconds and 5 git commands to generate.