mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
common: Move some time functions out of common.h
These functions belong in time.h so move them over and add comments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <time.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <div64.h>
|
#include <div64.h>
|
||||||
#include <asm/arch/immap_ls102xa.h>
|
#include <asm/arch/immap_ls102xa.h>
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
|
#include <time.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <time.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <div64.h>
|
#include <div64.h>
|
||||||
#include <asm/arch/imx-regs.h>
|
#include <asm/arch/imx-regs.h>
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <time.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <div64.h>
|
#include <div64.h>
|
||||||
#include <asm/arch/imx-regs.h>
|
#include <asm/arch/imx-regs.h>
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#include <asm/timer.h>
|
#include <asm/timer.h>
|
||||||
#include <asm/immap.h>
|
#include <asm/immap.h>
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
|
#include <time.h>
|
||||||
#ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8
|
#ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8
|
||||||
#include <hwconfig.h>
|
#include <hwconfig.h>
|
||||||
#endif
|
#endif
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include <time.h>
|
||||||
#include <asm/fsl_law.h>
|
#include <asm/fsl_law.h>
|
||||||
#include <asm/fsl_serdes.h>
|
#include <asm/fsl_serdes.h>
|
||||||
#include <asm/fsl_srio.h>
|
#include <asm/fsl_srio.h>
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <time.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
#include "jr.h"
|
#include "jr.h"
|
||||||
#include "jobdesc.h"
|
#include "jobdesc.h"
|
||||||
#include "desc_constr.h"
|
#include "desc_constr.h"
|
||||||
|
#include <time.h>
|
||||||
#ifdef CONFIG_FSL_CORENET
|
#ifdef CONFIG_FSL_CORENET
|
||||||
#include <asm/fsl_pamu.h>
|
#include <asm/fsl_pamu.h>
|
||||||
#endif
|
#endif
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include <i2c.h> /* Functional interface */
|
#include <i2c.h> /* Functional interface */
|
||||||
|
#include <time.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/fsl_i2c.h> /* HW definitions */
|
#include <asm/fsl_i2c.h> /* HW definitions */
|
||||||
#include <clk.h>
|
#include <clk.h>
|
||||||
|
@@ -288,10 +288,6 @@ int cleanup_before_linux_select(int flags);
|
|||||||
uint64_t get_ticks(void);
|
uint64_t get_ticks(void);
|
||||||
void wait_ticks (unsigned long);
|
void wait_ticks (unsigned long);
|
||||||
|
|
||||||
/* arch/$(ARCH)/lib/time.c */
|
|
||||||
ulong usec2ticks (unsigned long usec);
|
|
||||||
ulong ticks2usec (unsigned long ticks);
|
|
||||||
|
|
||||||
/* lib/uuid.c */
|
/* lib/uuid.c */
|
||||||
#include <uuid.h>
|
#include <uuid.h>
|
||||||
|
|
||||||
|
@@ -70,4 +70,20 @@ uint64_t usec_to_tick(unsigned long usec);
|
|||||||
(time_after_eq(a,b) && \
|
(time_after_eq(a,b) && \
|
||||||
time_before(a,c))
|
time_before(a,c))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* usec2ticks() - Convert microseconds to internal ticks
|
||||||
|
*
|
||||||
|
* @usec: Value of microseconds to convert
|
||||||
|
* @return Corresponding internal ticks value, calculated using get_tbclk()
|
||||||
|
*/
|
||||||
|
ulong usec2ticks(unsigned long usec);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ticks2usec() - Convert internal ticks to microseconds
|
||||||
|
*
|
||||||
|
* @ticks: Value of ticks to convert
|
||||||
|
* @return Corresponding microseconds value, calculated using get_tbclk()
|
||||||
|
*/
|
||||||
|
ulong ticks2usec(unsigned long ticks);
|
||||||
|
|
||||||
#endif /* _TIME_H */
|
#endif /* _TIME_H */
|
||||||
|
Reference in New Issue
Block a user