From: Christian Gmeiner Date: Mon, 1 Oct 2012 12:02:43 +0000 (+0200) Subject: geodevga: Add functions to work with fp register X-Git-Tag: rel-1.7.2~59 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=119ece9b8212790f4c99e60c38e5d4a96841f35e;p=seabios.git geodevga: Add functions to work with fp register The Flat Panel Display Controller belongs to the Video Processor unit but its register are starting at offset 0x400. Provide functions to work with fp register. Signed-off-by: Christian Gmeiner --- diff --git a/vgasrc/geodevga.c b/vgasrc/geodevga.c index 7d780c2..263ef68 100644 --- a/vgasrc/geodevga.c +++ b/vgasrc/geodevga.c @@ -86,6 +86,8 @@ static void geode_mem_mask(u32 addr, u32 off, u32 or) ); } +#define VP_FP_START 0x400 + static u32 GeodeFB VAR16; static u32 GeodeDC VAR16; static u32 GeodeVP VAR16; @@ -134,6 +136,21 @@ static void geode_vp_mask(int reg, u32 off, u32 on) geode_mem_mask(GET_GLOBAL(GeodeVP) + reg, off, on); } +static u32 geode_fp_read(int reg) +{ + u32 val = geode_mem_read(GET_GLOBAL(GeodeVP) + VP_FP_START + reg); + dprintf(4, "%s(0x%08x) = 0x%08x\n" + , __func__, GET_GLOBAL(GeodeVP) + reg, val); + return val; +} + +static void geode_fp_write(int reg, u32 val) +{ + dprintf(4, "%s(0x%08x, 0x%08x)\n" + , __func__, GET_GLOBAL(GeodeVP) + VP_FP_START + reg, val); + geode_mem_mask(GET_GLOBAL(GeodeVP) + reg, ~0, val); +} + /**************************************************************** * Helper functions ****************************************************************/