Author: wmb Date: 2008-08-22 19:59:38 +0200 (Fri, 22 Aug 2008) New Revision: 887
Modified: dev/mmc/sdhci/sdhci.fth Log: SDHCI - Turned on card insert/remove bits in interrupt enable register to work around the hardware problem that the card detection status bits won't change state unless the interrupt enables are on. This is releated to OLPC trac 1339. r851 has a corresponding change to the resume code that turns on those interrupt enable bits when waking up. This change tries to leave the enables turned on the initial transitioning to the OS. It especially helps with Windows XP, which otherwise often fails to detect the card during early startup.
Modified: dev/mmc/sdhci/sdhci.fth =================================================================== --- dev/mmc/sdhci/sdhci.fth 2008-08-21 22:31:44 UTC (rev 886) +++ dev/mmc/sdhci/sdhci.fth 2008-08-22 17:59:38 UTC (rev 887) @@ -176,14 +176,17 @@
: data-timeout! ( n -- ) h# 2e cb! ;
+\ We leave the remove and insert interrupt enables on because the +\ hardware has a bug that blocks the card detection status bits +\ unless the interrupt enables are on. : intstat-on ( -- ) - h# 000b h# 34 cw! \ normal interrupt status en reg - \ Enable: DMA Interrupt, Transfer Complete, CMD Complete + h# 00cb h# 34 cw! \ normal interrupt status en reg + \ Enable: Remove, Insert, DMA Interrupt, Transfer Complete, CMD Complete \ Disable: Card Interrupt, Remove, Insert, Read Ready, \ Write Ready, Block Gap h# f1ff h# 36 cw! \ error interrupt status en reg ; -: intstat-off ( -- ) h# 0 h# 34 cl! ; \ All interrupts off +: intstat-off ( -- ) h# c0 h# 34 cl! ; \ Remove, Insert on, others off
: setup-host ( -- ) reset-host
openfirmware@openfirmware.info