Skip to content

Commit

Permalink
[ARM] eseries: move LCD defs into machine files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ian Molton committed Aug 19, 2008
1 parent 7dc9641 commit 0ec3cf6
Show file tree
Hide file tree
Showing 9 changed files with 349 additions and 451 deletions.
8 changes: 4 additions & 4 deletions arch/arm/mach-pxa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ obj-$(CONFIG_MACH_MAGICIAN) += magician.o
obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o eseries_udc.o
obj-$(CONFIG_MACH_E330) += e330.o
obj-$(CONFIG_MACH_E350) += e350.o
obj-$(CONFIG_MACH_E740) += e740.o e740_lcd.o
obj-$(CONFIG_MACH_E750) += e750.o e750_lcd.o
obj-$(CONFIG_MACH_E400) += e400.o e400_lcd.o
obj-$(CONFIG_MACH_E800) += e800.o e800_lcd.o
obj-$(CONFIG_MACH_E740) += e740.o
obj-$(CONFIG_MACH_E750) += e750.o
obj-$(CONFIG_MACH_E400) += e400.o
obj-$(CONFIG_MACH_E800) += e800.o
obj-$(CONFIG_MACH_PALMTX) += palmtx.o

ifeq ($(CONFIG_MACH_ZYLONITE),y)
Expand Down
32 changes: 32 additions & 0 deletions arch/arm/mach-pxa/e400.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,41 @@
#include <asm/mach/arch.h>
#include <asm/mach-types.h>

#include <mach/pxa-regs.h>
#include <mach/mfp-pxa25x.h>
#include <mach/hardware.h>

#include <mach/pxafb.h>

#include "generic.h"
#include "eseries.h"

/* ------------------------ E400 LCD definitions ------------------------ */

static struct pxafb_mode_info e400_pxafb_mode_info = {
.pixclock = 140703,
.xres = 240,
.yres = 320,
.bpp = 16,
.hsync_len = 4,
.left_margin = 28,
.right_margin = 8,
.vsync_len = 3,
.upper_margin = 5,
.lower_margin = 6,
.sync = 0,
};

static struct pxafb_mach_info e400_pxafb_mach_info = {
.modes = &e400_pxafb_mode_info,
.num_modes = 1,
.lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
.lccr3 = 0,
.pxafb_backlight_power = NULL,
};

/* ------------------------ E400 MFP config ----------------------------- */

static unsigned long e400_pin_config[] __initdata = {
/* Chip selects */
GPIO15_nCS_1, /* CS1 - Flash */
Expand All @@ -41,9 +70,12 @@ static unsigned long e400_pin_config[] __initdata = {
GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
};

/* ---------------------------------------------------------------------- */

static void __init e400_init(void)
{
pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config));
set_pxa_fb_info(&e400_pxafb_mach_info);
}

MACHINE_START(E400, "Toshiba e400")
Expand Down
56 changes: 0 additions & 56 deletions arch/arm/mach-pxa/e400_lcd.c

This file was deleted.

86 changes: 86 additions & 0 deletions arch/arm/mach-pxa/e740.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -23,6 +28,80 @@
#include "generic.h"
#include "eseries.h"


/* ------------------------ e740 video support --------------------------- */

static struct w100_gen_regs e740_lcd_regs = {
.lcd_format = 0x00008023,
.lcdd_cntl1 = 0x0f000000,
.lcdd_cntl2 = 0x0003ffff,
.genlcd_cntl1 = 0x00ffff03,
.genlcd_cntl2 = 0x003c0f03,
.genlcd_cntl3 = 0x000143aa,
};

static struct w100_mode e740_lcd_mode = {
.xres = 240,
.yres = 320,
.left_margin = 20,
.right_margin = 28,
.upper_margin = 9,
.lower_margin = 8,
.crtc_ss = 0x80140013,
.crtc_ls = 0x81150110,
.crtc_gs = 0x80050005,
.crtc_vpos_gs = 0x000a0009,
.crtc_rev = 0x0040010a,
.crtc_dclk = 0xa906000a,
.crtc_gclk = 0x80050108,
.crtc_goe = 0x80050108,
.pll_freq = 57,
.pixclk_divider = 4,
.pixclk_divider_rotated = 4,
.pixclk_src = CLK_SRC_XTAL,
.sysclk_divider = 1,
.sysclk_src = CLK_SRC_PLL,
.crtc_ps1_active = 0x41060010,
};

static struct w100_gpio_regs e740_w100_gpio_info = {
.init_data1 = 0x21002103,
.gpio_dir1 = 0xffffdeff,
.gpio_oe1 = 0x03c00643,
.init_data2 = 0x003f003f,
.gpio_dir2 = 0xffffffff,
.gpio_oe2 = 0x000000ff,
};

static struct w100fb_mach_info e740_fb_info = {
.modelist = &e740_lcd_mode,
.num_modes = 1,
.regs = &e740_lcd_regs,
.gpio = &e740_w100_gpio_info,
.xtal_freq = 14318000,
.xtal_dbl = 1,
};

static struct resource e740_fb_resources[] = {
[0] = {
.start = 0x0c000000,
.end = 0x0cffffff,
.flags = IORESOURCE_MEM,
},
};

static struct platform_device e740_fb_device = {
.name = "w100fb",
.id = -1,
.dev = {
.platform_data = &e740_fb_info,
},
.num_resources = ARRAY_SIZE(e740_fb_resources),
.resource = e740_fb_resources,
};

/* --------------------------- MFP Pin config -------------------------- */

static unsigned long e740_pin_config[] __initdata = {
/* Chip selects */
GPIO15_nCS_1, /* CS1 - Flash */
Expand Down Expand Up @@ -62,9 +141,16 @@ static unsigned long e740_pin_config[] __initdata = {
GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
};

/* ----------------------------------------------------------------------- */

static struct platform_device *devices[] __initdata = {
&e740_fb_device,
};

static void __init e740_init(void)
{
pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
platform_add_devices(devices, ARRAY_SIZE(devices));
}

MACHINE_START(E740, "Toshiba e740")
Expand Down
123 changes: 0 additions & 123 deletions arch/arm/mach-pxa/e740_lcd.c

This file was deleted.

Loading

0 comments on commit 0ec3cf6

Please sign in to comment.