From patchwork Wed Nov 12 14:39:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 40677 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6E85324493 for ; Wed, 12 Nov 2014 14:38:51 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id b6sf1466329lbj.8 for ; Wed, 12 Nov 2014 06:38:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=nzQHv586QQ8IK4trnmZZNeX2YpSWjlwDACPqhRiN450=; b=Wtg69ozCZYjWnYHYFV1VJkXZR/l0ERmlw+P922iKAcVscn70hZ52gwnXB+8n9Yl1hq f1q5gY7lN7tABjEWmBZm4KYbgSgarrtYAzGNZk7ONFfOltTN5owTJcXMV8EWpqV82l8r 7m69f4N51cgQJs7cOTrDls1wKqRfCbKqQaGNgtz1tdQLCMoAD5zVn7A3OLg+t8/T20tS Q6Kh67gMUOwBAgur9oSeY6qYNfNqXA/ozedhNq+0dRnV+nXFncww/JuB0navY4/Xrlzi 7Do9g5MXVBQrtiLgAGVKLZnKRwqSYXd+cEJORmbuUJvVd/nf90AasBhKz56BjI6GHWe3 uO3w== X-Gm-Message-State: ALoCoQlmAPoNZzjuwWYJKPwfci3DSUP9mSj5es7mTURaWprgLD53kLFJ48oddQeLppos/gCfsgE+ X-Received: by 10.180.94.3 with SMTP id cy3mr6708114wib.7.1415803130254; Wed, 12 Nov 2014 06:38:50 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.5.43 with SMTP id cj11ls687723lad.85.gmail; Wed, 12 Nov 2014 06:38:49 -0800 (PST) X-Received: by 10.152.19.37 with SMTP id b5mr2925566lae.80.1415803129928; Wed, 12 Nov 2014 06:38:49 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id ej7si35207577lad.34.2014.11.12.06.38.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Nov 2014 06:38:49 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id gq15so11257174lab.7 for ; Wed, 12 Nov 2014 06:38:49 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr42179401lbo.32.1415803129835; Wed, 12 Nov 2014 06:38:49 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp434387lbc; Wed, 12 Nov 2014 06:38:48 -0800 (PST) X-Received: by 10.70.135.196 with SMTP id pu4mr48283181pdb.43.1415803127968; Wed, 12 Nov 2014 06:38:47 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si443878pdo.45.2014.11.12.06.38.47 for ; Wed, 12 Nov 2014 06:38:47 -0800 (PST) Received-SPF: none (google.com: linux-usb-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752760AbaKLOip (ORCPT + 3 others); Wed, 12 Nov 2014 09:38:45 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:60969 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752628AbaKLOip (ORCPT ); Wed, 12 Nov 2014 09:38:45 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id sACEcfDU027217; Wed, 12 Nov 2014 08:38:41 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id sACEcewg028709; Wed, 12 Nov 2014 08:38:40 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Wed, 12 Nov 2014 08:38:40 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id sACEcdoS032476; Wed, 12 Nov 2014 08:38:40 -0600 From: Felipe Balbi To: Linux USB Mailing List CC: , , Felipe Balbi Subject: [PATCH] usb: phy: fsl: Fix build errors Date: Wed, 12 Nov 2014 08:39:06 -0600 Message-ID: <1415803146-6510-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , commit e47d925 (usb: move the OTG state from the USB PHY to the OTG structure) moved the OTG state from struct usb_phy to struct usb_otg. Unfortunately, even though I fixed quite a few build regressions with that patch already, this one was still missing. Note that this driver still has other randconfig build problems which I'll leave for driver author to fix, as that's less trivial. Reported-by: Fengguang Wu Signed-off-by: Felipe Balbi --- The following build error are left for Freescale folks since they seem to be a broken for quite a long time. drivers/usb/phy/phy-fsl-usb.c: In function ‘usb_otg_start’: drivers/usb/phy/phy-fsl-usb.c:918:3: error: ‘_fsl_readl’ undeclared (first use in this function) _fsl_readl = _fsl_readl_be; ^ drivers/usb/phy/phy-fsl-usb.c:918:3: note: each undeclared identifier is reported only once for each function it appears in drivers/usb/phy/phy-fsl-usb.c:918:16: error: ‘_fsl_readl_be’ undeclared (first use in this function) _fsl_readl = _fsl_readl_be; ^ drivers/usb/phy/phy-fsl-usb.c:919:3: error: ‘_fsl_writel’ undeclared (first use in this function) _fsl_writel = _fsl_writel_be; ^ drivers/usb/phy/phy-fsl-usb.c:919:17: error: ‘_fsl_writel_be’ undeclared (first use in this function) _fsl_writel = _fsl_writel_be; ^ drivers/usb/phy/phy-fsl-usb.c:921:16: error: ‘_fsl_readl_le’ undeclared (first use in this function) _fsl_readl = _fsl_readl_le; ^ drivers/usb/phy/phy-fsl-usb.c:922:17: error: ‘_fsl_writel_le’ undeclared (first use in this function) _fsl_writel = _fsl_writel_le; ^ drivers/usb/phy/phy-fsl-usb.c | 14 +++++++------- drivers/usb/phy/phy-fsl-usb.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c index b7f36b2..ab38aa3 100644 --- a/drivers/usb/phy/phy-fsl-usb.c +++ b/drivers/usb/phy/phy-fsl-usb.c @@ -274,7 +274,7 @@ void b_srp_end(unsigned long foo) fsl_otg_dischrg_vbus(0); srp_wait_done = 1; - if ((fsl_otg_dev->phy.state == OTG_STATE_B_SRP_INIT) && + if ((fsl_otg_dev->phy.otg->state == OTG_STATE_B_SRP_INIT) && fsl_otg_dev->fsm.b_sess_vld) fsl_otg_dev->fsm.b_srp_done = 1; } @@ -624,7 +624,7 @@ static int fsl_otg_set_host(struct usb_otg *otg, struct usb_bus *host) /* Mini-A cable connected */ struct otg_fsm *fsm = &otg_dev->fsm; - otg.state = OTG_STATE_UNDEFINED; + otg->state = OTG_STATE_UNDEFINED; fsm->protocol = PROTO_UNDEF; } } @@ -682,7 +682,7 @@ static int fsl_otg_set_power(struct usb_phy *phy, unsigned mA) { if (!fsl_otg_dev) return -ENODEV; - if (phy->otg.state == OTG_STATE_B_PERIPHERAL) + if (phy->otg->state == OTG_STATE_B_PERIPHERAL) pr_info("FSL OTG: Draw %d mA\n", mA); return 0; @@ -715,7 +715,7 @@ static int fsl_otg_start_srp(struct usb_otg *otg) { struct fsl_otg *otg_dev; - if (!otg || otg.state != OTG_STATE_B_IDLE) + if (!otg || otg->state != OTG_STATE_B_IDLE) return -ENODEV; otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); @@ -990,10 +990,10 @@ int usb_otg_start(struct platform_device *pdev) * Also: record initial state of ID pin */ if (fsl_readl(&p_otg->dr_mem_map->otgsc) & OTGSC_STS_USB_ID) { - p_otg->phy->otg.state = OTG_STATE_UNDEFINED; + p_otg->phy.otg->state = OTG_STATE_UNDEFINED; p_otg->fsm.id = 1; } else { - p_otg->phy->otg.state = OTG_STATE_A_IDLE; + p_otg->phy.otg->state = OTG_STATE_A_IDLE; p_otg->fsm.id = 0; } @@ -1048,7 +1048,7 @@ static int show_fsl_usb2_otg_state(struct device *dev, /* State */ t = scnprintf(next, size, "OTG state: %s\n\n", - usb_otg_state_string(fsl_otg_dev->phy.state)); + usb_otg_state_string(fsl_otg_dev->phy.otg->state)); size -= t; next += t; diff --git a/drivers/usb/phy/phy-fsl-usb.h b/drivers/usb/phy/phy-fsl-usb.h index 5986c96..2314995 100644 --- a/drivers/usb/phy/phy-fsl-usb.h +++ b/drivers/usb/phy/phy-fsl-usb.h @@ -298,7 +298,7 @@ /* SE0 Time Before SRP */ #define TB_SE0_SRP (2) /* b_idle,minimum 2 ms, section:5.3.2 */ -#define SET_OTG_STATE(otg_ptr, newstate) ((otg_ptr)->state = newstate) +#define SET_OTG_STATE(phy, newstate) ((phy)->otg->state = newstate) struct usb_dr_mmap { /* Capability register */