linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH 2/2] ARM S3C2410 framebuffer driver
Date: Sun, 04 Sep 2005 12:18:03 +0200	[thread overview]
Message-ID: <854q916sro.fsf@Orfeo.duckcorp.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 67 bytes --]




Signed-Off-By: Arnaud Patard <arnaud.patard@rtp-net.org>
  ---


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: s3c2410fb2.patch --]
[-- Type: text/x-patch, Size: 2800 bytes --]

diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c
--- a/arch/arm/mach-s3c2410/devs.c
+++ b/arch/arm/mach-s3c2410/devs.c
@@ -29,7 +29,7 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
-
+#include <asm/arch/fb.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -103,6 +103,15 @@ struct platform_device s3c_device_lcd = 
 
 EXPORT_SYMBOL(s3c_device_lcd);
 
+static struct s3c2410fb_mach_info s3c2410fb_info;
+
+void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info)
+{
+	memcpy(&s3c2410fb_info,hard_s3c2410fb_info,sizeof(struct s3c2410fb_mach_info));
+	s3c_device_lcd.dev.platform_data = &s3c2410fb_info;
+}
+EXPORT_SYMBOL(set_s3c2410fb_info);
+
 /* NAND Controller */
 
 static struct resource s3c_nand_resource[] = {
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -45,6 +45,9 @@
 
 //#include <asm/debug-ll.h>
 #include <asm/arch/regs-serial.h>
+#include <asm/arch/regs-lcd.h>
+
+#include <asm/arch/fb.h>
 
 #include <linux/serial_core.h>
 
@@ -88,6 +91,48 @@ static struct s3c2410_uartcfg h1940_uart
 
 
 
+/**
+ * Set lcd on or off
+ **/
+static struct s3c2410fb_mach_info h1940_lcdcfg __initdata = {
+	.fixed_syncs=		1,
+	.regs={ 
+		.lcdcon1=	S3C2410_LCDCON1_TFT16BPP | \
+				S3C2410_LCDCON1_TFT | \
+				S3C2410_LCDCON1_CLKVAL(0x0C),
+
+		.lcdcon2=	S3C2410_LCDCON2_VBPD(7) | \
+				S3C2410_LCDCON2_LINEVAL(319) | \
+				S3C2410_LCDCON2_VFPD(6) | \
+				S3C2410_LCDCON2_VSPW(0),
+
+		.lcdcon3=	S3C2410_LCDCON3_HBPD(19) | \
+				S3C2410_LCDCON3_HOZVAL(239) | \
+				S3C2410_LCDCON3_HFPD(7),
+
+		.lcdcon4=	S3C2410_LCDCON4_MVAL(0) | \
+				S3C2410_LCDCON4_HSPW(3),
+
+		.lcdcon5=	S3C2410_LCDCON5_FRM565 | \
+				S3C2410_LCDCON5_INVVLINE | \
+				S3C2410_LCDCON5_HWSWP,
+	},
+	.lpcsel=	0x02,
+	.gpccon=	0xaa940659,
+	.gpccon_mask=	0xffffffff,
+	.gpcup=		0x0000ffff,
+	.gpcup_mask=	0xffffffff,
+	.gpdcon=	0xaa84aaa0,
+	.gpdcon_mask=	0xffffffff,
+	.gpdup=		0x0000faff,
+	.gpdup_mask=	0xffffffff,
+
+	.width=		240,
+	.height=	320,
+	.xres=		{240,240,240},
+	.yres=		{320,320,320},
+	.bpp=		{16,16,16},
+};
 
 static struct platform_device *h1940_devices[] __initdata = {
 	&s3c_device_usb,
@@ -116,6 +161,11 @@ void __init h1940_init_irq(void)
 
 }
 
+void __init h1940_init(void)
+{
+	set_s3c2410fb_info(&h1940_lcdcfg);
+}
+
 MACHINE_START(H1940, "IPAQ-H1940")
 	/* Maintainer: Ben Dooks <ben@fluff.org> */
 	.phys_ram	= S3C2410_SDRAM_PA,
@@ -124,5 +174,6 @@ MACHINE_START(H1940, "IPAQ-H1940")
 	.boot_params	= S3C2410_SDRAM_PA + 0x100,
 	.map_io		= h1940_map_io,
 	.init_irq	= h1940_init_irq,
+	.init_machine   = h1940_init,
 	.timer		= &s3c24xx_timer,
 MACHINE_END


                 reply	other threads:[~2005-09-04 10:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=854q916sro.fsf@Orfeo.duckcorp.org \
    --to=arnaud.patard@rtp-net.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).