Advertisement
uaa

OpenBSD-5.4 azalia.c workaround for Vortex86EX

uaa
Feb 21st, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. $ diff -uNp azalia.c.orig azalia.c
  2. --- azalia.c.orig Fri Feb 21 21:30:22 2014
  3. +++ azalia.c Fri Feb 21 21:59:10 2014
  4. @@ -1108,7 +1108,7 @@ azalia_halt_rirb(azalia_t *az)
  5. int
  6. azalia_init_rirb(azalia_t *az, int resuming)
  7. {
  8. - int err;
  9. + int err, i;
  10. uint16_t rirbwp;
  11. uint8_t rirbctl;
  12.  
  13. @@ -1159,6 +1159,14 @@ azalia_init_rirb(azalia_t *az, int resuming)
  14. rirbctl = AZ_READ_1(az, RIRBCTL);
  15. AZ_WRITE_1(az, RIRBCTL, rirbctl |
  16. HDA_RIRBCTL_RIRBDMAEN | HDA_RIRBCTL_RINTCTL);
  17. +
  18. + /* wait for RIRB DMA engine is running */
  19. + for (i = 1000; i >= 0; i--) {
  20. + if (AZ_READ_1(az, RIRBCTL) & HDA_RIRBCTL_RIRBDMAEN)
  21. + break;
  22. + DELAY(1);
  23. + }
  24. + DPRINTF(("%s: wait counter = %d\n", __func__, i));
  25.  
  26. return (0);
  27. }
  28. $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement