|
From: <dav...@us...> - 2004-08-01 19:59:25
|
Update of /cvsroot/xbox-linux/kernel/drivers/video/xbox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19456/drivers/video/xbox Modified Files: Makefile encoder-i2c.c encoder-i2c.h encoder.c fbdev.c xcalibur-regs.h Log Message: Rename XLB to XCALIBUR Index: Makefile =================================================================== RCS file: /cvsroot/xbox-linux/kernel/drivers/video/xbox/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 7 May 2004 12:42:31 -0000 1.4 +++ Makefile 1 Aug 2004 19:59:13 -0000 1.5 @@ -9,7 +9,7 @@ O_TARGET := xboxfb.o -obj-y := fbdev.o riva_hw.o accel.o encoder-i2c.o encoder.o conexant.o focus.o xlb.o +obj-y := fbdev.o riva_hw.o accel.o encoder-i2c.o encoder.o conexant.o focus.o xcalibur.o obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make Index: encoder-i2c.c =================================================================== RCS file: /cvsroot/xbox-linux/kernel/drivers/video/xbox/encoder-i2c.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- encoder-i2c.c 1 Jun 2004 06:35:28 -0000 1.6 +++ encoder-i2c.c 1 Aug 2004 19:59:13 -0000 1.7 @@ -24,7 +24,7 @@ #define CONEXANT_ADDRESS 0x45 #define FOCUS_ADDRESS 0x6a -#define XLB_ADDRESS 0x70 +#define XCALIBUR_ADDRESS 0x70 #define EEPROM_ADDRESS 0x54 #define PIC_ADDRESS 0x10 @@ -68,11 +68,11 @@ .driver = &tv_driver, }; -static struct i2c_client xlb_client = { - .name = "I2C xbox XLB client", +static struct i2c_client xcalibur_client = { + .name = "I2C xbox Xcalibur client", .id = 1, .flags = 0, - .addr = XLB_ADDRESS, + .addr = XCALIBUR_ADDRESS, .adapter = NULL, .driver = &tv_driver, }; @@ -98,12 +98,12 @@ printk(KERN_INFO DRIVER_NAME ": Using '%s'!\n",adap->name); conexant_client.adapter = adap; focus_client.adapter = adap; - xlb_client.adapter = adap; + xcalibur_client.adapter = adap; pic_client.adapter = adap; eeprom_client.adapter = adap; i2c_attach_client(&conexant_client); i2c_attach_client(&focus_client); - i2c_attach_client(&xlb_client); + i2c_attach_client(&xcalibur_client); i2c_attach_client(&pic_client); i2c_attach_client(&eeprom_client); @@ -156,31 +156,31 @@ return i2c_smbus_write_byte_data(&focus_client, adr, value); } -int xlb_i2c_read_reg(unsigned char adr) { - if (!xlb_client.adapter) { - printk(KERN_ERR DRIVER_NAME " : No XLB client attached.\n"); +int xcalibur_i2c_read_reg(unsigned char adr) { + if (!xcalibur_client.adapter) { + printk(KERN_ERR DRIVER_NAME " : No Xcalibur client attached.\n"); return -1; } udelay(500); - return i2c_smbus_read_byte_data(&xlb_client, adr); + return i2c_smbus_read_byte_data(&xcalibur_client, adr); } -int xlb_i2c_read_block(unsigned char adr, unsigned char *data) { - if (!xlb_client.adapter) { - printk(KERN_ERR DRIVER_NAME " : No XLB client attached.\n"); +int xcalibur_i2c_read_block(unsigned char adr, unsigned char *data) { + if (!xcalibur_client.adapter) { + printk(KERN_ERR DRIVER_NAME " : No Xcalibur client attached.\n"); return -1; } udelay(500); - return i2c_smbus_read_block_data(&xlb_client, adr, data); + return i2c_smbus_read_block_data(&xcalibur_client, adr, data); } -int xlb_i2c_write_block(unsigned char adr, unsigned char *data, int len) { - if (!xlb_client.adapter) { - printk(KERN_ERR DRIVER_NAME " : No XLB client attached.\n"); +int xcalibur_i2c_write_block(unsigned char adr, unsigned char *data, int len) { + if (!xcalibur_client.adapter) { + printk(KERN_ERR DRIVER_NAME " : No Xcalibur client attached.\n"); return -1; } udelay(500); - return i2c_smbus_write_block_data(&xlb_client, adr, len, data); + return i2c_smbus_write_block_data(&xcalibur_client, adr, len, data); } Index: encoder-i2c.h =================================================================== RCS file: /cvsroot/xbox-linux/kernel/drivers/video/xbox/encoder-i2c.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- encoder-i2c.h 1 Jun 2004 06:35:28 -0000 1.3 +++ encoder-i2c.h 1 Aug 2004 19:59:13 -0000 1.4 @@ -23,9 +23,9 @@ int conexant_i2c_write_reg(unsigned char adr, unsigned char value); int focus_i2c_read_reg(unsigned char adr); int focus_i2c_write_reg(unsigned char adr, unsigned char value); -int xlb_i2c_read_reg(unsigned char adr); -int xlb_i2c_read_block(unsigned char adr, unsigned char *data); -int xlb_i2c_write_block(unsigned char adr, unsigned char *data, int len); +int xcalibur_i2c_read_reg(unsigned char adr); +int xcalibur_i2c_read_block(unsigned char adr, unsigned char *data); +int xcalibur_i2c_write_block(unsigned char adr, unsigned char *data, int len); unsigned char pic_i2c_read_reg(unsigned char adr); unsigned char set_led(unsigned char mode, unsigned char color); unsigned char eeprom_i2c_read(unsigned char adr); Index: encoder.c =================================================================== RCS file: /cvsroot/xbox-linux/kernel/drivers/video/xbox/encoder.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- encoder.c 1 Jun 2004 06:35:28 -0000 1.9 +++ encoder.c 1 Aug 2004 19:59:13 -0000 1.10 @@ -46,9 +46,9 @@ if(b != 255) { return ENCODER_FOCUS; } - b = xlb_i2c_read_reg(0x01); + b = xcalibur_i2c_read_reg(0x01); if(b != 255) { - return ENCODER_XLB; + return ENCODER_XCALIBUR; } return 0; } @@ -121,21 +121,21 @@ focus_i2c_write_reg(0x0d,b); break; - case ENCODER_XLB: + case ENCODER_XCALIBUR: switch(get_tv_encoding()) { case TV_ENC_PALBDGHI: - for(n = 0; n < sizeof(xlb_regs); n++) { + for(n = 0; n < sizeof(xcalibur_regs); n++) { memset(data, 0x00, 0x04); memcpy(data, &XCal_Vals_PAL[n], 0x04); - xlb_i2c_write_block(xlb_regs[n], data, 0x04); + xcalibur_i2c_write_block(xcalibur_regs[n], data, 0x04); } break; case TV_ENC_NTSC: default: // Default to NTSC - for(n = 0; n < sizeof(xlb_regs); n++) { + for(n = 0; n < sizeof(xcalibur_regs); n++) { memset(data, 0x00, 0x04); memcpy(data, &XCal_Vals_NTSC[n], 0x04); - xlb_i2c_write_block(xlb_regs[n], data, 0x04); + xcalibur_i2c_write_block(xcalibur_regs[n], data, 0x04); } break; } @@ -160,7 +160,7 @@ mode[n] = focus_i2c_read_reg(n); } break; - case ENCODER_XLB: + case ENCODER_XCALIBUR: break; } } Index: fbdev.c =================================================================== RCS file: /cvsroot/xbox-linux/kernel/drivers/video/xbox/fbdev.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- fbdev.c 16 Jun 2004 23:33:23 -0000 1.43 +++ fbdev.c 1 Aug 2004 19:59:13 -0000 1.44 @@ -370,7 +370,7 @@ 0xEB /* MISC */ }; -static const struct riva_regs xlbRegs[] = { +static const struct riva_regs xcaliburRegs[] = { { {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* ATTR */ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, @@ -907,7 +907,7 @@ rinfo->riva.PGRAPH[0x0000068c/4] = rinfo->riva.RamAmountKBytes * 1024 - 1; rinfo->riva.PGRAPH[0x00000690/4] = rinfo->riva.RamAmountKBytes * 1024 - 1; rinfo->riva.PRAMDAC[0x00000848/4] = 0x10100111; - if(rinfo->video_encoder == ENCODER_XLB) { + if(rinfo->video_encoder == ENCODER_XCALIBUR) { rinfo->riva.PRAMDAC[0x00000880/4] = 0x21101100; } else { rinfo->riva.PRAMDAC[0x00000880/4] = 0; @@ -918,7 +918,7 @@ /* It has been decided to leave the GPU in RGB mode always, and handle * the scaling in the encoder, if necessary. This sidesteps the 2.6 * kernel cursor issue seen with YUV output */ - if(rinfo->video_encoder == ENCODER_XLB) { + if(rinfo->video_encoder == ENCODER_XCALIBUR) { rinfo->riva.PRAMDAC[0x00000630/4] = 2; // switch GPU to YCrCb /* YUV values: */ rinfo->riva.PRAMDAC[0x0000084c/4] = 0x00801080; @@ -1052,8 +1052,8 @@ case ENCODER_FOCUS: encoder_ok = focus_calc_hdtv_mode(hdtv_mode, dotClock, newmode.encoder_mode); break; - case ENCODER_XLB: - encoder_ok = xlb_calc_hdtv_mode(hdtv_mode, dotClock, newmode.encoder_mode); + case ENCODER_XCALIBUR: + encoder_ok = xcalibur_calc_hdtv_mode(hdtv_mode, dotClock, newmode.encoder_mode); break; default: printk("Error - unknown encoder type detected\n"); @@ -1068,8 +1068,8 @@ //No vga functions as yet - so set up for 480p otherwise we dont boot at all. encoder_ok = focus_calc_hdtv_mode(HDTV_480p, dotClock, newmode.encoder_mode); break; - case ENCODER_XLB: - encoder_ok = xlb_calc_hdtv_mode(HDTV_480p, dotClock, newmode.encoder_mode); + case ENCODER_XCALIBUR: + encoder_ok = xcalibur_calc_hdtv_mode(HDTV_480p, dotClock, newmode.encoder_mode); break; default: printk("Error - unknown encoder type detected\n"); @@ -1110,19 +1110,19 @@ case ENCODER_FOCUS: encoder_ok = focus_calc_mode(&encoder_mode, &newmode); break; - case ENCODER_XLB: + case ENCODER_XCALIBUR: switch(rinfo->tv_encoding) { case TV_ENC_PALBDGHI: - rinfo->current_state = xlbRegs[1]; - memcpy(&newmode, &xlbRegs[1], sizeof(struct riva_regs)); + rinfo->current_state = xcaliburRegs[1]; + memcpy(&newmode, &xcaliburRegs[1], sizeof(struct riva_regs)); break; case TV_ENC_NTSC: default: // Default to NTSC - rinfo->current_state = xlbRegs[0]; - memcpy(&newmode, &xlbRegs[0], sizeof(struct riva_regs)); + rinfo->current_state = xcaliburRegs[0]; + memcpy(&newmode, &xcaliburRegs[0], sizeof(struct riva_regs)); break; } - encoder_ok = xlb_calc_mode(&encoder_mode, &newmode, rinfo->tv_encoding); + encoder_ok = xcalibur_calc_mode(&encoder_mode, &newmode, rinfo->tv_encoding); break; default: printk("Error - unknown encoder type detected\n"); @@ -1142,7 +1142,7 @@ crtc_vBlankStart = crtc_vDisplay; crtc_vBlankEnd = crtc_vTotal + 1; } - if(rinfo->video_encoder == ENCODER_XLB) { + if(rinfo->video_encoder == ENCODER_XCALIBUR) { crtc_hTotal = Set8Bits(newmode.crtc[0x00]) | SetBitField(newmode.crtc[0x2d],0:0,8:8); crtc_hDisplay = Set8Bits(newmode.crtc[0x01]) @@ -2280,8 +2280,8 @@ case ENCODER_FOCUS: printk(KERN_INFO PFX "detected focus encoder\n"); break; - case ENCODER_XLB: - printk(KERN_INFO PFX "detected XLB encoder\n"); + case ENCODER_XCALIBUR: + printk(KERN_INFO PFX "detected xcalibur encoder\n"); break; } Index: xcalibur-regs.h =================================================================== RCS file: /cvsroot/xbox-linux/kernel/drivers/video/xbox/xcalibur-regs.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- xcalibur-regs.h 1 Aug 2004 19:42:50 -0000 1.1 +++ xcalibur-regs.h 1 Aug 2004 19:59:13 -0000 1.2 @@ -1,7 +1,7 @@ -#ifndef _XCALIBUR_H_ -#define _XCALIBUR_H_ +#ifndef _XCALIBUR_REGS_H_ +#define _XCALIBUR_REGS_H_ -unsigned char xlb_regs[] = { +unsigned char xcalibur_regs[] = { 0x00,0x01,0x0F,0x1B,0x50,0x51,0x52,0x54,0x55,0x56, 0x58,0x59,0x5A,0x5B,0x60,0x61,0x62,0x63,0x64,0x65, 0x66,0x80,0x81,0x45,0x46,0x47,0x48,0x42,0x43,0x44, |