Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Nishanth Menon's avatar
    eb9a28f6
    mmc: omap: timeout counter fix · eb9a28f6
    Nishanth Menon authored
    
    Having a loop with a counter is no timing guarentee for timing
    accuracy or compiler optimizations. For e.g. the same loop counter
    which runs when the MPU is running at 600MHz will timeout in around
    half the time when running at 1GHz. or the example where GCC 4.5
    compiles with different optimization compared to GCC 4.4. use timer
    to keep track of time elapse and we use an emperical number - 1sec
    for a worst case timeout.  This should never happen, and is adequate
    imaginary condition for us to fail with timeout.
    
    Signed-off-by: default avatarNishanth Menon <nm@ti.com>
    Signed-off-by: default avatarSandeep Paulraj <s-paulraj@ti.com>
    eb9a28f6
    History
    mmc: omap: timeout counter fix
    Nishanth Menon authored
    
    Having a loop with a counter is no timing guarentee for timing
    accuracy or compiler optimizations. For e.g. the same loop counter
    which runs when the MPU is running at 600MHz will timeout in around
    half the time when running at 1GHz. or the example where GCC 4.5
    compiles with different optimization compared to GCC 4.4. use timer
    to keep track of time elapse and we use an emperical number - 1sec
    for a worst case timeout.  This should never happen, and is adequate
    imaginary condition for us to fail with timeout.
    
    Signed-off-by: default avatarNishanth Menon <nm@ti.com>
    Signed-off-by: default avatarSandeep Paulraj <s-paulraj@ti.com>