diff options
author | George Sapountzis <gsap7@yahoo.gr> | 2008-02-15 18:32:56 +0200 |
---|---|---|
committer | George Sapountzis <gsap7@yahoo.gr> | 2008-02-15 18:32:56 +0200 |
commit | f47d461331a032f9bdcf6f63336e848778cec6cc (patch) | |
tree | 3db02966686a41b189df1b90e7712937bd21051e | |
parent | 2c66f2e812195167df9ca113044d46deece776ac (diff) |
mach64: minor cosmetic, I2C type
-rw-r--r-- | src/atipreinit.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/atipreinit.c b/src/atipreinit.c index 86ef80d..f89f5b7 100644 --- a/src/atipreinit.c +++ b/src/atipreinit.c @@ -326,7 +326,8 @@ ati_bios_mmedia ScrnInfoPtr pScreenInfo, ATIPtr pATI, CARD8 *BIOS, - unsigned int VideoTable + unsigned int VideoTable, + unsigned int HardwareTable ) { pATI->Audio = ATI_AUDIO_NONE; @@ -368,6 +369,11 @@ ati_bios_mmedia break; } } + + if (HardwareTable > 0) + { + pATI->I2CType = BIOSByte(HardwareTable + 0x06U) & 0x0FU; + } } /* @@ -968,17 +974,15 @@ ATIPreInit if (BIOSWord(ROMTable - 0x02U) >= 0x004AU) { HardwareTable = BIOSWord(ROMTable + 0x48U); - if (((HardwareTable + 0x08U) <= BIOSSize) && - !memcmp(BIOS + HardwareTable, "$ATI", 4)) - pATI->I2CType = BIOSByte(HardwareTable + 0x06U) & 0x0FU; - else + if (((HardwareTable + 0x08U) > BIOSSize) || + (memcmp(BIOS + HardwareTable, "$ATI", 4) != 0)) HardwareTable = 0; } } ati_bios_clock(pScreenInfo, pATI, BIOS, ClockTable, pGDev); - ati_bios_mmedia(pScreenInfo, pATI, BIOS, VideoTable); + ati_bios_mmedia(pScreenInfo, pATI, BIOS, VideoTable, HardwareTable); if (pATI->LCDPanelID >= 0) { |