* pm2 driver
@ 2005-09-27 18:46 Peter 'p2' De Schrijver
2005-10-05 12:38 ` Jim Hague
0 siblings, 1 reply; 2+ messages in thread
From: Peter 'p2' De Schrijver @ 2005-09-27 18:46 UTC (permalink / raw)
To: jim.hague, linux-fbdev-devel
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: pm2 driver
2005-09-27 18:46 pm2 driver Peter 'p2' De Schrijver
@ 2005-10-05 12:38 ` Jim Hague
0 siblings, 0 replies; 2+ messages in thread
From: Jim Hague @ 2005-10-05 12:38 UTC (permalink / raw)
To: linux-fbdev-devel
On Tuesday 27 September 2005 19:46, Peter 'p2' De Schrijver wrote:
> 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 for that, Peter - and sorry for the delay in getting back to you. I've
been away from home for work purposes, and am just now catching up on back
emails.
I am curious about one thing. The initial mem control, mem config etc. values
that you check for - I assume they are what you observe on your hardware.
Will they be the same on other hardware, do you know? I must check my TVP4020
docs...
How would you feel if instead I added a driver parameter to force
initialisation instead of looking for particular initial values?
Out of interest, what have you got the card plugged into?
--
Jim Hague - jim.hague@acm.org Never trust a computer you can't lift.
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-05 12:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-27 18:46 pm2 driver Peter 'p2' De Schrijver
2005-10-05 12:38 ` Jim Hague
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.