diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2010-04-25 14:37:18 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-04-25 14:37:18 +0000 |
commit | 467a065384f0d50cbf2d100b55b58168ec98f0d3 (patch) | |
tree | ca04ca9ad8d9ad716bbd3f787dad0b8d50a36b22 /src/drivers/ati | |
parent | d55e26f1b1efe50aa013ad32bdf3e2b58101a64f (diff) |
no warnings days.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5493 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/drivers/ati')
-rw-r--r-- | src/drivers/ati/ragexl/atyfb.h | 33 | ||||
-rw-r--r-- | src/drivers/ati/ragexl/fbcon.h | 37 | ||||
-rw-r--r-- | src/drivers/ati/ragexl/xlinit.c | 8 |
3 files changed, 14 insertions, 64 deletions
diff --git a/src/drivers/ati/ragexl/atyfb.h b/src/drivers/ati/ragexl/atyfb.h index a30cae48b3..3d9a8c5aa1 100644 --- a/src/drivers/ati/ragexl/atyfb.h +++ b/src/drivers/ati/ragexl/atyfb.h @@ -1,24 +1,11 @@ - /* * ATI Frame Buffer Device Driver Core Definitions */ -#define u32 uint32_t -#define u16 uint16_t -#define u8 uint8_t - -#define u_int uint32_t + +#define PLL_CRTC_DECODE 0 #define EINVAL -1 -#define readb(addr) (*(volatile unsigned char *) (addr)) -#define readw(addr) (*(volatile unsigned short *) (addr)) -#define readl(addr) (*(volatile unsigned int *) (addr)) - -#define writeb(b,addr) (*(volatile unsigned char *) (addr) = (b)) -#define writew(b,addr) (*(volatile unsigned short *) (addr) = (b)) -#define writel(b,addr) (*(volatile unsigned int *) (addr) = (b)) - - #define max(x,y) (x>=y)?x:y #if CONFIG_CONSOLE_BTEXT==1 @@ -226,7 +213,7 @@ static inline u32 aty_ld_le32(int regindex, #ifdef ATARI return in_le32((volatile u32 *)(info->ati_regbase+regindex)); #else - return readl (info->ati_regbase + regindex); + return read32 (info->ati_regbase + regindex); #endif } @@ -240,7 +227,7 @@ static inline void aty_st_le32(int regindex, u32 val, #ifdef ATARI out_le32 (info->ati_regbase+regindex, val); #else - writel (val, info->ati_regbase + regindex); + write32 (info->ati_regbase + regindex, val); #endif } @@ -254,7 +241,7 @@ static inline u16 aty_ld_le16(int regindex, #if defined(__mc68000__) return le16_to_cpu(*((volatile u16 *)(info->ati_regbase+regindex))); #else - return readw (info->ati_regbase + regindex); + return read16 (info->ati_regbase + regindex); #endif } @@ -268,7 +255,7 @@ static inline void aty_st_le16(int regindex, u16 val, #if defined(__mc68000__) *((volatile u16 *)(info->ati_regbase+regindex)) = cpu_to_le16(val); #else - writew (val, info->ati_regbase + regindex); + write16 (info->ati_regbase + regindex, val); #endif } @@ -282,7 +269,7 @@ static inline u8 aty_ld_8(int regindex, #ifdef ATARI return in_8 (info->ati_regbase + regindex); #else - return readb (info->ati_regbase + regindex); + return read8 (info->ati_regbase + regindex); #endif } @@ -296,7 +283,7 @@ static inline void aty_st_8(int regindex, u8 val, #ifdef ATARI out_8 (info->ati_regbase + regindex, val); #else - writeb (val, info->ati_regbase + regindex); + write8 (info->ati_regbase + regindex, val); #endif } @@ -407,8 +394,8 @@ static inline void wait_for_idle(struct fb_info_aty *info) extern void aty_reset_engine(const struct fb_info_aty *info); extern void aty_init_engine(const struct atyfb_par *par, struct fb_info_aty *info); -extern void aty_rectfill(int dstx, int dsty, u_int width, u_int height, - u_int color, struct fb_info_aty *info); +extern void aty_rectfill(int dstx, int dsty, u32 width, u32 height, + u32 color, struct fb_info_aty *info); /* diff --git a/src/drivers/ati/ragexl/fbcon.h b/src/drivers/ati/ragexl/fbcon.h index 8b83a3682b..974e373215 100644 --- a/src/drivers/ati/ragexl/fbcon.h +++ b/src/drivers/ati/ragexl/fbcon.h @@ -11,11 +11,8 @@ #ifndef _VIDEO_FBCON_H #define _VIDEO_FBCON_H - - struct display { /* Filled in by the frame buffer device */ - struct fb_var_screeninfo var; /* variable infos. yoffset and vmode */ /* are updated by fbcon.c */ struct fb_cmap cmap; /* colormap */ @@ -29,19 +26,10 @@ struct display { u32 line_length; /* length of a line in bytes */ u16 can_soft_blank; /* zero if no hardware blanking */ u16 inverse; /* != 0 text black on white as default */ -// struct display_switch *dispsw; /* low level operations */ -// void *dispsw_data; /* optional dispsw helper data */ - -#if 0 - struct fb_fix_cursorinfo fcrsr; - struct fb_var_cursorinfo *vcrsr; - struct fb_cursorstate crsrstate; -#endif /* Filled in by the low-level console driver */ struct vc_data *conp; /* pointer to console data */ -// struct fb_info *fb_info; /* frame buffer for this console */ int vrows; /* number of virtual rows */ unsigned short cursor_x; /* current cursor position */ unsigned short cursor_y; @@ -148,29 +136,4 @@ struct display { /* Namespace consistency */ #define SCROLL_YNOPARTIAL __SCROLL_YNOPARTIAL - -#if defined(__i386__) || defined(__alpha__) || \ - defined(__x86_64__) || defined(__hppa__) || \ - defined(__powerpc64__) - -#define fb_readb __raw_readb -#define fb_readw __raw_readw -#define fb_readl __raw_readl -#define fb_writeb __raw_writeb -#define fb_writew __raw_writew -#define fb_writel __raw_writel -#define fb_memset memset_io - -#else - -#define fb_readb(addr) (*(volatile u8 *) (addr)) -#define fb_readw(addr) (*(volatile u16 *) (addr)) -#define fb_readl(addr) (*(volatile u32 *) (addr)) -#define fb_writeb(b,addr) (*(volatile u8 *) (addr) = (b)) -#define fb_writew(b,addr) (*(volatile u16 *) (addr) = (b)) -#define fb_writel(b,addr) (*(volatile u32 *) (addr) = (b)) -#define fb_memset memset - -#endif - #endif /* _VIDEO_FBCON_H */ diff --git a/src/drivers/ati/ragexl/xlinit.c b/src/drivers/ati/ragexl/xlinit.c index cd3776283e..d776c26a78 100644 --- a/src/drivers/ati/ragexl/xlinit.c +++ b/src/drivers/ati/ragexl/xlinit.c @@ -1429,10 +1429,10 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, #else scale = (M64_HAS(INTEGRATED) && info->default_par.crtc.bpp == 16) ? 3 : 0; #endif - writeb(regno << scale, &info->aty_cmap_regs->windex); - writeb(red, &info->aty_cmap_regs->lut); - writeb(green, &info->aty_cmap_regs->lut); - writeb(blue, &info->aty_cmap_regs->lut); + write8(&info->aty_cmap_regs->windex, regno << scale) + write8(&info->aty_cmap_regs->lut, red); + write8(&info->aty_cmap_regs->lut, green); + write8(&info->aty_cmap_regs->lut, blue); return 0; } |