summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/e750.c
diff options
context:
space:
mode:
authorIan Molton <spyro@f2s.com>2008-08-19 13:01:28 +0100
committerIan Molton <spyro@f2s.com>2008-08-19 13:44:07 +0100
commit0ec3cf69304d2e35ad29da3aa9ab43c3dd97677c (patch)
tree5c4cfa67f4f015da30aa7a49071c74f314c0c8d6 /arch/arm/mach-pxa/e750.c
parent7dc964148c2850e5df84fc17807ba48edb628c88 (diff)
[ARM] eseries: move LCD defs into machine files
This patch removes the seperate files used for the LCD definitions on e-series and places the definitions into the machine specific files. Signed-off-by: Ian Molton <spyro@f2s.com>
Diffstat (limited to 'arch/arm/mach-pxa/e750.c')
-rw-r--r--arch/arm/mach-pxa/e750.c88
1 files changed, 88 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/e750.c b/arch/arm/mach-pxa/e750.c
index bb6f814d5642..7e9a21dddd4d 100644
--- a/arch/arm/mach-pxa/e750.c
+++ b/arch/arm/mach-pxa/e750.c
@@ -12,6 +12,11 @@
#include <linux/kernel.h>
#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/fb.h>
+
+#include <video/w100fb.h>
#include <asm/setup.h>
#include <asm/mach/arch.h>
@@ -23,6 +28,88 @@
#include "generic.h"
#include "eseries.h"
+/* ---------------------- E750 LCD definitions -------------------- */
+
+static struct w100_gen_regs e750_lcd_regs = {
+ .lcd_format = 0x00008003,
+ .lcdd_cntl1 = 0x00000000,
+ .lcdd_cntl2 = 0x0003ffff,
+ .genlcd_cntl1 = 0x00fff003,
+ .genlcd_cntl2 = 0x003c0f03,
+ .genlcd_cntl3 = 0x000143aa,
+};
+
+static struct w100_mode e750_lcd_mode = {
+ .xres = 240,
+ .yres = 320,
+ .left_margin = 21,
+ .right_margin = 22,
+ .upper_margin = 5,
+ .lower_margin = 4,
+ .crtc_ss = 0x80150014,
+ .crtc_ls = 0x8014000d,
+ .crtc_gs = 0xc1000005,
+ .crtc_vpos_gs = 0x00020147,
+ .crtc_rev = 0x0040010a,
+ .crtc_dclk = 0xa1700030,
+ .crtc_gclk = 0x80cc0015,
+ .crtc_goe = 0x80cc0015,
+ .crtc_ps1_active = 0x61060017,
+ .pll_freq = 57,
+ .pixclk_divider = 4,
+ .pixclk_divider_rotated = 4,
+ .pixclk_src = CLK_SRC_XTAL,
+ .sysclk_divider = 1,
+ .sysclk_src = CLK_SRC_PLL,
+};
+
+static struct w100_gpio_regs e750_w100_gpio_info = {
+ .init_data1 = 0x01192f1b,
+ .gpio_dir1 = 0xd5ffdeff,
+ .gpio_oe1 = 0x000020bf,
+ .init_data2 = 0x010f010f,
+ .gpio_dir2 = 0xffffffff,
+ .gpio_oe2 = 0x000001cf,
+};
+
+static struct w100fb_mach_info e750_fb_info = {
+ .modelist = &e750_lcd_mode,
+ .num_modes = 1,
+ .regs = &e750_lcd_regs,
+ .gpio = &e750_w100_gpio_info,
+ .xtal_freq = 14318000,
+ .xtal_dbl = 1,
+};
+
+static struct resource e750_fb_resources[] = {
+ [0] = {
+ .start = 0x0c000000,
+ .end = 0x0cffffff,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device e750_fb_device = {
+ .name = "w100fb",
+ .id = -1,
+ .dev = {
+ .platform_data = &e750_fb_info,
+ },
+ .num_resources = ARRAY_SIZE(e750_fb_resources),
+ .resource = e750_fb_resources,
+};
+
+/* ----------------------------------------------------------------------- */
+
+static struct platform_device *devices[] __initdata = {
+ &e750_fb_device,
+};
+
+static void __init e750_init(void)
+{
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
MACHINE_START(E750, "Toshiba e750")
/* Maintainer: Ian Molton (spyro@f2s.com) */
.phys_io = 0x40000000,
@@ -31,6 +118,7 @@ MACHINE_START(E750, "Toshiba e750")
.map_io = pxa_map_io,
.init_irq = pxa25x_init_irq,
.fixup = eseries_fixup,
+ .init_machine = e750_init,
.timer = &pxa_timer,
MACHINE_END