diff options
author | Jonas <jonas.aberg@stericsson.com> | 2009-11-20 15:23:58 +0100 |
---|---|---|
committer | Michael Brandt <Michael.Brandt@stericsson.com> | 2009-11-30 10:58:05 +0100 |
commit | 2a1c5318956aa7b3ecb94557abe5728abd7c6402 (patch) | |
tree | 4d646a5869a66638a42455726532a1d2ec5e4f0d /include/asm-arm | |
parent | 4f47f2f1c8c46ac87c4e0a5708f950fdb59a2a17 (diff) |
Corrected timer errors and changed MTU0 timer from 0 to 3 due to 0 is used by the linux kernel and we still want to be able to use that timer for boottime measurement. IE leave the 3rd timer run until we're executing init. Added atags for u-boot timing measurements as communication with the kernel.
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/boottime.h | 20 | ||||
-rw-r--r-- | include/asm-arm/setup.h | 14 |
2 files changed, 34 insertions, 0 deletions
diff --git a/include/asm-arm/boottime.h b/include/asm-arm/boottime.h new file mode 100644 index 000000000..3f8971380 --- /dev/null +++ b/include/asm-arm/boottime.h @@ -0,0 +1,20 @@ + +#ifndef BOOTTIME_H +#define BOOTTIME_H + +ulong get_raw_timer(void); +extern ulong boottime_ticks_uboot_init; +extern ulong boottime_ticks_load_kernel; +extern ulong boottime_ticks_uboot_done; + +#ifdef CONFIG_BOOTTIME +#define boottime_tag_uboot_init() boottime_ticks_uboot_init = get_raw_timer(); +#define boottime_tag_load_kernel() boottime_ticks_load_kernel = get_raw_timer(); +#define boottime_tag_uboot_done() boottime_ticks_uboot_done = get_raw_timer(); +#else +#define boottime_tag_uboot_init() +#define boottime_tag_load_kernel() +#define boottime_tag_uboot_done() +#endif + +#endif diff --git a/include/asm-arm/setup.h b/include/asm-arm/setup.h index 89df4dc70..cadc12435 100644 --- a/include/asm-arm/setup.h +++ b/include/asm-arm/setup.h @@ -205,6 +205,15 @@ struct tag_memclk { u32 fmemclk; }; +/* for automatic boot timing testcases */ +#define ATAG_BOOTTIME_UBOOT_INIT 0x41000403 +#define ATAG_BOOTTIME_LOAD_KERNEL 0x41000404 +#define ATAG_BOOTTIME_UBOOT_DONE 0x41000405 + +struct tag_boottime { + u32 tick; +}; + struct tag { struct tag_header hdr; union { @@ -227,6 +236,11 @@ struct tag { * DC21285 specific */ struct tag_memclk memclk; + /* + * Boot time + */ + struct tag_boottime boottime; + } u; }; |