/[openvortex]/alsa/alsa-kernel/ppc/burgundy.c
ViewVC logotype

Diff of /alsa/alsa-kernel/ppc/burgundy.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by vizard, Tue Apr 15 21:35:45 2003 UTC revision 1.2 by vizard, Mon Aug 11 00:06:40 2003 UTC
# Line 23  Line 23 
23  #include <asm/io.h>  #include <asm/io.h>
24  #include <linux/init.h>  #include <linux/init.h>
25  #include <linux/slab.h>  #include <linux/slab.h>
26    #include <linux/delay.h>
27  #include <sound/core.h>  #include <sound/core.h>
28  #include "pmac.h"  #include "pmac.h"
29  #include "burgundy.h"  #include "burgundy.h"
# Line 34  Line 35 
35  inline static void  inline static void
36  snd_pmac_burgundy_busy_wait(pmac_t *chip)  snd_pmac_burgundy_busy_wait(pmac_t *chip)
37  {  {
38          while (in_le32(&chip->awacs->codec_ctrl) & MASK_NEWECMD)          int timeout = 50;
39                  ;          while ((in_le32(&chip->awacs->codec_ctrl) & MASK_NEWECMD) && timeout--)
40                    udelay(1);
41            if (! timeout)
42                    printk(KERN_DEBUG "burgundy_busy_wait: timeout\n");
43  }  }
44    
45  inline static void  inline static void
46  snd_pmac_burgundy_extend_wait(pmac_t *chip)  snd_pmac_burgundy_extend_wait(pmac_t *chip)
47  {  {
48          while (!(in_le32(&chip->awacs->codec_stat) & MASK_EXTEND))          int timeout;
49                  ;          timeout = 50;
50          while (in_le32(&chip->awacs->codec_stat) & MASK_EXTEND)          while (!(in_le32(&chip->awacs->codec_stat) & MASK_EXTEND) && timeout--)
51                  ;                  udelay(1);
52            if (! timeout)
53                    printk(KERN_DEBUG "burgundy_extend_wait: timeout #1\n");
54            timeout = 50;
55            while ((in_le32(&chip->awacs->codec_stat) & MASK_EXTEND) && timeout--)
56                    udelay(1);
57            if (! timeout)
58                    printk(KERN_DEBUG "burgundy_extend_wait: timeout #2\n");
59  }  }
60    
61  static void  static void
# Line 66  snd_pmac_burgundy_rcw(pmac_t *chip, unsi Line 77  snd_pmac_burgundy_rcw(pmac_t *chip, unsi
77          unsigned val = 0;          unsigned val = 0;
78          unsigned long flags;          unsigned long flags;
79    
         /* should have timeouts here */  
80          spin_lock_irqsave(&chip->reg_lock, flags);          spin_lock_irqsave(&chip->reg_lock, flags);
81    
82          out_le32(&chip->awacs->codec_ctrl, addr + 0x100000);          out_le32(&chip->awacs->codec_ctrl, addr + 0x100000);
# Line 107  snd_pmac_burgundy_rcb(pmac_t *chip, unsi Line 117  snd_pmac_burgundy_rcb(pmac_t *chip, unsi
117          unsigned val = 0;          unsigned val = 0;
118          unsigned long flags;          unsigned long flags;
119    
         /* should have timeouts here */  
120          spin_lock_irqsave(&chip->reg_lock, flags);          spin_lock_irqsave(&chip->reg_lock, flags);
121    
122          out_le32(&chip->awacs->codec_ctrl, addr + 0x100000);          out_le32(&chip->awacs->codec_ctrl, addr + 0x100000);

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26