]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
authorhollisb <hollisb@localhost>
Mon, 3 Jan 2005 21:48:45 +0000 (21:48 +0000)
committerhollisb <hollisb@localhost>
Mon, 3 Jan 2005 21:48:45 +0000 (21:48 +0000)
* boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
New function.
* include/grub/powerpc/ieee1275/ieee1275.h
(grub_ieee1275_milliseconds): New prototype.
* include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
Change to 1000.
* kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
grub_ieee1275_milliseconds.

ChangeLog
boot/powerpc/ieee1275/ieee1275.c
include/grub/powerpc/ieee1275/ieee1275.h
include/grub/powerpc/ieee1275/time.h
kern/powerpc/ieee1275/init.c

index adb54babac820070db69616ad63a42b32a19862e..856e4606bb41e0b93fad25cdbe81224146cc6ada 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
+
+       * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
+       New function.
+       * include/grub/powerpc/ieee1275/ieee1275.h
+       (grub_ieee1275_milliseconds): New prototype.
+       * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
+       Change to 1000.
+       * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
+       grub_ieee1275_milliseconds.
+
 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
 
        * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
index bc02864796eb4fd040de5d198f3908121f88603d..6ba7727bb09186c502cec396feff5679b7f64305 100644 (file)
@@ -1,7 +1,7 @@
 /* ieee1275.c - Access the Open Firmware client interface.  */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2003, 2004  Free Software Foundation, Inc.
+ *  Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -482,3 +482,19 @@ grub_ieee1275_set_color (grub_ieee1275_ihandle_t ihandle,
   
   return 0;
 }
+
+int
+grub_ieee1275_milliseconds (grub_uint32_t *msecs)
+{
+  struct milliseconds_args {
+    struct grub_ieee1275_common_hdr common;
+    grub_uint32_t msecs;
+  } args;
+
+  INIT_IEEE1275_COMMON (&args.common, "milliseconds", 0, 1);
+
+  if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+    return -1;
+  *msecs = args.msecs;
+  return 0;
+}
index bd69d582384370f32b4272c132a8e89cb76e58b0..2cacf43c5265a1fe1a88a10bf5286bcca55c4041 100644 (file)
@@ -119,6 +119,7 @@ int EXPORT_FUNC(grub_ieee1275_set_property) (grub_ieee1275_phandle_t phandle,
                                             grub_size_t *actual);
 int EXPORT_FUNC(grub_ieee1275_set_color) (grub_ieee1275_ihandle_t ihandle,
                                          int index, int r, int g, int b);
+int EXPORT_FUNC(grub_ieee1275_milliseconds) (grub_uint32_t *msecs);
 
 
 grub_err_t EXPORT_FUNC(grub_devalias_iterate)
index 8ef712e900826ec991e0fafe7381b4c950dfd9ca..dcfdc6e6c726f74c557be701a9a8a05cffbdb975 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2003,2004 Marco Gerards <metgerards@student.han.nl>
+ *  Copyright (C) 2003,2004, 2005 Marco Gerards <metgerards@student.han.nl>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
 # include <time.h>
 # define GRUB_TICKS_PER_SECOND CLOCKS_PER_SEC
 #else
-# define GRUB_TICKS_PER_SECOND 18
+# define GRUB_TICKS_PER_SECOND 1000
 #endif
 
 /* Return the real time in ticks.  */
index fcf5740b14937ec35111844ad2087988cedec043..ce342e157d732bb2cb371ec272b2c1ef01d5e787 100644 (file)
@@ -1,7 +1,7 @@
 /*  init.c -- Initialize GRUB on the newworld mac (PPC).  */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ *  Copyright (C) 2003, 2004,2005 Free Software Foundation, Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -82,5 +82,10 @@ grub_stop (void)
 grub_uint32_t
 grub_get_rtc (void)
 {
-  return 0;
+  grub_uint32_t msecs;
+
+  if (grub_ieee1275_milliseconds (&msecs))
+    return 0;
+
+  return msecs;
 }