forked from Imagelibrary/rtems
GPTIMER: fix build warnings
This commit is contained in:
@@ -33,6 +33,7 @@ EXTRA_DIST += shared/amba/ambapp_old.c
|
||||
EXTRA_DIST += shared/amba/ambapp_show.c
|
||||
|
||||
# Clock Driver and Timer Library
|
||||
EXTRA_DIST += shared/include/gptimer.h
|
||||
EXTRA_DIST += shared/include/tlib.h
|
||||
EXTRA_DIST += shared/timer/gptimer.c
|
||||
EXTRA_DIST += shared/timer/tlib.c
|
||||
|
||||
@@ -92,6 +92,7 @@ libbsp_a_SOURCES += ../../sparc/shared/amba/ambapp_show.c
|
||||
libbsp_a_SOURCES += ../../sparc/shared/amba/ahbstat.c
|
||||
|
||||
# Clock Driver and Timer Library
|
||||
include_HEADERS += ../../sparc/shared/include/gptimer.h
|
||||
include_HEADERS += ../../sparc/shared/include/tlib.h
|
||||
libbsp_a_SOURCES += ../../sparc/shared/timer/gptimer.c
|
||||
libbsp_a_SOURCES += ../../sparc/shared/timer/tlib.c
|
||||
|
||||
@@ -113,6 +113,10 @@ $(PROJECT_INCLUDE)/ahbstat.h: ../../sparc/shared/include/ahbstat.h $(PROJECT_INC
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/ahbstat.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/ahbstat.h
|
||||
|
||||
$(PROJECT_INCLUDE)/gptimer.h: ../../sparc/shared/include/gptimer.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/gptimer.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/gptimer.h
|
||||
|
||||
$(PROJECT_INCLUDE)/tlib.h: ../../sparc/shared/include/tlib.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tlib.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tlib.h
|
||||
|
||||
@@ -70,6 +70,7 @@ libbsp_a_SOURCES += ../../sparc/shared/amba/ambapp_show.c
|
||||
libbsp_a_SOURCES += ../../sparc/shared/amba/ahbstat.c
|
||||
|
||||
# Clock Driver and Timer Library
|
||||
include_HEADERS += ../../sparc/shared/include/gptimer.h
|
||||
include_HEADERS += ../../sparc/shared/include/tlib.h
|
||||
libbsp_a_SOURCES += ../../sparc/shared/timer/gptimer.c
|
||||
libbsp_a_SOURCES += ../../sparc/shared/timer/tlib.c
|
||||
|
||||
@@ -109,6 +109,10 @@ $(PROJECT_INCLUDE)/ahbstat.h: ../../sparc/shared/include/ahbstat.h $(PROJECT_INC
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/ahbstat.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/ahbstat.h
|
||||
|
||||
$(PROJECT_INCLUDE)/gptimer.h: ../../sparc/shared/include/gptimer.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/gptimer.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/gptimer.h
|
||||
|
||||
$(PROJECT_INCLUDE)/tlib.h: ../../sparc/shared/include/tlib.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tlib.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tlib.h
|
||||
|
||||
30
c/src/lib/libbsp/sparc/shared/include/gptimer.h
Normal file
30
c/src/lib/libbsp/sparc/shared/include/gptimer.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/* GPTIMER and GRTIMER timer driver
|
||||
*
|
||||
* COPYRIGHT (c) 2015.
|
||||
* Cobham Gaisler.
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __GPTIMER_H__
|
||||
#define __GPTIMER_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The GPTIMER_INFO_AVAIL define set from the BSP bsp.h configures if the
|
||||
* Driver manager info interface is built.
|
||||
*/
|
||||
|
||||
/* Register GPTIMER and GRTIMER driver to Driver Manager */
|
||||
void gptimer_register_drv (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <drvmgr/drvmgr.h>
|
||||
#include <drvmgr/ambapp_bus.h>
|
||||
#include <grlib.h>
|
||||
#include <gptimer.h>
|
||||
#include "tlib.h"
|
||||
|
||||
#if defined(LEON3) && defined(RTEMS_DRVMGR_STARTUP)
|
||||
@@ -379,7 +380,7 @@ static inline struct gptimer_priv *priv_from_timer(struct gptimer_timer *t)
|
||||
t->index * sizeof(struct gptimer_timer));
|
||||
}
|
||||
|
||||
int gptimer_tlib_int_pend(struct tlib_dev *hand, int ack)
|
||||
static int gptimer_tlib_int_pend(struct tlib_dev *hand, int ack)
|
||||
{
|
||||
struct gptimer_timer *timer = (struct gptimer_timer *)hand;
|
||||
unsigned int ctrl = timer->tregs->ctrl;
|
||||
@@ -415,7 +416,7 @@ void gptimer_isr(void *data)
|
||||
}
|
||||
}
|
||||
|
||||
void gptimer_tlib_reset(struct tlib_dev *hand)
|
||||
static void gptimer_tlib_reset(struct tlib_dev *hand)
|
||||
{
|
||||
struct gptimer_timer *timer = (struct gptimer_timer *)hand;
|
||||
|
||||
@@ -508,7 +509,9 @@ static void gptimer_tlib_restart(struct tlib_dev *hand)
|
||||
timer->tregs->ctrl |= GPTIMER_CTRL_LD | GPTIMER_CTRL_EN;
|
||||
}
|
||||
|
||||
static void gptimer_tlib_get_counter(struct tlib_dev *hand, unsigned int *counter)
|
||||
static void gptimer_tlib_get_counter(
|
||||
struct tlib_dev *hand,
|
||||
unsigned int *counter)
|
||||
{
|
||||
struct gptimer_timer *timer = (struct gptimer_timer *)hand;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user