Author: wmb
Date: Tue Oct 30 05:44:48 2012
New Revision: 3395
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3395
Log:
OLPC XO-4 - Turn audio island on before invoking Linux, thus eliminating the need to leave the island on when closing the OFW audio driver, thus making repeated audio testing work reliably.
Modified:
cpu/arm/olpc/build-fw.fth
Modified: cpu/arm/olpc/build-fw.fth
==============================================================================
--- cpu/arm/olpc/build-fw.fth Tue Oct 30 05:28:17 2012 (r3394)
+++ cpu/arm/olpc/build-fw.fth Tue Oct 30 05:44:48 2012 (r3395)
@@ -679,6 +679,10 @@
: pre-setup-for-linux ( -- )
[ ' linux-pre-hook behavior compile, ] \ Chain to old behavior
sound-end
+[ifdef] mmp3
+ \ XXX Delete this when Linux is ready to turn on the audio island
+ " audio-island-on" " /pmua" execute-device-method drop
+[then]
;
' pre-setup-for-linux to linux-pre-hook
Author: wmb
Date: Tue Oct 30 05:28:17 2012
New Revision: 3394
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3394
Log:
OLPC ARM - Turn off audio clock when closing sound driver, so that test repetitions will work correctly. This may require turning the clock back on prior to starting Linux.
Modified:
cpu/arm/olpc/sound.fth
Modified: cpu/arm/olpc/sound.fth
==============================================================================
--- cpu/arm/olpc/sound.fth Mon Oct 29 21:37:21 2012 (r3393)
+++ cpu/arm/olpc/sound.fth Tue Oct 30 05:28:17 2012 (r3394)
@@ -670,8 +670,7 @@
d# 48000 set-sample-rate
;
: (close)
-\ Reinstate audio-clock-off when Linux turns on its own clock
-\ audio-clock-off
+ audio-clock-off
adma-base h# 100 " map-out" $call-parent
sspa-base h# 100 " map-out" $call-parent
0 to adma-base 0 to sspa-base
Author: quozl
Date: Mon Oct 29 21:37:21 2012
New Revision: 3393
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3393
Log:
OLPC ARM - assign "0 0 reg" properties to several devices
when linux names devices, devices without a reg property will
get a globally assigned incrementing suffix, which may change
depending on which devices are configured. if present, linux
will use the reg property to create a stable name for a device.
using "0 0 reg" will result in a linux name like "0.ols"
from Paul Fox <pgf(a)laptop.org>
Modified:
cpu/arm/olpc/cl4/leds.fth
cpu/arm/olpc/gpio-i2c.fth
cpu/arm/olpc/sound.fth
Modified: cpu/arm/olpc/cl4/leds.fth
==============================================================================
--- cpu/arm/olpc/cl4/leds.fth Mon Oct 29 21:34:26 2012 (r3392)
+++ cpu/arm/olpc/cl4/leds.fth Mon Oct 29 21:37:21 2012 (r3393)
@@ -4,6 +4,7 @@
0 0 " " " /" begin-package
" ols" device-name
" olpc,xo-light-sensor" +compatible
+ 0 0 reg \ So linux will assign a static device name
end-package
0 0 " 0" " /" begin-package
Modified: cpu/arm/olpc/gpio-i2c.fth
==============================================================================
--- cpu/arm/olpc/gpio-i2c.fth Mon Oct 29 21:34:26 2012 (r3392)
+++ cpu/arm/olpc/gpio-i2c.fth Mon Oct 29 21:37:21 2012 (r3393)
@@ -34,6 +34,9 @@
" i2c-gpio" +compatible
1 " #address-cells" integer-property
1 " #size-cells" integer-property
+
+ 0 0 reg \ So linux will assign a static device name
+
: encode-unit ( phys.. -- str ) push-hex (u.) pop-base ;
: decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ;
@@ -76,6 +79,9 @@
" i2c-gpio" +compatible
1 " #address-cells" integer-property
1 " #size-cells" integer-property
+
+ 0 0 reg \ So linux will assign a static device name
+
: encode-unit ( phys.. -- str ) push-hex (u.) pop-base ;
: decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ;
Modified: cpu/arm/olpc/sound.fth
==============================================================================
--- cpu/arm/olpc/sound.fth Mon Oct 29 21:34:26 2012 (r3392)
+++ cpu/arm/olpc/sound.fth Mon Oct 29 21:37:21 2012 (r3393)
@@ -759,6 +759,8 @@
\ The name that was hardcoded in the Linux driver was OLPC XO-1.75
" OLPC XO" " model" string-property
+ 0 0 reg \ So linux will assign a static device name
+
: +string encode-string encode+ ;
0 0 encode-bytes
Author: quozl
Date: Sat Oct 27 05:15:27 2012
New Revision: 3388
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3388
Log:
OLPC XO-1.75 - fix incorrect SPI FLASH size detection for XO-1.75 only, the same JEDEC ID exists on parts with different sizes.
Modified:
dev/olpc/spiflash/spiflash.fth
Modified: dev/olpc/spiflash/spiflash.fth
==============================================================================
--- dev/olpc/spiflash/spiflash.fth Fri Oct 26 08:55:56 2012 (r3387)
+++ dev/olpc/spiflash/spiflash.fth Sat Oct 27 05:15:27 2012 (r3388)
@@ -307,7 +307,7 @@
\ ST, Spansion, and WinBond
h# 13 of ['] common-write 1mb-flash endof
h# 34 of ['] common-write 1mb-flash
- jedec-id h# 3425c2 = if 2mb-flash then \ MXIC 25E8035
+ \ jedec-id h# 3425c2 = if 2mb-flash then \ MXIC 25E8035
endof
\ the SST part with its unique auto-increment address writing scheme
h# bf of ['] sst-write 1mb-flash endof
Author: quozl
Date: Fri Oct 26 07:36:10 2012
New Revision: 3386
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3386
Log:
spiflash - identify some second source parts by JEDEC ID rather than the short ID
Modified:
dev/olpc/spiflash/spiflash.fth
Modified: dev/olpc/spiflash/spiflash.fth
==============================================================================
--- dev/olpc/spiflash/spiflash.fth Fri Oct 26 01:11:14 2012 (r3385)
+++ dev/olpc/spiflash/spiflash.fth Fri Oct 26 07:36:10 2012 (r3386)
@@ -303,26 +303,20 @@
0 value spi-id#
: spi-identify ( -- )
ab-id to spi-id#
- \ ST, Spansion, and WinBond all identify as 13
- \ For now, we only need to distinguish between if it's
- \ a common page-write part or the SST part with its
- \ unique auto-increment address writing scheme.
spi-id# case
+ \ ST, Spansion, and WinBond
h# 13 of ['] common-write 1mb-flash endof
- h# 34 of ['] common-write 1mb-flash endof
+ h# 34 of ['] common-write 1mb-flash
+ jedec-id h# 3425c2 = if 2mb-flash then \ MXIC 25E8035
+ endof
+ \ the SST part with its unique auto-increment address writing scheme
h# bf of ['] sst-write 1mb-flash endof
- h# 14 of ['] common-write 1mb-flash endof
- h# 35 of ['] common-write 2mb-flash endof
-\ On some old board the ID would read as 14 when it should have been something else.
-\ On CL4, 14 is the expected ID.
-\ ." The SPI FLASH ID reads as 14. This is due to an infrequent hardware problem." cr
-\ ." If you power cycle and try again, it will probably work the next time." cr
-\ abort
-\ endof
-
-\ ( default ) true abort" Unsupported SPI FLASH ID"
- ( default ) ." Bad SPI FLASH ID " dup . cr ['] null-write swap
- endcase
+ h# 14 of ['] common-write 1mb-flash
+ jedec-id h# 1540c8 = if 2mb-flash then \ XO-4 B1
+ endof
+ h# 35 of ['] common-write 2mb-flash endof \ W25Q16CV 3525c2
+ ( default ) ." Bad SPI FLASH ID " dup . cr ['] null-write swap
+ endcase ( writer )
to write-spi-flash
spi-unprotect
;
@@ -336,7 +330,7 @@
else
spi-id# case
h# 13 of ." type 13 - Spansion, Winbond, or ST" endof
- h# 14 of ." type 14 - 2 MB" endof
+ h# 14 of ." type 14" endof
h# 34 of ." type 34 - Macronyx" endof
h# 35 of ." type 35 - 2 MB" endof
endcase