Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gxfb/lxfb: use VSA definitions when fetching framebuffer size

..Rather than using magic constants.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andres Salomon and committed by
Linus Torvalds
61a517a0 4537f93a

+8 -6
+4 -3
drivers/video/geode/display_gx.c
··· 17 17 #include <asm/io.h> 18 18 #include <asm/div64.h> 19 19 #include <asm/delay.h> 20 + #include <asm/geode.h> 20 21 21 22 #include "gxfb.h" 22 23 ··· 29 28 /* Virtual register class = 0x02 */ 30 29 /* VG_MEM_SIZE(512Kb units) = 0x00 */ 31 30 32 - outw(0xFC53, 0xAC1C); 33 - outw(0x0200, 0xAC1C); 31 + outw(VSA_VR_UNLOCK, VSA_VRC_INDEX); 32 + outw(VSA_VR_MEM_SIZE, VSA_VRC_INDEX); 34 33 35 - val = (unsigned int)(inw(0xAC1E)) & 0xFFl; 34 + val = (unsigned int)(inw(VSA_VRC_DATA)) & 0xFFl; 36 35 return (val << 19); 37 36 } 38 37
+3 -3
drivers/video/geode/lxfb_ops.c
··· 333 333 /* Virtual Register Class = 0x02 */ 334 334 /* VG_MEM_SIZE (1MB units) = 0x00 */ 335 335 336 - outw(0xFC53, 0xAC1C); 337 - outw(0x0200, 0xAC1C); 336 + outw(VSA_VR_UNLOCK, VSA_VRC_INDEX); 337 + outw(VSA_VR_MEM_SIZE, VSA_VRC_INDEX); 338 338 339 - val = (unsigned int)(inw(0xAC1E)) & 0xFE; 339 + val = (unsigned int)(inw(VSA_VRC_DATA)) & 0xFE; 340 340 return (val << 20); 341 341 } 342 342
+1
include/asm-x86/geode.h
··· 109 109 #define VSA_VRC_DATA 0xAC1E 110 110 #define VSA_VR_UNLOCK 0xFC53 /* unlock virtual register */ 111 111 #define VSA_VR_SIGNATURE 0x0003 112 + #define VSA_VR_MEM_SIZE 0x0200 112 113 #define VSA_SIG 0x4132 /* signature is ascii 'VSA2' */ 113 114 114 115 /* GPIO */