aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/stifb.c
diff options
context:
space:
mode:
authorHelge Deller <deller@parisc-linux.org>2006-01-10 20:48:03 -0500
committerKyle McMartin <kyle@duet.int.mcmartin.ca>2006-01-10 21:52:53 -0500
commit5d6d1640a254b27d0f598007313065713c1e3a04 (patch)
treef63fd9b6cfdac437c404d8cc03a8d8cf18a3ea8c /drivers/video/stifb.c
parent02d79800a221eb4e54d80cbf2026af9edc1f437d (diff)
[PARISC] stifb: use F_EXTEND macro
Use the F_EXTEND() macro instead of open coding it with an #ifdef. Provides a nice cleanup. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'drivers/video/stifb.c')
-rw-r--r--drivers/video/stifb.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c
index fbb17332afd..83cd76ca026 100644
--- a/drivers/video/stifb.c
+++ b/drivers/video/stifb.c
@@ -73,13 +73,8 @@
#include "sticore.h"
/* REGION_BASE(fb_info, index) returns the virtual address for region <index> */
-#ifdef __LP64__
- #define REGION_BASE(fb_info, index) \
- (fb_info->sti->glob_cfg->region_ptrs[index] | 0xffffffff00000000)
-#else
- #define REGION_BASE(fb_info, index) \
- fb_info->sti->glob_cfg->region_ptrs[index]
-#endif
+#define REGION_BASE(fb_info, index) \
+ F_EXTEND(fb_info->sti->glob_cfg->region_ptrs[index])
#define NGLEDEVDEPROM_CRT_REGION 1
@@ -1250,12 +1245,10 @@ stifb_init_fb(struct sti_struct *sti, int bpp_pref)
memset(&fb->ngle_rom, 0, sizeof(fb->ngle_rom));
if ((fb->sti->regions_phys[0] & 0xfc000000) ==
(fb->sti->regions_phys[2] & 0xfc000000))
- sti_rom_address = fb->sti->regions_phys[0];
+ sti_rom_address = F_EXTEND(fb->sti->regions_phys[0]);
else
- sti_rom_address = fb->sti->regions_phys[1];
-#ifdef __LP64__
- sti_rom_address |= 0xffffffff00000000;
-#endif
+ sti_rom_address = F_EXTEND(fb->sti->regions_phys[1]);
+
fb->deviceSpecificConfig = gsc_readl(sti_rom_address);
if (IS_24_DEVICE(fb)) {
if (bpp_pref == 8 || bpp_pref == 32)