Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
81da28c2
Commit
81da28c2
authored
Oct 04, 2019
by
Soby Mathew
Committed by
TrustedFirmware Code Review
Oct 04, 2019
Browse files
Merge "delay: timeout detection support" into integration
parents
cf9319f4
0711ee5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/drivers/delay_timer.h
View file @
81da28c2
/*
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2019, Linaro Limited
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -7,8 +8,11 @@
#ifndef DELAY_TIMER_H
#define DELAY_TIMER_H
#include <stdbool.h>
#include <stdint.h>
#include <arch_helpers.h>
/********************************************************************
* A simple timer driver providing synchronous delay functionality.
* The driver must be initialized with a structure that provides a
...
...
@@ -23,6 +27,25 @@ typedef struct timer_ops {
uint32_t
clk_div
;
}
timer_ops_t
;
static
inline
uint64_t
timeout_cnt_us2cnt
(
uint32_t
us
)
{
return
((
uint64_t
)
us
*
(
uint64_t
)
read_cntfrq_el0
())
/
1000000ULL
;
}
static
inline
uint64_t
timeout_init_us
(
uint32_t
us
)
{
uint64_t
cnt
=
timeout_cnt_us2cnt
(
us
);
cnt
+=
read_cntfrq_el0
();
return
cnt
;
}
static
inline
bool
timeout_elapsed
(
uint64_t
expire_cnt
)
{
return
read_cntpct_el0
()
>
expire_cnt
;
}
void
mdelay
(
uint32_t
msec
);
void
udelay
(
uint32_t
usec
);
void
timer_init
(
const
timer_ops_t
*
ops_ptr
);
...
...
plat/marvell/a8k/common/ble/ble.mk
View file @
81da28c2
...
...
@@ -19,6 +19,7 @@ BLE_SOURCES += $(BLE_PATH)/ble_main.c \
PLAT_INCLUDES
+=
-I
$(MV_DDR_PATH)
\
-I
$(CURDIR)
/include
\
-I
$(CURDIR)
/include/arch/aarch64
\
-I
$(CURDIR)
/include/lib/libc
\
-I
$(CURDIR)
/include/lib/libc/aarch64
\
-I
$(CURDIR)
/drivers/marvell
...
...
plat/st/common/include/stm32mp_common.h
View file @
81da28c2
/*
* Copyright (C) 2018-2019, STMicroelectronics - All Rights Reserved
* Copyright (c) 2018-2019, Linaro Limited
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -12,8 +11,6 @@
#include <platform_def.h>
#include <arch_helpers.h>
/* Functions to save and get boot context address given by ROM code */
void
stm32mp_save_boot_ctx_address
(
uintptr_t
address
);
uintptr_t
stm32mp_get_boot_ctx_address
(
void
);
...
...
@@ -82,21 +79,6 @@ unsigned long stm32mp_clk_get_rate(unsigned long id);
/* Initialise the IO layer and register platform IO devices */
void
stm32mp_io_setup
(
void
);
static
inline
uint64_t
arm_cnt_us2cnt
(
uint32_t
us
)
{
return
((
uint64_t
)
us
*
(
uint64_t
)
read_cntfrq
())
/
1000000ULL
;
}
static
inline
uint64_t
timeout_init_us
(
uint32_t
us
)
{
return
read_cntpct_el0
()
+
arm_cnt_us2cnt
(
us
);
}
static
inline
bool
timeout_elapsed
(
uint64_t
expire
)
{
return
read_cntpct_el0
()
>
expire
;
}
/*
* Check that the STM32 header of a .stm32 binary image is valid
* @param header: pointer to the stm32 image header
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment