From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sudeep Holla Subject: Re: [PATCH v7 2/7] mailbox: arm_mhu: add driver for ARM MHU controller Date: Wed, 18 Mar 2015 10:25:27 +0000 Message-ID: <55095297.5060605@arm.com> References: <1425466367-30556-1-git-send-email-vincent.yang@socionext.com> <1425466884-30648-1-git-send-email-vincent.yang@socionext.com> Mime-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <1425466884-30648-1-git-send-email-vincent.yang-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Vincent Yang , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" Cc: Sudeep Holla , "arnd-r2nGTMty4D4@public.gmane.org" , "olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org" , "arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org" , "robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , Pawel Moll , Mark Rutland , "ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org" , "galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org" , "andy.green-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "jaswinder.singh-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , Vincent Yang , Tetsuya Nuriya List-Id: devicetree@vger.kernel.org Hi Vincent, Forgot couple of things earlier: On 04/03/15 11:01, Vincent Yang wrote: > From: Jassi Brar > > Add driver for the ARM Primecell Message-Handling-Unit(MHU) controller. > > Signed-off-by: Jassi Brar > Signed-off-by: Andy Green > Signed-off-by: Vincent Yang > Signed-off-by: Tetsuya Nuriya > --- > .../devicetree/bindings/mailbox/arm-mhu.txt | 43 +++++ > drivers/mailbox/Kconfig | 9 + > drivers/mailbox/Makefile | 2 + > drivers/mailbox/arm_mhu.c | 195 +++++++++++++++++++++ > 4 files changed, 249 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/arm-mhu.txt > create mode 100644 drivers/mailbox/arm_mhu.c > [...] > +static int mhu_send_data(struct mbox_chan *chan, void *data) > +{ > + struct mhu_link *mlink = chan->con_priv; > + u32 *arg = data; > + Arnd doesn't like this and had suggestions in some other thread. > + writel_relaxed(*arg, mlink->tx_reg + INTR_SET_OFS); > + > + return 0; > +} > + > +static int mhu_startup(struct mbox_chan *chan) > +{ > + struct mhu_link *mlink = chan->con_priv; > + u32 val; > + int ret; > + > + val = readl_relaxed(mlink->tx_reg + INTR_STAT_OFS); > + writel_relaxed(val, mlink->tx_reg + INTR_CLR_OFS); > + > + ret = request_irq(mlink->irq, mhu_rx_interrupt, > + IRQF_SHARED, "mhu_link", chan); Any reason we can't move this to probe and have {en,dis}able_irq here if needed. I has seen it was too heavy to have these especially when sending small packets. Regards, Sudeep -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html