summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-08-27 12:50:36 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-08-27 12:50:36 -0500
commitbfa2b8c39ee19006e75d5ea3890fdda3eec4f9b7 (patch)
tree2338264879d5b57dd6604624e10fcb120b35f9ec
parentnds/Makefile.am: Rework to avoid creating ltos of .rel files (diff)
downloadrtems-bfa2b8c39ee19006e75d5ea3890fdda3eec4f9b7.tar.bz2
virtex5/.../bsp.h: Add BSP_Convert_decrementer() macro required by MPC6xx timer driver
-rw-r--r--c/src/lib/libbsp/powerpc/virtex5/include/bsp.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/powerpc/virtex5/include/bsp.h b/c/src/lib/libbsp/powerpc/virtex5/include/bsp.h
index 2e2112976a..8558faa7b4 100644
--- a/c/src/lib/libbsp/powerpc/virtex5/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/virtex5/include/bsp.h
@@ -1,7 +1,9 @@
-/* bsp.h
+/* @file
*
* This include file contains all GEN405 board IO definitions.
- *
+ */
+
+/*
* derived from helas403/include/bsp.h:
* Id: bsp.h,v 1.4 2001/06/18 17:01:48 joel Exp
* Author: Thomas Doerfler <td@imd.m.isar.de>
@@ -67,7 +69,26 @@ extern "C" {
/* miscellaneous stuff assumed to exist */
extern bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
-extern rtems_configuration_table BSP_Configuration; /* owned by BSP */
+/*
+ * 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;
+
+/*
+ * Macro used by shared MPC6xx timer driver
+ */
+#define BSP_Convert_decrementer( _value ) \
+ ((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
+
+
#endif /* ASM */
void BSP_ask_for_reset(void);