Thread (74 messages) 74 messages, 6 authors, 2018-08-09

Re: [PATCH v7 6/6] mailbox: Add support for i.MX7D messaging unit

From: Oleksij Rempel <o.rempel@pengutronix.de>
Date: 2018-07-26 10:51:40
Also in: linux-arm-kernel, linux-mediatek


On 26.07.2018 12:15, Jassi Brar wrote:
On Thu, Jul 26, 2018 at 12:23 PM, Oleksij Rempel
[off-list ref] wrote:

.....
quoted
+
+/* Control Register */
+#define IMX_MU_xCR             0x24
+/* Transmit Interrupt Enable */
+#define IMX_MU_xCR_TIEn(x)     BIT(20 + (3 - (x)))
+/* Receive Interrupt Enable */
+#define IMX_MU_xCR_RIEn(x)     BIT(24 + (3 - (x)))
+
+#define IMX_MU_CHANS   4u
+
The 'u' unnecessarily refreshes my knowledge of C  :)
ok
quoted
+struct imx_mu_con_priv {
+       int                     irq;
+       unsigned int            idx;
+       char                    *irq_desc;
Having      char  irq_desc[16];    seems simpler than free/kfree upon
each startup/shutdown. Simply use snprintf() in probe().
Currently all known configurations use one or two channels. I don't see
any sense to allocate all at the probe.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help