mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
neuron: ch_haven: Read peer name from device tree
Add support for the primary vm to read the vm peer name from device tree. This information is needed to share memory to the peer vm. Change-Id: I9a38370c8b80480bcdd0988c515adf64b36f99c1 Signed-off-by: Chris Lew <clew@codeaurora.org>
This commit is contained in:
parent
7c177596a8
commit
0fc1e59781
3 changed files with 18 additions and 2 deletions
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/kthread.h>
|
||||
#include <linux/neuron.h>
|
||||
#include <asm-generic/barrier.h>
|
||||
#include <linux/haven/hh_rm_drv.h>
|
||||
#include <linux/haven/hh_dbl.h>
|
||||
#include "ch_mq_shmem_common.h"
|
||||
|
||||
|
|
@ -335,10 +336,16 @@ static int channel_hh_map_memory(struct neuron_mq_data_priv *priv,
|
|||
return -ENXIO;
|
||||
}
|
||||
|
||||
if (of_property_read_bool(dev->of_node, "qcom,primary"))
|
||||
if (of_property_read_bool(dev->of_node, "qcom,primary")) {
|
||||
memset(priv->base, 0,
|
||||
sizeof(struct neuron_shmem_channel_header));
|
||||
|
||||
ret = of_property_read_u32(dev->of_node, "peer-name",
|
||||
&priv->peer_name);
|
||||
if (ret)
|
||||
priv->peer_name = HH_SELF_VM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/kthread.h>
|
||||
#include <linux/neuron.h>
|
||||
#include <asm-generic/barrier.h>
|
||||
#include <linux/haven/hh_rm_drv.h>
|
||||
#include <linux/haven/hh_dbl.h>
|
||||
#include "ch_mq_shmem_common.h"
|
||||
|
||||
|
|
@ -320,10 +321,16 @@ static int channel_hh_map_memory(struct neuron_mq_data_priv *priv,
|
|||
return -ENXIO;
|
||||
}
|
||||
|
||||
if (of_property_read_bool(dev->of_node, "qcom,primary"))
|
||||
if (of_property_read_bool(dev->of_node, "qcom,primary")) {
|
||||
memset(priv->base, 0,
|
||||
sizeof(struct neuron_shmem_channel_header));
|
||||
|
||||
ret = of_property_read_u32(dev->of_node, "peer-name",
|
||||
&priv->peer_name);
|
||||
if (ret)
|
||||
priv->peer_name = HH_SELF_VM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@ struct neuron_mq_data_priv {
|
|||
atomic64_t virq_payload;
|
||||
/* A counter to calculate the interrupt received. */
|
||||
u32 interrupt_counter;
|
||||
/* name of peer vm */
|
||||
u32 peer_name;
|
||||
/* haven tx doorbell descriptor */
|
||||
void *tx_dbl;
|
||||
/* haven rx doorbell descriptor */
|
||||
|
|
|
|||
Loading…
Reference in a new issue