blob: dc5fa8e5ebefa35121f5cc5aa6d5e65bc1f974a7 [file] [log] [blame]
Bellido Nicolas038c5b62005-06-20 18:51:05 +01001/*
2 * linux/arch/arm/mach-aaec2000/aaed2000.c
3 *
4 * Support for the Agilent AAED-2000 Development Platform.
5 *
6 * Copyright (c) 2005 Nicolas Bellido Y Ortega
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 */
13#include <linux/module.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/device.h>
17#include <linux/major.h>
18#include <linux/interrupt.h>
19
20#include <asm/setup.h>
21#include <asm/memory.h>
22#include <asm/mach-types.h>
23#include <asm/hardware.h>
24#include <asm/irq.h>
25
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/mach/irq.h>
29
Bellido Nicolas4028ef42005-10-28 16:51:40 +010030#include <asm/arch/aaed2000.h>
31
Bellido Nicolas038c5b62005-06-20 18:51:05 +010032#include "core.h"
33
Bellido Nicolas50f4c002005-10-28 16:51:44 +010034static void aaed2000_clcd_disable(struct clcd_fb *fb)
35{
36 AAED_EXT_GPIO &= ~AAED_EGPIO_LCD_PWR_EN;
37}
38
39static void aaed2000_clcd_enable(struct clcd_fb *fb)
40{
41 AAED_EXT_GPIO |= AAED_EGPIO_LCD_PWR_EN;
42}
43
44struct aaec2000_clcd_info clcd_info = {
45 .enable = aaed2000_clcd_enable,
46 .disable = aaed2000_clcd_disable,
47 .panel = {
48 .mode = {
49 .name = "Sharp",
50 .refresh = 60,
51 .xres = 640,
52 .yres = 480,
53 .pixclock = 39721,
54 .left_margin = 20,
55 .right_margin = 44,
56 .upper_margin = 21,
57 .lower_margin = 34,
58 .hsync_len = 96,
59 .vsync_len = 2,
60 .sync = 0,
61 .vmode = FB_VMODE_NONINTERLACED,
62 },
63 .width = -1,
64 .height = -1,
65 .tim2 = TIM2_IVS | TIM2_IHS,
66 .cntl = CNTL_LCDTFT,
67 .bpp = 16,
68 },
69};
70
Bellido Nicolas038c5b62005-06-20 18:51:05 +010071static void __init aaed2000_init_irq(void)
72{
73 aaec2000_init_irq();
74}
75
Bellido Nicolas50f4c002005-10-28 16:51:44 +010076static void __init aaed2000_init(void)
77{
78 aaec2000_set_clcd_plat_data(&clcd_info);
79}
80
Bellido Nicolas4028ef42005-10-28 16:51:40 +010081static struct map_desc aaed2000_io_desc[] __initdata = {
82 { EXT_GPIO_VBASE, EXT_GPIO_PBASE, EXT_GPIO_LENGTH, MT_DEVICE }, /* Ext GPIO */
83};
84
Bellido Nicolas038c5b62005-06-20 18:51:05 +010085static void __init aaed2000_map_io(void)
86{
87 aaec2000_map_io();
Bellido Nicolas4028ef42005-10-28 16:51:40 +010088 iotable_init(aaed2000_io_desc, ARRAY_SIZE(aaed2000_io_desc));
Bellido Nicolas038c5b62005-06-20 18:51:05 +010089}
90
91MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform")
Russell Kinge9dea0c2005-07-03 17:38:58 +010092 /* Maintainer: Nicolas Bellido Y Ortega */
Russell Kinge9dea0c2005-07-03 17:38:58 +010093 .phys_io = PIO_BASE,
94 .io_pg_offst = ((VIO_BASE) >> 18) & 0xfffc,
95 .map_io = aaed2000_map_io,
96 .init_irq = aaed2000_init_irq,
Bellido Nicolas038c5b62005-06-20 18:51:05 +010097 .timer = &aaec2000_timer,
Bellido Nicolas50f4c002005-10-28 16:51:44 +010098 .init_machine = aaed2000_init,
Bellido Nicolas038c5b62005-06-20 18:51:05 +010099MACHINE_END