Commit 9127fa28595093a146fc3e2c937747e014e4bfa2

Authored by Peter 'p2' De Schrijver
Committed by Linus Torvalds
1 parent 1cc650c69f

[PATCH] pm2fb: Manual configuration of timings for Elsa Winner 2000 Office

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.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 16 additions and 0 deletions Side-by-side Diff

drivers/video/pm2fb.c
... ... @@ -1120,6 +1120,22 @@
1120 1120 default_par->mem_control, default_par->boot_address,
1121 1121 default_par->mem_config);
1122 1122  
  1123 + if(default_par->mem_control == 0 &&
  1124 + default_par->boot_address == 0x31 &&
  1125 + default_par->mem_config == 0x259fffff &&
  1126 + pdev->subsystem_vendor == 0x1048 &&
  1127 + pdev->subsystem_device == 0x0a31) {
  1128 + DPRINTK("subsystem_vendor: %04x, subsystem_device: %04x\n",
  1129 + pdev->subsystem_vendor, pdev->subsystem_device);
  1130 + DPRINTK("We have not been initialized by VGA BIOS "
  1131 + "and are running on an Elsa Winner 2000 Office\n");
  1132 + DPRINTK("Initializing card timings manually...\n");
  1133 + default_par->mem_control=0;
  1134 + default_par->boot_address=0x20;
  1135 + default_par->mem_config=0xe6002021;
  1136 + default_par->memclock=100000;
  1137 + }
  1138 +
1123 1139 /* Now work out how big lfb is going to be. */
1124 1140 switch(default_par->mem_config & PM2F_MEM_CONFIG_RAM_MASK) {
1125 1141 case PM2F_MEM_BANKS_1: