From patchwork Sun Jun 26 07:28:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 70866 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp555149qgy; Sun, 26 Jun 2016 00:30:59 -0700 (PDT) X-Received: by 10.66.254.9 with SMTP id ae9mr22732629pad.2.1466926258952; Sun, 26 Jun 2016 00:30:58 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d3si18120976pay.44.2016.06.26.00.30.58; Sun, 26 Jun 2016 00:30:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752307AbcFZH3S (ORCPT + 30 others); Sun, 26 Jun 2016 03:29:18 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:35619 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752099AbcFZH2v (ORCPT ); Sun, 26 Jun 2016 03:28:51 -0400 Received: by mail-pf0-f171.google.com with SMTP id c2so51926364pfa.2 for ; Sun, 26 Jun 2016 00:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xe/ydX383bnEfFOQ7y0ZaCpoVrb0q/uFKn9t9YsMvQ8=; b=SaYCNrgnWwWpkOdptoEKLE5rGla25WILW3MwxBBNsH6U5q5XFS3WtoNdhjaf64SXhA FWsODnJnkdNHfza059aLYoQdckXkIc8puezP36N/3vclbBjNTqZEHs3dmdFDq2EMLnBv VPXu9gAo6u3hHsHKzvBHzcMK+BePg8k2U1Ji8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xe/ydX383bnEfFOQ7y0ZaCpoVrb0q/uFKn9t9YsMvQ8=; b=X5tRWl3aVvhuv+l2Uoywn3OKThuRFNy9G9wyjQT1aP4+79VR0sbk8+spA2EegdkGBK hMmpSvy+xnZdV4aKhCBVaKmW/rCPuj1b4RB4PexLuxkDS3LZqF1nNnpXIeTu3AM888nm x0HdunSKriJrkmqI6IRVzw55kk2rePGJ2XtuOY2NxVjnYQFwHiZDyJ4pfc9fUeGdUdWS u4sWyin9aHKphDoOgeU5ewZdSyv8UWlw531iOP4QM9W/W6fy2IvBSsoQ3IjVcCSzwQNw QXJBL3i1PTxpz+enGsKW1GLBTHp1+O0r8+6UH7KCmZaeM124pC/PpeBJ6/ejrkCIGpqj S2hA== X-Gm-Message-State: ALyK8tKYAJ7KU6TA8EaavlmYV+OmBjbnx8agPzj7w7XuxE7C880A+4qFalBjnqmVkb5GDf95 X-Received: by 10.98.206.77 with SMTP id y74mr22611548pfg.55.1466926130930; Sun, 26 Jun 2016 00:28:50 -0700 (PDT) Received: from localhost.localdomain (ip68-101-172-78.sd.sd.cox.net. [68.101.172.78]) by smtp.gmail.com with ESMTPSA id f138sm3790495pfa.17.2016.06.26.00.28.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Jun 2016 00:28:50 -0700 (PDT) From: Stephen Boyd To: linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Neil Armstrong , Arnd Bergmann , Felipe Balbi , Peter Chen , Greg Kroah-Hartman Subject: [PATCH 07/21] usb: chipidea: Notify of reset when switching into host mode Date: Sun, 26 Jun 2016 00:28:24 -0700 Message-Id: <20160626072838.28082-8-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.9.0.rc2.8.ga28705d In-Reply-To: <20160626072838.28082-1-stephen.boyd@linaro.org> References: <20160626072838.28082-1-stephen.boyd@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The chipidea/udc.c file sends a CI_HDRC_CONTROLLER_RESET_EVENT to the wrapper drivers when it calls hw_device_reset(), but that function is not called from chipidea/host.c. The intent of this event is to allow the wrapper driver to do any wrapper specific things after the reset bit has been set in the usb command register. Therefore, add this event hook in the host role after we toggle that bit. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- drivers/usb/chipidea/host.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.9.0.rc2.8.ga28705d diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 523c155daea8..3344d3256a60 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -87,6 +87,9 @@ static int ehci_ci_reset(struct usb_hcd *hcd) if (ret) return ret; + if (ci->platdata->notify_event) + ci->platdata->notify_event(ci, CI_HDRC_CONTROLLER_RESET_EVENT); + return ci_platform_configure(ci); }