Geode sc2200 vga
Christer Weinigel
christer at weinigel.se
Mon Jan 6 17:32:01 CET 2003
Christer Weinigel <christer at weinigel.se> writes:
> <confession time>
>
> Ok, I downloaded the linux4.tv driver again and tried it on my SC2200
> board and I can't get it to work either. Very strange, since I had it
> working with LinuxBIOS a couple of months ago. It might be that I had
> to turn on some clock or PLL by hand.
>
> </confession time>
>
> Oh well, I'll try to see if I can find a backup of the kernel I used
> then and see if I can get it running again.
Following up to myself... Backups are a good thing :-)
This patch initializes a few registers on the SC2200 that the geodefb
code from linux4.tv doesn't seem to touch. The values I'm storing
into the registers are read from a system running with the XpressROM
BIOS. Now I can see the penguin when booting Linux from LinuxBIOS.
The timing for the video mode seems strange, my monitor has some
trouble syncing on this signal, but at least I get some kind of video.
I guess that something similar is needed to get video from a CS5530
based system.
I think I'll give up on this for the moment, I'm not all that
interested in video myself, I just wanted to know why it didn't work
when I knew that I had had it running before. If anyone needs video
to work on a SC2200, make a dump of the F4BAR1 registers and the GCR
registers and compare them with a working system (booted from
XPressROM) and look in the data sheets to see if the differences seem
significant.
/Christer (off to sleep)
diff -ur linux-2.4.19/drivers/video/geode/geodefb.c.orig linux-2.4.19/drivers/video/geode/geodefb.c
--- linux-2.4.19/drivers/video/geode/geodefb.c.orig Tue Apr 10 17:09:01 2001
+++ linux-2.4.19/drivers/video/geode/geodefb.c Mon Jan 6 23:27:31 2003
@@ -182,6 +182,8 @@
#include <linux/init.h>
#include <linux/devfs_fs_kernel.h>
+#include <linux/pci.h>
+
#include <asm/io.h>
#include <asm/mtrr.h>
@@ -1350,6 +1352,36 @@
return(-EBUSY);
}
+ if (1) /* wingel */
+ {
+ struct pci_dev *pdev;
+ u8 *video;
+
+ if ((pdev = pci_find_device(PCI_VENDOR_ID_NS,
+ PCI_DEVICE_ID_NS_SCx200_VIDEO,
+ NULL)) == NULL) {
+ printk("can't find scx200\n");
+ } else if (!(video = ioremap(pci_resource_start(pdev, 1), 0x1000))) {
+ printk(KERN_ERR "unable to ioremap video\n");
+ } else {
+ writel(0x00001000, gfx_virt_regptr + 0x8308); /* disable timing generator */
+
+ writel(0x0020030f, video + 0x04);
+ writel(0x00001000, video + 0x28);
+ writel(0x0070e00c, video + 0x2c);
+
+ writel(0x00000100, video + 0x44);
+ writel(0x00000156, video + 0x48);
+ writel(0x00060000, video + 0x4c);
+ writel(0x00ffffff, video + 0x50);
+ writel(0x00ffffff, video + 0x54);
+
+ writel(0x1000102f, gfx_virt_regptr + 0x8308);
+
+ iounmap(video);
+ }
+ }
+
geode_create_galdevice();
strcpy(gen.info.modename, geodefb_name);
--
"Just how much can I get away with and still go to heaven?"
Freelance consultant specializing in device driver programming for Linux
Christer Weinigel <christer at weinigel.se> http://www.weinigel.se
More information about the coreboot
mailing list