Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Peter 'p2' De Schrijver <p2@mind.be>
To: jim.hague@acm.org, linux-fbdev-devel@lists.sourceforge.net
Subject: pm2 driver
Date: Tue, 27 Sep 2005 20:46:34 +0200	[thread overview]
Message-ID: <20050927184633.GH4320@codecarver> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 302 bytes --]

Hi,

Attached is a small patch which configures the correct memory clock and
timings on the Elsa Winner 2000 Office pm2 based card. This is necessary
when the card is used on a platform which does not support PC style BIOS
initialization.

Thanks,

Peter (p2).

-- 
goa is a state of mind

[-- Attachment #1.2: patch-sb1-pm2 --]
[-- Type: text/plain, Size: 1388 bytes --]

diff -urN -x asm -x scripts -x config linux/drivers/video/pm2fb.c linux-my/drivers/video/pm2fb.c
--- linux/drivers/video/pm2fb.c	2005-08-01 20:24:38.000000000 +0200
+++ linux-my/drivers/video/pm2fb.c	2005-09-22 16:40:11.000000000 +0200
@@ -52,7 +52,7 @@
 #error "Only generic PCI cards supported."
 #endif
 
-#undef PM2FB_MASTER_DEBUG
+#define PM2FB_MASTER_DEBUG 1
 #ifdef PM2FB_MASTER_DEBUG
 #define DPRINTK(a,b...)	printk(KERN_DEBUG "pm2fb: %s: " a, __FUNCTION__ , ## b)
 #else
@@ -1121,6 +1121,22 @@
 		default_par->mem_control, default_par->boot_address,
 		default_par->mem_config);
 
+	if(default_par->mem_control == 0 &&
+		default_par->boot_address == 0x31 &&
+		default_par->mem_config == 0x259fffff &&
+		pdev->subsystem_vendor == 0x1048 &&
+		pdev->subsystem_device == 0x0a31) {
+		DPRINTK("subsystem_vendor: %04x, subsystem_device: %04x\n",
+			pdev->subsystem_vendor, pdev->subsystem_device);
+		DPRINTK("We have not been initialized by VGA BIOS "
+			"and are running on an Elsa Winner 2000 Office\n");
+		DPRINTK("Initializing card timings manually...\n");
+		default_par->mem_control=0;
+		default_par->boot_address=0x20;
+		default_par->mem_config=0xe6002021;
+		default_par->memclock=100000;
+	}
+
 	/* Now work out how big lfb is going to be. */
 	switch(default_par->mem_config & PM2F_MEM_CONFIG_RAM_MASK) {
 	case PM2F_MEM_BANKS_1:

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2005-09-27 18:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-27 18:46 Peter 'p2' De Schrijver [this message]
2005-10-05 12:38 ` pm2 driver Jim Hague

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=20050927184633.GH4320@codecarver \
    --to=p2@mind.be \
    --cc=jim.hague@acm.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