GP_IO
aty_st_le32(GP_IO, 0x31003100, par); /* drive outputs high */
aty_st_le32(GP_IO, 0, par); /* turn off outputs */
i = aty_ld_le32(GP_IO, par); /* get primary sense value */
aty_st_le32(GP_IO, 0x20000000, par); /* drive A low */
i = aty_ld_le32(GP_IO, par);
aty_st_le32(GP_IO, 0x20002000, par); /* drive A high again */
aty_st_le32(GP_IO, 0x10000000, par); /* drive B low */
i = aty_ld_le32(GP_IO, par);
aty_st_le32(GP_IO, 0x10001000, par); /* drive B high again */
aty_st_le32(GP_IO, 0x01000000, par); /* drive C low */
sense |= (aty_ld_le32(GP_IO, par) & 0x3000) >> 12;
aty_st_le32(GP_IO, 0, par); /* turn off outputs */