git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move msi-related functionality to generic isrm
[lunaix-os.git]
/
lunaix-os
/
arch
/
generic
/
includes
/
asm-generic
/
isrm.h
diff --git
a/lunaix-os/arch/generic/includes/asm-generic/isrm.h
b/lunaix-os/arch/generic/includes/asm-generic/isrm.h
index 7e319b5a02f66859bf2700a63514bed479b9daf9..e8117bb4ed7f350e9c530a45b29adc259f9b1dd2 100644
(file)
--- a/
lunaix-os/arch/generic/includes/asm-generic/isrm.h
+++ b/
lunaix-os/arch/generic/includes/asm-generic/isrm.h
@@
-14,8
+14,19
@@
#include <lunaix/types.h>
#include <lunaix/hart_state.h>
#include <lunaix/types.h>
#include <lunaix/hart_state.h>
+#include <hal/devtree.h>
+
typedef void (*isr_cb)(const struct hart_state*);
typedef void (*isr_cb)(const struct hart_state*);
+typedef struct {
+ ptr_t msi_addr;
+ reg_t msi_data;
+ int mapped_iv;
+} msi_vector_t;
+#define msi_addr(msiv) ((msiv).msi_addr)
+#define msi_data(msiv) ((msiv).msi_data)
+#define msi_vect(msiv) ((msiv).mapped_iv)
+
void
isrm_init();
void
isrm_init();
@@
-44,21
+55,20
@@
int
isrm_ivexalloc(isr_cb handler);
/**
isrm_ivexalloc(isr_cb handler);
/**
- * @brief
Bind a given irq and associated handler to an iv
+ * @brief
Allocate an iv resource for MSI use
*
*
- * @param iv
iv allocated by system
+ * @param iv
*/
*/
-
in
t
-isrm_
bindirq(int irq, isr_cb irq_
handler);
+
msi_vector_
t
+isrm_
msialloc(isr_cb
handler);
/**
/**
- * @brief Bind
given iv with it's associated handler
+ * @brief Bind
the iv according to given device tree node
*
*
- * @param iv
- * @param handler
+ * @param node
*/
*/
-void
-isrm_bind
iv(int iv, isr_cb handler
);
+int
+isrm_bind
_dtnode(struct dt_intr_node* node
);
/**
* @brief Get the handler associated with the given iv
/**
* @brief Get the handler associated with the given iv
@@
-75,9
+85,6
@@
isrm_get_payload(const struct hart_state*);
void
isrm_set_payload(int iv, ptr_t);
void
isrm_set_payload(int iv, ptr_t);
-void
-isrm_irq_attach(int irq, int iv, cpu_t dest, u32_t flags);
-
/**
* @brief Notify end of interrupt event
*
/**
* @brief Notify end of interrupt event
*