#define VCHIQ_PLATFORM_FRAGMENTS_COUNT_IDX 1
#define BELL0 0x00
-#define BELL2 0x08
#define ARM_DS_ACTIVE BIT(2)
return (struct vchiq_arm_state *)state->platform_state;
}
-void
-remote_event_signal(struct vchiq_state *state, struct remote_event *event)
-{
- struct vchiq_drv_mgmt *mgmt = dev_get_drvdata(state->dev);
-
- /*
- * Ensure that all writes to shared data structures have completed
- * before signalling the peer.
- */
- wmb();
-
- event->fired = 1;
-
- dsb(sy); /* data barrier operation */
-
- if (event->armed)
- writel(0, mgmt->regs + BELL2); /* trigger vc interrupt */
-}
int
vchiq_prepare_bulk_data(struct vchiq_instance *instance, struct vchiq_bulk *bulk, void *offset,
#include <linux/completion.h>
#include <linux/mutex.h>
#include <linux/bitops.h>
+#include <linux/io.h>
#include <linux/kthread.h>
#include <linux/wait.h>
#include <linux/delay.h>
#define MAKE_REMOTE_USE (VCHIQ_MSG_REMOTE_USE << TYPE_SHIFT)
#define MAKE_REMOTE_USE_ACTIVE (VCHIQ_MSG_REMOTE_USE_ACTIVE << TYPE_SHIFT)
+#define BELL2 0x08
+
/* Ensure the fields are wide enough */
static_assert(VCHIQ_MSG_SRCPORT(VCHIQ_MAKE_MSG(0, 0, VCHIQ_PORT_MAX))
== 0);
return ret;
}
+static void
+remote_event_signal(struct vchiq_state *state, struct remote_event *event)
+{
+ struct vchiq_drv_mgmt *mgmt = dev_get_drvdata(state->dev);
+
+ /*
+ * Ensure that all writes to shared data structures have completed
+ * before signalling the peer.
+ */
+ wmb();
+
+ event->fired = 1;
+
+ dsb(sy); /* data barrier operation */
+
+ if (event->armed)
+ writel(0, mgmt->regs + BELL2); /* trigger vc interrupt */
+}
+
/*
* Acknowledge that the event has been signalled, and wake any waiters. Usually
* called as a result of the doorbell being rung.
void vchiq_complete_bulk(struct vchiq_instance *instance, struct vchiq_bulk *bulk);
-void remote_event_signal(struct vchiq_state *state, struct remote_event *event);
-
void vchiq_dump_platform_state(struct seq_file *f);
void vchiq_dump_platform_instances(struct vchiq_state *state, struct seq_file *f);