Thread (6 messages) 6 messages, 2 authors, 2020-12-09

Re: [PATCH V5 2/2] mailbox: arm_mhuv2: Add driver

From: Jassi Brar <jassisinghbrar@gmail.com>
Date: 2020-11-20 19:07:25
Also in: lkml

On Tue, Nov 17, 2020 at 4:02 AM Viresh Kumar [off-list ref] wrote:
+
+/**
+ * struct mhuv2 - MHUv2 mailbox controller data
+ *
+ * @mbox:      Mailbox controller belonging to the MHU frame.
+ * @send/recv: Base address of the register mapping region.
+ * @frame:     Frame type: RECEIVER_FRAME or SENDER_FRAME.
+ * @irq:       Interrupt.
+ * @windows:   Channel windows implemented by the platform.
+ * @minor:     Minor version of the controller.
+ * @length:    Length of the protocols array in bytes.
+ * @protocols: Raw protocol information, derived from device tree.
+ * @doorbell_pending_lock: spinlock required for correct operation of Tx
+ *             interrupt for doorbells.
+ */
+struct mhuv2 {
+       struct mbox_controller mbox;
+       union {
+               struct mhu2_send_frame_reg __iomem *send;
+               struct mhu2_recv_frame_reg __iomem *recv;
+       };
+       enum mhuv2_frame frame;
+       unsigned int irq;
+       unsigned int windows;
+       unsigned int minor;
+       unsigned int length;
+       u32 *protocols;
+
+       spinlock_t doorbell_pending_lock;
Can you please explain the need of this lock? Some usecase?
It should be unnecessary if the controller natively supports doorbell mode.

thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help