{
u8 i, reg;
- outXGIIDXREG(XGISR, 0x05, 0x86);
+ xgifb_reg_set(XGISR, 0x05, 0x86);
/*
- outXGIIDXREG(XGISR, 0x08, 0x4f);
- outXGIIDXREG(XGISR, 0x0f, 0x20);
- outXGIIDXREG(XGISR, 0x11, 0x4f);
- outXGIIDXREG(XGISR, 0x13, 0x45);
- outXGIIDXREG(XGISR, 0x14, 0x51);
- outXGIIDXREG(XGISR, 0x1e, 0x41);
- outXGIIDXREG(XGISR, 0x1f, 0x0);
- outXGIIDXREG(XGISR, 0x20, 0xa1);
- outXGIIDXREG(XGISR, 0x22, 0xfb);
- outXGIIDXREG(XGISR, 0x26, 0x22);
- outXGIIDXREG(XGISR, 0x3e, 0x07);
+ xgifb_reg_set(XGISR, 0x08, 0x4f);
+ xgifb_reg_set(XGISR, 0x0f, 0x20);
+ xgifb_reg_set(XGISR, 0x11, 0x4f);
+ xgifb_reg_set(XGISR, 0x13, 0x45);
+ xgifb_reg_set(XGISR, 0x14, 0x51);
+ xgifb_reg_set(XGISR, 0x1e, 0x41);
+ xgifb_reg_set(XGISR, 0x1f, 0x0);
+ xgifb_reg_set(XGISR, 0x20, 0xa1);
+ xgifb_reg_set(XGISR, 0x22, 0xfb);
+ xgifb_reg_set(XGISR, 0x26, 0x22);
+ xgifb_reg_set(XGISR, 0x3e, 0x07);
*/
- /* outXGIIDXREG(XGICR, 0x19, 0x00); */
- /* outXGIIDXREG(XGICR, 0x1a, 0x3C); */
- /* outXGIIDXREG(XGICR, 0x22, 0xff); */
- /* outXGIIDXREG(XGICR, 0x3D, 0x10); */
+ /* xgifb_reg_set(XGICR, 0x19, 0x00); */
+ /* xgifb_reg_set(XGICR, 0x1a, 0x3C); */
+ /* xgifb_reg_set(XGICR, 0x22, 0xff); */
+ /* xgifb_reg_set(XGICR, 0x3D, 0x10); */
- /* outXGIIDXREG(XGICR, 0x4a, 0xf3); */
+ /* xgifb_reg_set(XGICR, 0x4a, 0xf3); */
- /* outXGIIDXREG(XGICR, 0x57, 0x0); */
- /* outXGIIDXREG(XGICR, 0x7a, 0x2c); */
+ /* xgifb_reg_set(XGICR, 0x57, 0x0); */
+ /* xgifb_reg_set(XGICR, 0x7a, 0x2c); */
- /* outXGIIDXREG(XGICR, 0x82, 0xcc); */
- /* outXGIIDXREG(XGICR, 0x8c, 0x0); */
+ /* xgifb_reg_set(XGICR, 0x82, 0xcc); */
+ /* xgifb_reg_set(XGICR, 0x8c, 0x0); */
/*
- outXGIIDXREG(XGICR, 0x99, 0x1);
- outXGIIDXREG(XGICR, 0x41, 0x40);
+ xgifb_reg_set(XGICR, 0x99, 0x1);
+ xgifb_reg_set(XGICR, 0x41, 0x40);
*/
for (i = 0; i < 0x4f; i++) {
printk("\ni 3d5 => %x", reg);
}
/*
- outXGIIDXREG(XGIPART1,0x2F,1);
+ xgifb_reg_set(XGIPART1,0x2F,1);
for (i=1; i < 0x50; i++) {
reg = xgifb_reg_get(XGIPART1, i);
printk("\no d004 %x", i);
int i, j, k;
tmp = xgifb_reg_get(XGISR, 0x1e);
- outXGIIDXREG(XGISR, 0x1e, tmp | 4);
+ xgifb_reg_set(XGISR, 0x1e, tmp | 4);
pData = xgi_video_info.mmio_vbase + 0x20000;
if ((pData[0x0] == 0x55) && (pData[0x1] == 0xAA) && (pData[0x65] & 0x1)) {
info->fix.line_length = ((info->var.xres_virtual
* info->var.bits_per_pixel) >> 6);
- outXGIIDXREG(XGISR, IND_XGI_PASSWORD, XGI_PASSWORD);
+ xgifb_reg_set(XGISR, IND_XGI_PASSWORD, XGI_PASSWORD);
- outXGIIDXREG(XGICR, 0x13, (info->fix.line_length & 0x00ff));
- outXGIIDXREG(XGISR, 0x0E, (info->fix.line_length & 0xff00) >> 8);
+ xgifb_reg_set(XGICR, 0x13, (info->fix.line_length & 0x00ff));
+ xgifb_reg_set(XGISR, 0x0E, (info->fix.line_length & 0xff00) >> 8);
XGIfb_post_setmode();
xgi_video_info.video_cmap_len = 256;
#if defined(__powerpc__)
cr_data = xgifb_reg_get(XGICR, 0x4D);
- outXGIIDXREG(XGICR, 0x4D, (cr_data & 0xE0));
+ xgifb_reg_set(XGICR, 0x4D, (cr_data & 0xE0));
#endif
break;
case 16:
xgi_video_info.XGI310_AccelDepth = 0x00010000;
#if defined(__powerpc__)
cr_data = xgifb_reg_get(XGICR, 0x4D);
- outXGIIDXREG(XGICR, 0x4D, ((cr_data & 0xE0) | 0x0B));
+ xgifb_reg_set(XGICR, 0x4D, ((cr_data & 0xE0) | 0x0B));
#endif
xgi_video_info.video_cmap_len = 16;
break;
xgi_video_info.video_cmap_len = 16;
#if defined(__powerpc__)
cr_data = xgifb_reg_get(XGICR, 0x4D);
- outXGIIDXREG(XGICR, 0x4D, ((cr_data & 0xE0) | 0x15));
+ xgifb_reg_set(XGICR, 0x4D, ((cr_data & 0xE0) | 0x15));
#endif
break;
default:
break;
}
- outXGIIDXREG(XGISR, IND_XGI_PASSWORD, XGI_PASSWORD);
+ xgifb_reg_set(XGISR, IND_XGI_PASSWORD, XGI_PASSWORD);
- outXGIIDXREG(XGICR, 0x0D, base & 0xFF);
- outXGIIDXREG(XGICR, 0x0C, (base >> 8) & 0xFF);
- outXGIIDXREG(XGISR, 0x0D, (base >> 16) & 0xFF);
- outXGIIDXREG(XGISR, 0x37, (base >> 24) & 0x03);
+ xgifb_reg_set(XGICR, 0x0D, base & 0xFF);
+ xgifb_reg_set(XGICR, 0x0C, (base >> 8) & 0xFF);
+ xgifb_reg_set(XGISR, 0x0D, (base >> 16) & 0xFF);
+ xgifb_reg_set(XGISR, 0x37, (base >> 24) & 0x03);
setXGIIDXREG(XGISR, 0x37, 0xDF, (base >> 21) & 0x04);
if (xgi_video_info.disp_state & DISPTYPE_DISP2) {
orXGIIDXREG(XGIPART1, XGIfb_CRT2_write_enable, 0x01);
- outXGIIDXREG(XGIPART1, 0x06, (base & 0xFF));
- outXGIIDXREG(XGIPART1, 0x05, ((base >> 8) & 0xFF));
- outXGIIDXREG(XGIPART1, 0x04, ((base >> 16) & 0xFF));
+ xgifb_reg_set(XGIPART1, 0x06, (base & 0xFF));
+ xgifb_reg_set(XGIPART1, 0x05, ((base >> 8) & 0xFF));
+ xgifb_reg_set(XGIPART1, 0x04, ((base >> 16) & 0xFF));
setXGIIDXREG(XGIPART1, 0x02, 0x7F, ((base >> 24) & 0x01) << 7);
}
/* printk("End of pan_var"); */
else
reg |= 0x80;
- outXGIIDXREG(XGICR, 0x17, reg);
- outXGIIDXREG(XGISR, 0x00, 0x01); /* Synchronous Reset */
- outXGIIDXREG(XGISR, 0x00, 0x03); /* End Reset */
+ xgifb_reg_set(XGICR, 0x17, reg);
+ xgifb_reg_set(XGISR, 0x00, 0x01); /* Synchronous Reset */
+ xgifb_reg_set(XGISR, 0x00, 0x03); /* End Reset */
return 0;
}
/* xorg driver sets 32MB * 1 channel */
if (xgi_video_info.chip == XG27)
- outXGIIDXREG(XGISR, IND_XGI_DRAM_SIZE, 0x51);
+ xgifb_reg_set(XGISR, IND_XGI_DRAM_SIZE, 0x51);
reg = xgifb_reg_get(XGISR, IND_XGI_DRAM_SIZE);
switch ((reg & XGI_DRAM_SIZE_MASK) >> 4) {
{
int temp, i;
- outXGIIDXREG(XGIPART4, 0x11, tempbl);
+ xgifb_reg_set(XGIPART4, 0x11, tempbl);
temp = tempbh | tempcl;
setXGIIDXREG(XGIPART4, 0x10, 0xe0, temp);
for (i = 0; i < 10; i++)
int myflag, result;
backupP4_0d = xgifb_reg_get(XGIPART4, 0x0d);
- outXGIIDXREG(XGIPART4, 0x0d, (backupP4_0d | 0x04));
+ xgifb_reg_set(XGIPART4, 0x0d, (backupP4_0d | 0x04));
testvga2_tempbh = 0x00;
testvga2_tempbl = 0xd1;
}
XGIDoSense(0, 0, 0, 0);
- outXGIIDXREG(XGIPART4, 0x0d, backupP4_0d);
+ xgifb_reg_set(XGIPART4, 0x0d, backupP4_0d);
}
/* --------------------- SetMode routines ------------------------- */
cr31 |= (XGI_DRIVER_MODE | XGI_VB_OUTPUT_DISABLE);
}
- outXGIIDXREG(XGICR, IND_XGI_SCRATCH_REG_CR30, cr30);
- outXGIIDXREG(XGICR, IND_XGI_SCRATCH_REG_CR31, cr31);
- outXGIIDXREG(XGICR, IND_XGI_SCRATCH_REG_CR33, (XGIfb_rate_idx & 0x0F));
+ xgifb_reg_set(XGICR, IND_XGI_SCRATCH_REG_CR30, cr30);
+ xgifb_reg_set(XGICR, IND_XGI_SCRATCH_REG_CR31, cr31);
+ xgifb_reg_set(XGICR, IND_XGI_SCRATCH_REG_CR33, (XGIfb_rate_idx & 0x0F));
}
static void XGIfb_post_setmode(void)
u8 reg;
unsigned char doit = 1;
/*
- outXGIIDXREG(XGISR,IND_XGI_PASSWORD,XGI_PASSWORD);
- outXGIIDXREG(XGICR, 0x13, 0x00);
+ xgifb_reg_set(XGISR,IND_XGI_PASSWORD,XGI_PASSWORD);
+ xgifb_reg_set(XGICR, 0x13, 0x00);
setXGIIDXREG(XGISR,0x0E, 0xF0, 0x01);
*test*
*/
reg &= ~0x80;
else
reg |= 0x80;
- outXGIIDXREG(XGICR, 0x17, reg);
+ xgifb_reg_set(XGICR, 0x17, reg);
andXGIIDXREG(XGISR, IND_XGI_RAMDAC_CONTROL, ~0x04);
switch (xgi_video_info.video_width) {
case 640:
- outXGIIDXREG(XGIPART2, 0x35, 0xEB);
- outXGIIDXREG(XGIPART2, 0x36, 0x04);
- outXGIIDXREG(XGIPART2, 0x37, 0x25);
- outXGIIDXREG(XGIPART2, 0x38, 0x18);
+ xgifb_reg_set(XGIPART2, 0x35, 0xEB);
+ xgifb_reg_set(XGIPART2, 0x36, 0x04);
+ xgifb_reg_set(XGIPART2, 0x37, 0x25);
+ xgifb_reg_set(XGIPART2, 0x38, 0x18);
break;
case 720:
- outXGIIDXREG(XGIPART2, 0x35, 0xEE);
- outXGIIDXREG(XGIPART2, 0x36, 0x0C);
- outXGIIDXREG(XGIPART2, 0x37, 0x22);
- outXGIIDXREG(XGIPART2, 0x38, 0x08);
+ xgifb_reg_set(XGIPART2, 0x35, 0xEE);
+ xgifb_reg_set(XGIPART2, 0x36, 0x0C);
+ xgifb_reg_set(XGIPART2, 0x37, 0x22);
+ xgifb_reg_set(XGIPART2, 0x38, 0x08);
break;
case 800:
- outXGIIDXREG(XGIPART2, 0x35, 0xEB);
- outXGIIDXREG(XGIPART2, 0x36, 0x15);
- outXGIIDXREG(XGIPART2, 0x37, 0x25);
- outXGIIDXREG(XGIPART2, 0x38, 0xF6);
+ xgifb_reg_set(XGIPART2, 0x35, 0xEB);
+ xgifb_reg_set(XGIPART2, 0x36, 0x15);
+ xgifb_reg_set(XGIPART2, 0x37, 0x25);
+ xgifb_reg_set(XGIPART2, 0x38, 0xF6);
break;
}
}
switch (xgi_video_info.video_width) {
case 640:
- outXGIIDXREG(XGIPART2, 0x35, 0xF1);
- outXGIIDXREG(XGIPART2, 0x36, 0xF7);
- outXGIIDXREG(XGIPART2, 0x37, 0x1F);
- outXGIIDXREG(XGIPART2, 0x38, 0x32);
+ xgifb_reg_set(XGIPART2, 0x35, 0xF1);
+ xgifb_reg_set(XGIPART2, 0x36, 0xF7);
+ xgifb_reg_set(XGIPART2, 0x37, 0x1F);
+ xgifb_reg_set(XGIPART2, 0x38, 0x32);
break;
case 720:
- outXGIIDXREG(XGIPART2, 0x35, 0xF3);
- outXGIIDXREG(XGIPART2, 0x36, 0x00);
- outXGIIDXREG(XGIPART2, 0x37, 0x1D);
- outXGIIDXREG(XGIPART2, 0x38, 0x20);
+ xgifb_reg_set(XGIPART2, 0x35, 0xF3);
+ xgifb_reg_set(XGIPART2, 0x36, 0x00);
+ xgifb_reg_set(XGIPART2, 0x37, 0x1D);
+ xgifb_reg_set(XGIPART2, 0x38, 0x20);
break;
case 800:
- outXGIIDXREG(XGIPART2, 0x35, 0xFC);
- outXGIIDXREG(XGIPART2, 0x36, 0xFB);
- outXGIIDXREG(XGIPART2, 0x37, 0x14);
- outXGIIDXREG(XGIPART2, 0x38, 0x2A);
+ xgifb_reg_set(XGIPART2, 0x35, 0xFC);
+ xgifb_reg_set(XGIPART2, 0x36, 0xFB);
+ xgifb_reg_set(XGIPART2, 0x37, 0x14);
+ xgifb_reg_set(XGIPART2, 0x38, 0x2A);
break;
}
}
XGI_TV_filter[filter_tb].filter[filter][2],
XGI_TV_filter[filter_tb].filter[filter][3]
);
- outXGIIDXREG(
+ xgifb_reg_set(
XGIPART2,
0x35,
(XGI_TV_filter[filter_tb].filter[filter][0]));
- outXGIIDXREG(
+ xgifb_reg_set(
XGIPART2,
0x36,
(XGI_TV_filter[filter_tb].filter[filter][1]));
- outXGIIDXREG(
+ xgifb_reg_set(
XGIPART2,
0x37,
(XGI_TV_filter[filter_tb].filter[filter][2]));
- outXGIIDXREG(
+ xgifb_reg_set(
XGIPART2,
0x38,
(XGI_TV_filter[filter_tb].filter[filter][3]));
XGIRegInit(&XGI_Pr, (unsigned long)XGIhw_ext.pjIOAddress);
- outXGIIDXREG(XGISR, IND_XGI_PASSWORD, XGI_PASSWORD);
+ xgifb_reg_set(XGISR, IND_XGI_PASSWORD, XGI_PASSWORD);
reg1 = xgifb_reg_get(XGISR, IND_XGI_PASSWORD);
if (reg1 != 0xa1) { /*I/O error */