Skip to content

Commit

Permalink
viafb: remove dead code due to IGA1_IGA2
Browse files Browse the repository at this point in the history
Some code depended on IGA1_IGA2 which was never set (at least with the
symbolic name).  Remove this dead code although it might one day be useful
to get a hint on how some things might work.  However as this is dead it
is likely full of bugs and would prevent a clean structure (as it has some
very strange things).

Dead code -> no regressions, at least if VIA doesn't do anything very ugly.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Florian Tobias Schandinat authored and Linus Torvalds committed Mar 12, 2010
1 parent daacccd commit 4bbac05
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 574 deletions.
22 changes: 5 additions & 17 deletions drivers/video/via/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,11 +757,8 @@ static void set_crt_output_path(int set_iga)
viafb_write_reg_mask(SR16, VIASR, 0x00, BIT6);
break;
case IGA2:
case IGA1_IGA2:
viafb_write_reg_mask(CR6A, VIACR, 0xC0, BIT6 + BIT7);
viafb_write_reg_mask(SR16, VIASR, 0x40, BIT6);
if (set_iga == IGA1_IGA2)
viafb_write_reg_mask(CR6B, VIACR, 0x08, BIT3);
break;
}
}
Expand Down Expand Up @@ -951,13 +948,6 @@ static void set_lcd_output_path(int set_iga, int output_interface)

enable_second_display_channel();
break;

case IGA1_IGA2:
viafb_write_reg_mask(CR6B, VIACR, 0x08, BIT3);
viafb_write_reg_mask(CR6A, VIACR, 0x08, BIT3);

disable_second_display_channel();
break;
}

switch (output_interface) {
Expand Down Expand Up @@ -1125,15 +1115,13 @@ void viafb_load_fetch_count_reg(int h_addr, int bpp_byte, int set_iga)
struct io_register *reg = NULL;

switch (set_iga) {
case IGA1_IGA2:
case IGA1:
reg_value = IGA1_FETCH_COUNT_FORMULA(h_addr, bpp_byte);
viafb_load_reg_num = fetch_count_reg.
iga1_fetch_count_reg.reg_num;
reg = fetch_count_reg.iga1_fetch_count_reg.reg;
viafb_load_reg(reg_value, viafb_load_reg_num, reg, VIASR);
if (set_iga == IGA1)
break;
break;
case IGA2:
reg_value = IGA2_FETCH_COUNT_FORMULA(h_addr, bpp_byte);
viafb_load_reg_num = fetch_count_reg.
Expand Down Expand Up @@ -1503,7 +1491,7 @@ void viafb_set_vclock(u32 CLK, int set_iga)
/* H.W. Reset : ON */
viafb_write_reg_mask(CR17, VIACR, 0x00, BIT7);

if ((set_iga == IGA1) || (set_iga == IGA1_IGA2)) {
if (set_iga == IGA1) {
/* Change D,N FOR VCLK */
switch (viaparinfo->chip_info->gfx_chip_name) {
case UNICHROME_CLE266:
Expand Down Expand Up @@ -1532,7 +1520,7 @@ void viafb_set_vclock(u32 CLK, int set_iga)
}
}

if ((set_iga == IGA2) || (set_iga == IGA1_IGA2)) {
if (set_iga == IGA2) {
/* Change D,N FOR LCK */
switch (viaparinfo->chip_info->gfx_chip_name) {
case UNICHROME_CLE266:
Expand Down Expand Up @@ -1561,12 +1549,12 @@ void viafb_set_vclock(u32 CLK, int set_iga)
viafb_write_reg_mask(CR17, VIACR, 0x80, BIT7);

/* Reset PLL */
if ((set_iga == IGA1) || (set_iga == IGA1_IGA2)) {
if (set_iga == IGA1) {
viafb_write_reg_mask(SR40, VIASR, 0x02, BIT1);
viafb_write_reg_mask(SR40, VIASR, 0x00, BIT1);
}

if ((set_iga == IGA2) || (set_iga == IGA1_IGA2)) {
if (set_iga == IGA2) {
viafb_write_reg_mask(SR40, VIASR, 0x01, BIT0);
viafb_write_reg_mask(SR40, VIASR, 0x00, BIT0);
}
Expand Down
Loading

0 comments on commit 4bbac05

Please sign in to comment.