[openfirmware] [commit] r3645 - in cpu/arm: mmp3 olpc

repository service svn at openfirmware.info
Thu Apr 18 05:45:00 CEST 2013


Author: quozl
Date: Thu Apr 18 05:44:59 2013
New Revision: 3645
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3645

Log:
OLPC XO-4 - add device-tree entries in /pcm to describe allocation of audio SRAM, used by kernel only.  Open Firmware uses other allocations.  #12400

Modified:
   cpu/arm/mmp3/soc-config.fth
   cpu/arm/olpc/sound.fth

Modified: cpu/arm/mmp3/soc-config.fth
==============================================================================
--- cpu/arm/mmp3/soc-config.fth	Tue Apr 16 04:16:23 2013	(r3644)
+++ cpu/arm/mmp3/soc-config.fth	Thu Apr 18 05:44:59 2013	(r3645)
@@ -8,4 +8,8 @@
 h#    2.0000 constant /audio-sram
 \ No need to map audio-sram separately; it fits in the SRAM area
 
+d# 4096  constant /audio-sram-dma  \ space for DMA descriptors
+d# 2048  constant /audio-sram-mps  \ maximum period size
+/audio-sram /audio-sram-dma -  2 /  constant /audio-sram-pcm  \ buffers
+
 h# 0005.0000 constant /sram          \ Size of SRAM

Modified: cpu/arm/olpc/sound.fth
==============================================================================
--- cpu/arm/olpc/sound.fth	Tue Apr 16 04:16:23 2013	(r3644)
+++ cpu/arm/olpc/sound.fth	Thu Apr 18 05:44:59 2013	(r3645)
@@ -81,6 +81,25 @@
    \ the Audio DMA resources
    " marvell,mmp-pcm-audio" +compatible   \ snd_soc_dai_link.cpu_dai_of_node
 
+[ifdef] mmp3
+   \ Our asram node (below) declares that /audio-sram bytes of SRAM
+   \ are assigned to the audio function.  We divide that here, roughly
+   \ half to playback and half to recording.
+
+   \ Even though we choose big buffers, we do leave a little bit of
+   \ free space for the DMA engine which also needs to use a bit of
+   \ the SRAM area for DMA descriptors. Therefore we choose 62kb for
+   \ each buffer, leaving 4kb available for DMA descriptors.
+
+   \ For the max period size, we don't have any justification other
+   \ than 2048 is the value we've been using all along.
+
+   /audio-sram-pcm encode-int
+   /audio-sram-mps encode-int encode+
+   /audio-sram-pcm encode-int encode+
+   /audio-sram-mps encode-int encode+
+   " marvell,buffer-sizes" property
+[then]
 finish-device
 
 new-device



More information about the openfirmware mailing list