Files
rtems/bsps/powerpc/include/libcpu/c_clock.h
T
Joel Sherrill 06e58ab5fa bsps: Address files with only Eric Valette's email address
Many files with Eric Valette as author only had his email address.
This led to them being missed in previous relicensing passes.
This effort relicensed where possible and made efforts to have the
file follow the RTEMS standard for top of files (SPDX, Doxygen,
and then copyright/license).

Closes #5418.
2026-01-16 09:12:24 -06:00

78 lines
2.5 KiB
C

/* SPDX-License-Identifier: BSD-2-Clause */
/**
* @file
* @brief Clock Tick Device Driver
*
* This routine utilizes the Decrementer Register common to the PPC family.
*
* The tick frequency is directly programmed to the configured number of
* microseconds per tick.
*/
/*
* Copyright (c) 1989-1997 On-Line Applications Research Corporation (OAR).
*
* Modified to support the MPC750.
* Modifications Copyright (c) 1999 Eric Valette <eric.valette@free.fr>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _LIBCPU_C_CLOCK_H
#define _LIBCPU_C_CLOCK_H
#include <rtems.h>
/*
* These functions and variables represent the API exported by the
* CPU to the BSP.
*/
extern void clockOff (void* unused);
extern void clockOn (void* unused);
extern void clockIsr (void* unused);
/* bookE decrementer is slightly different */
extern void clockIsrBookE (void *unused);
extern int clockIsOn (void* unused);
/*
* These functions and variables represent the assumptions of this
* driver on the BSP.
*/
extern int BSP_disconnect_clock_handler (void);
/*
* PCI Bus Frequency
*/
extern unsigned int BSP_bus_frequency;
/*
* processor clock frequency
*/
extern unsigned int BSP_processor_frequency;
/*
* Time base divisior (how many tick for 1 second).
*/
extern unsigned int BSP_time_base_divisor;
#endif