summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/galileo-boards/evb64120A/i2o.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/galileo-boards/evb64120A/i2o.h')
-rw-r--r--include/asm-mips/galileo-boards/evb64120A/i2o.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/include/asm-mips/galileo-boards/evb64120A/i2o.h b/include/asm-mips/galileo-boards/evb64120A/i2o.h
new file mode 100644
index 000000000..a42ecabfe
--- /dev/null
+++ b/include/asm-mips/galileo-boards/evb64120A/i2o.h
@@ -0,0 +1,61 @@
+/* i2o.h - Header file for the I2O`s interface */
+
+/* Copyright - Galileo technology. */
+
+#ifndef __INCi2oh
+#define __INCi2oh
+
+/* includes */
+
+#include "core.h"
+
+/* typedefs */
+
+typedef enum _i2oMessageReg{MESSAGE_REG_0,MESSAGE_REG_1} I2O_MESSAGE_REG;
+typedef enum _cirQueSize{I20_16K = 0x1,I20_32K = 0x2,I20_64K = 0x4,\
+ I20_128K = 0x8,I20_256K = 0xc} CIRCULAR_QUEUE_SIZE;
+
+/* Message handle Functions */
+unsigned int getInBoundMassege(I2O_MESSAGE_REG messageRegNum);
+bool sendOutBoundMassege(I2O_MESSAGE_REG messageRegNum,unsigned int message);
+bool checkInBoundIntAndClear(I2O_MESSAGE_REG messageRegNum);
+bool outBoundMessageAcknowledge(I2O_MESSAGE_REG messageRegNum);
+bool maskInBoundMessageInterrupt(I2O_MESSAGE_REG messageRegNum);
+bool enableInBoundMessageInterrupt(I2O_MESSAGE_REG messageRegNum);
+bool maskOutBoundMessageInterrupt(I2O_MESSAGE_REG messageRegNum);
+bool enableOutBoundMessageInterrupt(I2O_MESSAGE_REG messageRegNum);
+
+/* Doorbell handle Functions */
+unsigned int readInBoundDoorBellInt(void);
+bool initiateOutBoundDoorBellInt(unsigned int interruptBits);
+bool clearInBoundDoorBellInt(unsigned int interruptBits);
+bool isInBoundDoorBellInterruptSet(void);
+bool isOutBoundDoorBellInterruptSet(void); /* For acknowledge */
+bool maskInBoundDoorBellInterrupt(void);
+bool enableInBoundDoorBellInterrupt(void);
+bool maskOutBoundDoorBellInterrupt(void);
+bool enableOutBoundDoorBellInterrupt(void);
+
+/* I2O - Circular Queues handle Functions */
+
+/* initialization */
+bool circularQueueEnable(CIRCULAR_QUEUE_SIZE cirQueSize,
+ unsigned int queueBaseAddr);
+
+/* Inbound Post Queue */
+unsigned int inBoundPostQueuePop(void);
+bool isInBoundPostQueueInterruptSet(void);
+bool clearInBoundPostQueueInterrupt(void);
+void maskInBoundPostQueueInterrupt(void);
+void enableInBoundPostQueueInterrupt(void);
+/* Outbound Post Queue */
+bool outBoundPostQueuePush(unsigned int data);
+bool isOutBoundPostQueueEmpty(void);
+/* Inbound Free Queue */
+bool inBoundFreeQueuePush(unsigned int data);
+bool isInBoundFreeQueueEmpty(void);
+/* Outbound Free Queue */
+unsigned int outBoundFreeQueuePop(void);
+
+#endif /* __INCi2oh */
+