2007-11-05 Robert Millan <rmh@aybabtu.com>

* disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
	(grub_ata_wait): Reimplement using grub_millisleep().

	* include/grub/misc.h (grub_div_roundup): Fix parenthesization.
	* include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
This commit is contained in:
robertmh 2007-11-05 14:54:00 +00:00
parent be7ac41e14
commit 0149ab7c63
5 changed files with 14 additions and 8 deletions

View file

@ -21,9 +21,9 @@
#include <grub/misc.h>
#include <grub/disk.h>
#include <grub/mm.h>
#include <grub/time.h>
/* XXX: For now this only works on i386. */
#include <grub/cpu/io.h>
#include <grub/machine/time.h>
#include <grub/machine/biosdisk.h>
typedef enum
@ -142,10 +142,7 @@ grub_ata_wait_drq (struct grub_ata_device *dev)
static inline void
grub_ata_wait (void)
{
grub_uint32_t time;
time = grub_get_rtc ();
while (time + 1 > grub_get_rtc ());
grub_millisleep (50);
}
/* Byteorder has to be changed before strings can be read. */