source: rtems/c/src/lib/libbsp/arm/shared/include/arm-a9mpcore-clock.h @ 991fdb33

4.115
Last change on this file since 991fdb33 was ecf64a5e, checked in by Sebastian Huber <sebastian.huber@…>, on 09/10/14 at 14:17:02

bsps/arm: Add a9mpcore_clock_initialize_early()

This is necessary to use the CPU counter converter even in case no clock
driver is present, e.g. in tmcontext01.

  • Property mode set to 100644
File size: 991 bytes
Line 
1/*
2 * Copyright (c) 2013 Chris Johns <chrisj@rtems.org>.  All rights reserved.
3 *
4 * The license and distribution terms for this file may be
5 * found in the file LICENSE in this distribution or at
6 * http://www.rtems.org/license/LICENSE.
7 */
8
9#ifndef LIBBSP_ARM_SHARED_ARM_A9MPCORE_CLOCK_H
10#define LIBBSP_ARM_SHARED_ARM_A9MPCORE_CLOCK_H
11
12#include <rtems/counter.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif /* __cplusplus */
17
18/*
19 * Return the peripheral clock. For systems such as the zynq this
20 * is controlled by the PL logic generation and can vary. Provide this
21 * function in your application to override the BSP default.
22 */
23uint32_t a9mpcore_clock_periphclk(void);
24
25/**
26 * @brief Do early clock initialization so that the CPU counter conversion
27 * works.
28 */
29static inline void a9mpcore_clock_initialize_early(void)
30{
31  rtems_counter_initialize_converter(a9mpcore_clock_periphclk());
32}
33
34#ifdef __cplusplus
35}
36#endif /* __cplusplus */
37
38#endif /* LIBBSP_ARM_SHARED_ARM_A9MPCORE_CLOCK_H */
Note: See TracBrowser for help on using the repository browser.