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
Author: quozl
Date: Fri Apr 12 05:43:39 2013
New Revision: 3641
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3641
Log:
disklabel - fix no access to primary partition if extended partition is empty, workaround is to set the primary partition bootable, cause in the partition finder which when recursing reused the same buffer for the extended partition, destroying the in-memory copy of the primary parition; fix is to use a separate buffer in the recursion. Reported by Vladimir Serbinenko.
Modified:
ofw/disklabel/common.fth
ofw/disklabel/methods.fth
ofw/fs/fatfs/partition.fth
Modified: ofw/disklabel/common.fth
==============================================================================
--- ofw/disklabel/common.fth Fri Apr 12 04:38:21 2013 (r3640)
+++ ofw/disklabel/common.fth Fri Apr 12 05:43:39 2013 (r3641)
@@ -19,6 +19,9 @@
0 instance value sector-offset
+: sector-alloc ( -- ) /sector alloc-mem to sector-buf ;
+: sector-free ( -- ) sector-buf /sector free-mem ;
+
\ For ISO-9660 CD-ROMs, ISO-9660 flash or hard drives, and GPT
: read-hw-sector ( sector# -- )
sector-offset + /sector um* " seek" $call-parent abort" Seek failed"
Modified: ofw/disklabel/methods.fth
==============================================================================
--- ofw/disklabel/methods.fth Fri Apr 12 04:38:21 2013 (r3640)
+++ ofw/disklabel/methods.fth Fri Apr 12 05:43:39 2013 (r3641)
@@ -233,7 +233,7 @@
: try-open ( -- )
" block-size" $call-parent to /sector
- /sector alloc-mem to sector-buf
+ sector-alloc
parse-partition ( )
select-partition ( )
@@ -248,7 +248,7 @@
\ flags around, we just abort when a fatal error occurs. The "catch"
\ intercepts the abort and returns the appropriate flag value.
: open ( -- okay? ) ['] try-open catch 0= ;
-: close ( -- ) sector-buf if sector-buf /sector free-mem then ;
+: close ( -- ) sector-buf if sector-free then ;
: size ( -- d ) size-low size-high ;
: load ( adr -- len )
\ This load method is used only for type 41 (IBM "PREP") partitions
Modified: ofw/fs/fatfs/partition.fth
==============================================================================
--- ofw/fs/fatfs/partition.fth Fri Apr 12 04:38:21 2013 (r3640)
+++ ofw/fs/fatfs/partition.fth Fri Apr 12 05:43:39 2013 (r3641)
@@ -90,7 +90,10 @@
dup 5 = over h# f = or if \ extended partition ( ... n,s,b,t )
2drop nip ( ... s )
extended-offset dup 0= if over to extended-offset then
- + dup read-sector recurse drop ( ... )
+ + dup ( ... es )
+ sector-buf >r sector-alloc ( ... es )
+ read-sector recurse drop ( ... )
+ sector-free r> to sector-buf ( ... )
else \ Ordinary partition ( ... n,s,b,t )
suitable? if ( ... n,s,b,t )
to partition-type drop ( ... n,s )
Author: quozl
Date: Tue Apr 9 05:48:45 2013
New Revision: 3638
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3638
Log:
fatfs, skip volume label directory entries, some filesystem instances have them and they remain after repair.
Modified:
ofw/fs/fatfs/lookup.fth
Modified: ofw/fs/fatfs/lookup.fth
==============================================================================
--- ofw/fs/fatfs/lookup.fth Tue Apr 9 05:44:57 2013 (r3637)
+++ ofw/fs/fatfs/lookup.fth Tue Apr 9 05:48:45 2013 (r3638)
@@ -238,7 +238,9 @@
\ Set the directory entry address; exit if set-dirent fails
search-offset @ search-cl @ search-dev @ set-dirent if 2 exit then
- de_attributes c@ h# f = if 0 exit then
+ de_attributes c@ h# f = if 0 exit then \ ignore a VFAT long file name
+
+ de_attributes c@ at_vollab and if 0 exit then \ ignore a volume label
de_name c@ case
0 of 1 endof \ No more valid entries