aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/bt8xx')
-rw-r--r--drivers/media/video/bt8xx/bttv-cards.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
index 3d00d50d9cb9..1ee0fe39237b 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -3638,7 +3638,7 @@ static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
3638 3638
3639 for (n = 0; n < microlen; n++) { 3639 for (n = 0; n < microlen; n++) {
3640 bits = micro[n]; 3640 bits = micro[n];
3641 for ( i = 0 ; i < 8 ; i++ ) { 3641 for (i = 0 ; i < 8 ; i++) {
3642 gpio_bits(BTTV_ALT_DCLK,0); 3642 gpio_bits(BTTV_ALT_DCLK,0);
3643 if (bits & 0x01) 3643 if (bits & 0x01)
3644 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA); 3644 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
@@ -3691,7 +3691,7 @@ static void __devinit osprey_eeprom(struct bttv *btv)
3691 /* this might be an antique... check for MMAC label in eeprom */ 3691 /* this might be an antique... check for MMAC label in eeprom */
3692 if ((ee[0]=='M') && (ee[1]=='M') && (ee[2]=='A') && (ee[3]=='C')) { 3692 if ((ee[0]=='M') && (ee[1]=='M') && (ee[2]=='A') && (ee[3]=='C')) {
3693 unsigned char checksum = 0; 3693 unsigned char checksum = 0;
3694 for (i =0; i<21; i++) 3694 for (i = 0; i < 21; i++)
3695 checksum += ee[i]; 3695 checksum += ee[i];
3696 if (checksum != ee[21]) 3696 if (checksum != ee[21])
3697 return; 3697 return;
@@ -3703,12 +3703,13 @@ static void __devinit osprey_eeprom(struct bttv *btv)
3703 unsigned short type; 3703 unsigned short type;
3704 int offset = 4*16; 3704 int offset = 4*16;
3705 3705
3706 for(; offset < 8*16; offset += 16) { 3706 for (; offset < 8*16; offset += 16) {
3707 unsigned short checksum = 0; 3707 unsigned short checksum = 0;
3708 /* verify the checksum */ 3708 /* verify the checksum */
3709 for(i = 0; i<14; i++) checksum += ee[i+offset]; 3709 for (i = 0; i < 14; i++)
3710 checksum = ~checksum; /* no idea why */ 3710 checksum += ee[i+offset];
3711 if ((((checksum>>8)&0x0FF) == ee[offset+14]) && 3711 checksum = ~checksum; /* no idea why */
3712 if ((((checksum>>8)&0x0FF) == ee[offset+14]) &&
3712 ((checksum & 0x0FF) == ee[offset+15])) { 3713 ((checksum & 0x0FF) == ee[offset+15])) {
3713 break; 3714 break;
3714 } 3715 }
@@ -3721,7 +3722,6 @@ static void __devinit osprey_eeprom(struct bttv *btv)
3721 type = (ee[offset+4]<<8) | (ee[offset+5]); 3722 type = (ee[offset+4]<<8) | (ee[offset+5]);
3722 3723
3723 switch(type) { 3724 switch(type) {
3724
3725 /* 848 based */ 3725 /* 848 based */
3726 case 0x0004: 3726 case 0x0004:
3727 btv->c.type = BTTV_BOARD_OSPREY1x0_848; 3727 btv->c.type = BTTV_BOARD_OSPREY1x0_848;
@@ -4149,8 +4149,7 @@ static int tea5757_read(struct bttv *btv)
4149 } 4149 }
4150 4150
4151 dprintk("bttv%d: tea5757:",btv->c.nr); 4151 dprintk("bttv%d: tea5757:",btv->c.nr);
4152 for(i = 0; i < 24; i++) 4152 for (i = 0; i < 24; i++) {
4153 {
4154 udelay(5); 4153 udelay(5);
4155 bus_high(btv,btv->mbox_clk); 4154 bus_high(btv,btv->mbox_clk);
4156 udelay(5); 4155 udelay(5);
@@ -4182,8 +4181,7 @@ static int tea5757_write(struct bttv *btv, int value)
4182 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value); 4181 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4183 bus_low(btv,btv->mbox_clk); 4182 bus_low(btv,btv->mbox_clk);
4184 bus_high(btv,btv->mbox_we); 4183 bus_high(btv,btv->mbox_we);
4185 for(i = 0; i < 25; i++) 4184 for (i = 0; i < 25; i++) {
4186 {
4187 if (reg & 0x1000000) 4185 if (reg & 0x1000000)
4188 bus_high(btv,btv->mbox_data); 4186 bus_high(btv,btv->mbox_data);
4189 else 4187 else
@@ -4755,7 +4753,7 @@ static void kodicom4400r_init(struct bttv *btv)
4755 gpio_write(1 << 9); /* reset MUX */ 4753 gpio_write(1 << 9); /* reset MUX */
4756 gpio_write(0); 4754 gpio_write(0);
4757 /* Preset camera 0 to the 4 controllers */ 4755 /* Preset camera 0 to the 4 controllers */
4758 for (ix=0; ix<4; ix++) { 4756 for (ix = 0; ix < 4; ix++) {
4759 sw_status[ix] = ix; 4757 sw_status[ix] = ix;
4760 kodicom4400r_write(btv, ix, ix, 1); 4758 kodicom4400r_write(btv, ix, ix, 1);
4761 } 4759 }