diff options
author | Nils <njacobs8@adsltotaal.nl> | 2012-01-14 12:15:14 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2012-01-14 12:15:14 -0500 |
commit | 24ddd8678cacab4268e8cd8209f30e3e69f12852 (patch) | |
tree | c1e59b9898627a23d79d36a26184343b9e5b1c59 /vgasrc | |
parent | e8b184fe576e5b1263f2e72f0c71b3f4bb158e82 (diff) | |
download | seabios-hppa-24ddd8678cacab4268e8cd8209f30e3e69f12852.zip seabios-hppa-24ddd8678cacab4268e8cd8209f30e3e69f12852.tar.gz seabios-hppa-24ddd8678cacab4268e8cd8209f30e3e69f12852.tar.bz2 |
vgabios: Add the geode GX2 functionality.
Signed-off-by: Nils Jacobs <njacobs8 at adsltotaal.nl>
Diffstat (limited to 'vgasrc')
-rw-r--r-- | vgasrc/geodevga.c | 10 | ||||
-rw-r--r-- | vgasrc/geodevga.h | 6 | ||||
-rw-r--r-- | vgasrc/vgahw.h | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/vgasrc/geodevga.c b/vgasrc/geodevga.c index 0008abe..7735fdc 100644 --- a/vgasrc/geodevga.c +++ b/vgasrc/geodevga.c @@ -87,7 +87,10 @@ static int legacyio_check(void) int ret=0; union u64_u32_u val; - val=geode_msrRead(MSR_GLIU0_BASE4); + if (CONFIG_VGA_GEODEGX2) + val=geode_msrRead(GLIU0_P2D_BM_4); + else + val=geode_msrRead(MSR_GLIU0_BASE4); if (val.lo != 0x0A0fffe0) ret|=1; @@ -255,7 +258,10 @@ int vp_setup(void) dprintf(2,"VP_SETUP\n"); /* set output to crt and RGB/YUV */ - geode_msrWrite(VP_MSR_CONFIG,~0 ,~0xf8,0,0); + if (CONFIG_VGA_GEODEGX2) + geode_msrWrite(VP_MSR_CONFIG_GX2,~0 ,~0xf8,0,0); + else + geode_msrWrite(VP_MSR_CONFIG_LX,~0 ,~0xf8,0,0); /* get vp register base from pci */ outl(GEODE_PCI_VP,PORT_PCI_CMD); diff --git a/vgasrc/geodevga.h b/vgasrc/geodevga.h index 65e698c..ec019a4 100644 --- a/vgasrc/geodevga.h +++ b/vgasrc/geodevga.h @@ -37,11 +37,13 @@ /* LX MSRs */ #define MSR_GLIU0 (1 << 28) -#define MSR_GLIU0_BASE4 (MSR_GLIU0 + 0x23) +#define MSR_GLIU0_BASE4 (MSR_GLIU0 + 0x23) /* LX */ +#define GLIU0_P2D_BM_4 (MSR_GLIU0 + 0x24) /* GX2 */ #define GLIU0_IOD_BM_0 (MSR_GLIU0 + 0xE0) #define GLIU0_IOD_BM_1 (MSR_GLIU0 + 0xE1) #define DC_SPARE 0x80000011 -#define VP_MSR_CONFIG 0x48002001 +#define VP_MSR_CONFIG_GX2 0xc0002001 /* GX2 */ +#define VP_MSR_CONFIG_LX 0x48002001 /* LX */ /* DC REG OFFSET */ #define DC_UNLOCK 0x0 diff --git a/vgasrc/vgahw.h b/vgasrc/vgahw.h index fea041a..23b4f13 100644 --- a/vgasrc/vgahw.h +++ b/vgasrc/vgahw.h @@ -22,7 +22,7 @@ static inline int vgahw_init(void) { return clext_init(); if (CONFIG_VGA_BOCHS) return bochsvga_init(); - if (CONFIG_VGA_GEODELX) + if (CONFIG_VGA_GEODEGX2 || CONFIG_VGA_GEODELX) return geodevga_init(); return stdvga_init(); } |