#11054 NORM Future : EC SCI mask not written correctly when going into suspend

Zarro Boogs per Child bugtracker at laptop.org
Wed Jul 27 17:47:47 EDT 2011


#11054: EC SCI mask not written correctly when going into suspend
-------------------------------------------+--------------------------------
           Reporter:  dsd                  |       Owner:  pgf           
               Type:  defect               |      Status:  new           
           Priority:  normal               |   Milestone:  Future Release
          Component:  embedded controller  |     Version:  not specified 
         Resolution:                       |    Keywords:                
        Next_action:  never set            |    Verified:  0             
Deployment_affected:                       |   Blockedby:                
           Blocking:                       |  
-------------------------------------------+--------------------------------

Comment(by rsmith):

 Replying to [comment:8 dsd]:
 > As requested by Richard, here is a bzImage that reproduces the issue:
 http://dev.laptop.org/~dsd/20110726/bzImage

 I did further research into this issue because the previous explanation
 did not match what I see in the posted EC log.  The EC log shows
 'SCIMask=00'. This means that the EC indeed received 2 bytes.  The S068IBF
 message that occur after that line occurs because the ibf flag is stuck.
 This is something that has always happened on suspend.

 The core problem is not a missing 2nd data byte but the fact that its zero
 rather than 01.  After debugging further what I believe is happening is
 that we don't allow enough time to pass between writing the last byte and
 when the bus power turns off for suspend.  Suspend drops the power to the
 LPC bus.  So the EC reads the value but its zero rather than 01 and the
 LPC bridge goes into a wacky mode until power is restored on a resume.

 This is is supported by the fact that you can also make things work by
 adding a mdelay() call after the call to olpc_ec_cmd().

 Paul's patch is exactly the right fix.  With the patch we now wait for the
 ibf flag to clear which means that we don't turn off the power to the bus
 anymore while the EC is in the process of reading the byte.  ibf is
 cleared after the byte has been read.  This not only fixes the 2nd byte
 zero problem but also fixes the infinite ibf flag that used to occur when
 going into suspend.

-- 
Ticket URL: <http://dev.laptop.org/ticket/11054#comment:9>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list