diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/init.h | 11 | ||||
| -rw-r--r-- | src/include/gpxe/timer.h | 32 |
2 files changed, 22 insertions, 21 deletions
diff --git a/src/include/gpxe/init.h b/src/include/gpxe/init.h index a5caa3e0e..d83aa5e55 100644 --- a/src/include/gpxe/init.h +++ b/src/include/gpxe/init.h @@ -22,7 +22,8 @@ struct init_fn { */ #define INIT_EARLY 01 /**< Early initialisation */ -#define INIT_NORMAL 02 /**< Normal initialisation */ +#define INIT_CONSOLE 02 /**< Console initialisation */ +#define INIT_NORMAL 03 /**< Normal initialisation */ /** @} */ @@ -54,14 +55,6 @@ struct startup_fn { /** @} */ -/* Use double digits to avoid problems with "10" < "9" on alphabetic sort */ -#define INIT_CONSOLE 02 -#define INIT_GDBSYM 03 -#define INIT_CPU 04 -#define INIT_TIMERS 05 -#define INIT_LOADBUF 08 -#define INIT_PCMCIA 09 - extern void initialise ( void ); extern void startup ( void ); extern void shutdown ( void ); diff --git a/src/include/gpxe/timer.h b/src/include/gpxe/timer.h index 4a4cf5b2f..ecd300015 100644 --- a/src/include/gpxe/timer.h +++ b/src/include/gpxe/timer.h @@ -3,7 +3,7 @@ #include <stddef.h> -typedef uint32_t tick_t; +typedef unsigned long tick_t; #define MSECS_IN_SEC (1000) #define USECS_IN_SEC (1000*1000) @@ -11,22 +11,30 @@ typedef uint32_t tick_t; #define TICKS_PER_SEC USECS_IN_SEC -tick_t currticks(void); +extern tick_t currticks ( void ); -void generic_currticks_udelay(unsigned int usecs); +extern void generic_currticks_udelay ( unsigned int usecs ); +/** A timer */ struct timer { - /* Returns zero on successful initialisation. */ - int (*init) (void); - - /* Return the current time, int mictoseconds since the beginning. */ - tick_t (*currticks) (void); - - /* Sleep for a few useconds. */ - void (*udelay) (unsigned int useconds); + /** Initialise timer + * + * @ret rc Return status code + */ + int ( * init ) ( void ); + /** Read current time + * + * @ret ticks Current time, in ticks + */ + tick_t ( * currticks ) ( void ); + /** Delay + * + * @v usecs Time to delay, in microseconds + */ + void ( * udelay ) ( unsigned int usecs ); }; -#define __timer(order) __table (struct timer, timers, order) +#define __timer( order ) __table ( struct timer, timers, order ) #endif /* GPXE_TIMER_H */ |
