Author: wmb
Date: Thu Dec 13 01:19:45 2012
New Revision: 3487
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3487
Log:
Marvell WLAN driver - moved the host interrupt mask setting code earlier in the startup sequence to make newer 8787 firmware happy. Also fixed a name collision that was causing (harmless) compilation warnings.
Modified:
dev/mmc/sdhci/mv8686/fw8686.fth
dev/mmc/sdhci/mv8686/sdio.fth
Modified: dev/mmc/sdhci/mv8686/fw8686.fth
==============================================================================
--- dev/mmc/sdhci/mv8686/fw8686.fth Wed Dec 12 23:59:24 2012 (r3486)
+++ dev/mmc/sdhci/mv8686/fw8686.fth Thu Dec 13 01:19:45 2012 (r3487)
@@ -72,7 +72,6 @@
fw-download-ok? 0= if true exit then
- 3 host-int-mask-reg 1 sdio-reg! \ Enable upload (1) and download (2)
mv8787? if
2 config-reg 1 sdio-reg! \ Host power up
then
Modified: dev/mmc/sdhci/mv8686/sdio.fth
==============================================================================
--- dev/mmc/sdhci/mv8686/sdio.fth Wed Dec 12 23:59:24 2012 (r3486)
+++ dev/mmc/sdhci/mv8686/sdio.fth Thu Dec 13 01:19:45 2012 (r3487)
@@ -21,10 +21,10 @@
instance defer get-write-port ( -- port# )
\ FCode doesn't have 2value so we do it this way
-0 value fw-adr
-0 value fw-len
-: default-fw$ ( -- adr len ) fw-adr fw-len ;
-: set-default-fw$ ( adr len -- ) to fw-len to fw-adr ;
+0 value fw-name-adr
+0 value fw-name-len
+: default-fw$ ( -- adr len ) fw-name-adr fw-name-len ;
+: set-default-fw$ ( adr len -- ) to fw-name-len to fw-name-adr ;
0 value ioport
d# 256 constant blksz \ Block size for data tx/rx
@@ -226,11 +226,14 @@
\ Set host interrupt reset to "read to clear"
host-int-rsr-reg 1 sdio-reg@ h# 3f or host-int-rsr-reg 1 sdio-reg!
-\ 3 host-int-mask-reg 1 sdio-reg! \ Enable upload (1) and download (2)
-
\ Set Dnld/upld to "auto reset"
card-misc-cfg-reg 1 sdio-reg@ h# 10 or card-misc-cfg-reg 1 sdio-reg!
then
+ \ Newer revisions of the 8787 firmware empirically require that this
+ \ be enabled early, before firmware download. Older versions, and
+ \ 8686 firmware, appear to be content with it either here or after
+ \ firmware startup.
+ 3 host-int-mask-reg 1 sdio-reg! \ Enable upload (1) and download (2)
;
: sdio-blocks@ ( adr len -- actual )