Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751391AbdFYUPu (ORCPT ); Sun, 25 Jun 2017 16:15:50 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:35909 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751358AbdFYUPt (ORCPT ); Sun, 25 Jun 2017 16:15:49 -0400 Date: Sun, 25 Jun 2017 13:15:45 -0700 From: Bjorn Andersson To: Suman Anna Cc: Ohad Ben-Cohen , Rob Herring , Santosh Shilimkar , Mark Rutland , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, "Andrew F. Davis" , Sam Nelson Subject: Re: [PATCH v3 2/3] remoteproc/keystone: Add a remoteproc driver for Keystone 2 DSPs Message-ID: <20170625201545.GA26155@builder> References: <20170613234513.7624-1-s-anna@ti.com> <20170613234513.7624-3-s-anna@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170613234513.7624-3-s-anna@ti.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1687 Lines: 56 On Tue 13 Jun 16:45 PDT 2017, Suman Anna wrote: > +static int keystone_rproc_start(struct rproc *rproc) > +{ > + struct keystone_rproc *ksproc = rproc->priv; > + int ret; > + > + INIT_WORK(&ksproc->workqueue, handle_event); > + > + ret = request_irq(ksproc->irq_ring, keystone_rproc_vring_interrupt, 0, > + dev_name(ksproc->dev), ksproc); > + if (ret) { > + dev_err(ksproc->dev, "failed to enable vring interrupt, ret = %d\n", > + ret); > + goto out; > + } > + > + ret = request_irq(ksproc->irq_fault, keystone_rproc_exception_interrupt, > + 0, dev_name(ksproc->dev), ksproc); > + if (ret) { > + dev_err(ksproc->dev, "failed to enable exception interrupt, ret = %d\n", > + ret); > + goto free_vring_irq; > + } I do prefer that your request any resources during probe() and potentially enable/disable them here. If below concern about using a GPIO driver is cleared already I'll take it as is though. [..] > +static void keystone_rproc_kick(struct rproc *rproc, int vqid) > +{ > + struct keystone_rproc *ksproc = rproc->priv; > + > + if (WARN_ON(ksproc->kick_gpio < 0)) > + return; > + > + gpio_set_value(ksproc->kick_gpio, 1); > +} > + This doesn't sound like a gpio-controller and the GPIO maintainer did reject an attempt by me to use the GPIO framework to abstract a similar thing. Do you already have this driver upstream or have you clarified with the maintainer that the GPIO framework is an acceptable abstraction for this? It looks equivalent to the "APCS IPC" register found in Qualcomm platforms, previously implemented through a syscon but in v4.13 being pushed to being a mailbox driver. Apart from this I think the series looks good. Regards, Bjorn