mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 08:25:38 +00:00
Omap4 sd_card driver: fix recursive usleep loop
This commit removes an endless loop, that occurred when the sd_card driver called usleep, or msleep on its Timer_delayer object. Fixes #705 Also fixes the same problem for the Omap4 GPIO driver.
This commit is contained in:
parent
d339eb734f
commit
ba9e7185a8
@ -51,18 +51,7 @@ class Gpio::Driver
|
|||||||
/**
|
/**
|
||||||
* Implementation of 'Delayer' interface
|
* Implementation of 'Delayer' interface
|
||||||
*/
|
*/
|
||||||
void usleep(unsigned us)
|
void usleep(unsigned us) { Timer::Connection::usleep(us); }
|
||||||
{
|
|
||||||
/* polling */
|
|
||||||
if (us == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
unsigned ms = us / 1000;
|
|
||||||
if (ms == 0)
|
|
||||||
ms = 1;
|
|
||||||
|
|
||||||
Timer::Connection::msleep(ms);
|
|
||||||
}
|
|
||||||
} _delayer;
|
} _delayer;
|
||||||
|
|
||||||
/* memory map */
|
/* memory map */
|
||||||
|
@ -38,18 +38,7 @@ class Block::Omap4_driver : public Block::Driver
|
|||||||
/**
|
/**
|
||||||
* Implementation of 'Delayer' interface
|
* Implementation of 'Delayer' interface
|
||||||
*/
|
*/
|
||||||
void usleep(unsigned us)
|
void usleep(unsigned us) { Timer::Connection::usleep(us); }
|
||||||
{
|
|
||||||
/* polling */
|
|
||||||
if (us == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
unsigned ms = us / 1000;
|
|
||||||
if (ms == 0)
|
|
||||||
ms = 1;
|
|
||||||
|
|
||||||
Timer::Connection::msleep(ms);
|
|
||||||
}
|
|
||||||
} _delayer;
|
} _delayer;
|
||||||
|
|
||||||
/* memory map */
|
/* memory map */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user