The attached diffs will add a new patch file that fixes a build failure when cross building the current 3.9.9 kernel for Mips64


Jan
Index: package/base/linux/oss-max-dma-channels.patch.mips64
===================================================================
--- package/base/linux/oss-max-dma-channels.patch.mips64        (revision 0)
+++ package/base/linux/oss-max-dma-channels.patch.mips64        (revision 0)
@@ -0,0 +1,105 @@
+MAX_DMA_CHANNELS is left undefined so kernel/dma.c builds only the dummy
+versions but sound/oss/soundcard.c doesn't support the same thing except
+with a rather crude patch following what kernel/dma.c already does such
+as below.  It gets everything to build for the affected systems but I
+doubt much (if anything) will be working.
+
+At this stage I just wanna get rid of OSS for MIPS entirely; it has very
+little life if any left.
+
+  Ralf
+
+Signed-off-by: Ralf Baechle <[email protected]>
+
+ sound/oss/soundcard.c |   14 ++++++++++++++
+ 1 files changed, 14 insertions(+), 0 deletions(-)
+
+Adapted for T2 Kernel 3.9.9 by JLR
+
+--- linux-3.9/sound/oss/soundcard.c.vanilla    2013-07-17 15:59:36.202001324 
-0400
++++ linux-3.9/sound/oss/soundcard.c    2013-07-17 16:26:29.991025152 -0400
+@@ -66,7 +66,10 @@
+ int             sound_dmap_flag = 0;
+ #endif
+
++#ifdef MAX_DMA_CHANNELS
+ static char     dma_alloc_map[MAX_DMA_CHANNELS];
++#endif
++
+
+ #define DMA_MAP_UNAVAIL               0
+ #define DMA_MAP_FREE          1
+@@ -594,11 +597,13 @@
+
+       sequencer_unload();
+
++#ifdef MAX_DMA_CHANNELS
+       for (i = 0; i < MAX_DMA_CHANNELS; i++)
+               if (dma_alloc_map[i] != DMA_MAP_UNAVAIL) {
+                       printk(KERN_ERR "Sound: Hmm, DMA%d was left allocated - 
fixed\n", i);
+                       sound_free_dma(i);
+               }
++#endif
+
+       for (i = 0; i < sound_nblocks; i++)
+               vfree(sound_mem_blocks[i]);
+@@ -614,6 +619,7 @@
+
+ int sound_alloc_dma(int chn, char *deviceID)
+ {
++#ifdef MAX_DMA_CHANNELS
+       int err;
+
+       if ((err = request_dma(chn, deviceID)) != 0)
+@@ -622,11 +628,16 @@
+       dma_alloc_map[chn] = DMA_MAP_FREE;
+
+       return 0;
++#else
++       return 1;       /* No ISA DMA supported  */
++#endif
++
+ }
+ EXPORT_SYMBOL(sound_alloc_dma);
+
+ int sound_open_dma(int chn, char *deviceID)
+ {
++#ifdef MAX_DMA_CHANNELS
+       if (!valid_dma(chn)) {
+               printk(KERN_ERR "sound_open_dma: Invalid DMA channel %d\n", 
chn);
+               return 1;
+@@ -638,27 +649,34 @@
+       }
+       dma_alloc_map[chn] = DMA_MAP_BUSY;
+       return 0;
++#else
++       return 1;       /* No ISA DMA supported  */
++#endif
+ }
+ EXPORT_SYMBOL(sound_open_dma);
+
+ void sound_free_dma(int chn)
+ {
++#ifdef MAX_DMA_CHANNELS
+       if (dma_alloc_map[chn] == DMA_MAP_UNAVAIL) {
+               /* printk( "sound_free_dma: Bad access to DMA channel %d\n",  
chn); */
+               return;
+       }
+       free_dma(chn);
+       dma_alloc_map[chn] = DMA_MAP_UNAVAIL;
++#endif
+ }
+ EXPORT_SYMBOL(sound_free_dma);
+
+ void sound_close_dma(int chn)
+ {
++#ifdef MAX_DMA_CHANNELS
+       if (dma_alloc_map[chn] != DMA_MAP_BUSY) {
+               printk(KERN_ERR "sound_close_dma: Bad access to DMA channel 
%d\n", chn);
+               return;
+       }
+       dma_alloc_map[chn] = DMA_MAP_FREE;
++#endif
+ }
+ EXPORT_SYMBOL(sound_close_dma);
+

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2

Reply via email to