X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=seabios.git;a=blobdiff_plain;f=vgasrc%2Fgeodevga.c;h=ce754a5b7886b23e18dd73e3135b7700804d37ed;hp=d326eda021fdc941819cdbde217c34b09599e8c6;hb=707d2168f528d3aeafc439331669edb3d02260a5;hpb=69b01cbdb3a1644dc9a8a56e5564339f91b789ab diff --git a/vgasrc/geodevga.c b/vgasrc/geodevga.c index d326eda..ce754a5 100644 --- a/vgasrc/geodevga.c +++ b/vgasrc/geodevga.c @@ -7,12 +7,13 @@ // This file may be distributed under the terms of the GNU LGPLv3 license. #include "geodevga.h" // geodevga_init -#include "ioport.h" // outb #include "farptr.h" // SET_FARVAR #include "biosvar.h" // GET_BDA #include "vgabios.h" // VGAREG_* #include "util.h" // memset #include "stdvga.h" // stdvga_crtc_write +#include "pci.h" // pci_config_readl +#include "pci_regs.h" // PCI_BASE_ADDRESS_0 /**************************************************************** @@ -226,8 +227,7 @@ static int dc_setup(void) /* read fb-bar from pci, then point dc to the fb base */ dc_fb = dc_read(seg,DC_GLIU0_MEM_OFFSET); - outl(GEODE_PCI_FB,PORT_PCI_CMD); - fb = inl(PORT_PCI_DATA); + fb = pci_config_readl(GET_GLOBAL(VgaBDF), PCI_BASE_ADDRESS_0); if (fb!=dc_fb) { dc_write(seg,DC_GLIU0_MEM_OFFSET,fb); } @@ -254,13 +254,12 @@ int vp_setup(void) dprintf(2,"VP_SETUP\n"); /* set output to crt and RGB/YUV */ if (CONFIG_VGA_GEODEGX2) - geode_msrWrite(VP_MSR_CONFIG_GX2,~0 ,~0xf8,0,0); + geode_msrWrite(VP_MSR_CONFIG_GX2, ~0, ~0xf8, 0, 0); else - geode_msrWrite(VP_MSR_CONFIG_LX,~0 ,~0xf8,0,0); + geode_msrWrite(VP_MSR_CONFIG_LX, ~0, ~0xf8, 0, 0); /* get vp register base from pci */ - outl(GEODE_PCI_VP,PORT_PCI_CMD); - vp = inl(PORT_PCI_DATA); + vp = pci_config_readl(GET_GLOBAL(VgaBDF), PCI_BASE_ADDRESS_3); /* Set mmio registers * there may be some timing issues here, the reads seem