summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/lm32/shared/milkymist_pfpu/milkymist_pfpu.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-08-01 13:48:40 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-08-01 13:48:40 +0000
commitdce1032b6cdc2cd3c4e6b0ca3695aca6558c56c3 (patch)
treee485d78b238db7255395470e037305af8b8a642c /c/src/lib/libbsp/lm32/shared/milkymist_pfpu/milkymist_pfpu.h
parent2011-08-01 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff)
downloadrtems-dce1032b6cdc2cd3c4e6b0ca3695aca6558c56c3.tar.bz2
2011-08-01 Sebastien Bourdeauducq <sebastien.bourdeauducq@gmail.com>
PR 1869/bsps * startup/bspclean.c: New file. * include/tm27.h: Removed. * ChangeLog, Makefile.am, README, preinstall.am, include/bsp.h, include/system_conf.h, make/custom/milkymist.cfg, startup/linkcmds: Complete BSP for Milkymist One supporting Milkymist SOC 1.0.x. Includes new or updated drivers for: - Multi-standard video input (PAL/SECAM/NTSC) - Two DMX512 (RS485) ports - MIDI IN and MIDI OUT ports - VGA output - AC'97 audio - NOR flash - 10/100 Ethernet - Memory card (experimental and incomplete) - USB host connectors (input devices only) - RC5 infrared receiver - RS232 debug port
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/lm32/shared/milkymist_pfpu/milkymist_pfpu.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/lm32/shared/milkymist_pfpu/milkymist_pfpu.h b/c/src/lib/libbsp/lm32/shared/milkymist_pfpu/milkymist_pfpu.h
new file mode 100644
index 0000000000..a9c8bd58b9
--- /dev/null
+++ b/c/src/lib/libbsp/lm32/shared/milkymist_pfpu/milkymist_pfpu.h
@@ -0,0 +1,57 @@
+/* milkymist_pfpu.h
+ *
+ * Milkymist PFPU driver for RTEMS
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ *
+ * COPYRIGHT (c) 2010 Sebastien Bourdeauducq
+ */
+
+#ifndef __MILKYMIST_PFPU_H_
+#define __MILKYMIST_PFPU_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Ioctls */
+#define PFPU_EXECUTE 0x4600
+
+#define PFPU_PROGSIZE (2048)
+#define PFPU_REG_COUNT (128)
+
+struct pfpu_td {
+ unsigned int *output;
+ unsigned int hmeshlast;
+ unsigned int vmeshlast;
+ unsigned int *program;
+ unsigned int progsize;
+ float *registers;
+ bool update; /* < shall we update the "registers" array after completion */
+ bool invalidate; /* < shall we invalidate L1 data cache after completion */
+};
+
+rtems_device_driver pfpu_initialize(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+rtems_device_driver pfpu_control(
+ rtems_device_major_number major,
+ rtems_device_minor_number minor,
+ void *arg
+);
+
+#define PFPU_DRIVER_TABLE_ENTRY {pfpu_initialize, \
+NULL, NULL, NULL, NULL, pfpu_control}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MILKYMIST_PFPU_H_ */