Message ID | 1537530804-19399-8-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Geert Uytterhoeven |
Headers | show
Return-Path: <linux-renesas-soc-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77C7D14BD for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 21 Sep 2018 11:55:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67C522CC66 for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 21 Sep 2018 11:55:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BD672D9A0; Fri, 21 Sep 2018 11:55:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E31B12CC66 for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 21 Sep 2018 11:55:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390123AbeIURn7 (ORCPT <rfc822;patchwork-linux-renesas-soc@patchwork.kernel.org>); Fri, 21 Sep 2018 13:43:59 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:28767 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389933AbeIURn6 (ORCPT <rfc822;linux-renesas-soc@vger.kernel.org>); Fri, 21 Sep 2018 13:43:58 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 21 Sep 2018 20:55:23 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id B2FA473191; Fri, 21 Sep 2018 20:55:23 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="291574206" Received: from mail-ty1jpn01lp0182.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.182]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Sep 2018 20:55:23 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XUbvDZYLb/kT8Eb0iW4DhZgbXf2vzyxLYkTo01MSDUc=; b=EgtsO7gKeKYcTIDNdtGOI4AjFHAZ8GJqB30Pi6ubPOh2Sp7SUcIrHu1hFjfgcm++OaIKQguWKEdCCG/a+2tMvVlT/uQ9iPd3vVCPXCFkNG10FmxDbcOtyiuXAsGbggCdFq9ekX846CyF/wPVYPdIW/aHnJsW7Oik2TplC98hvZE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 11:55:22 +0000 From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> To: kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Subject: [PATCH 7/8] phy: renesas: rcar-gen3-usb2: add conditions for uses_otg_pins == false Date: Fri, 21 Sep 2018 20:53:23 +0900 Message-Id: <1537530804-19399-8-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR01CA0065.jpnprd01.prod.outlook.com (2603:1096:403:a::35) To OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e3be216-c74c-44b4-9941-08d61fb91c49 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2296; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;3:dwrmM0JIbHkp4j7D1Zm1RE63ELb+Ok//MWBi+JW1osskU3c4kB7apTYGwAPYMKRSxlMwIwvgwrQWUGVA8jk3EFeXrR/NIrzE/aDhCl9tQyOGuN7/dClB3RKKq5KzDm/ZR2RVPk4HdQqcDiwGobkRk7g87HzRn4VPABZ9y9Nc2iGr2XBbvKYkkDnKl3AYkMcbbapfCTRgs28VDRY1Hp5z5TmO7Dl55VGkOtOzfsb/wW21gF/wnKFl1vO7SVrtU7tI;25:U4D3RhQmrApZCyzoObeDd4dJqam50mlioJgPGQPslMeVGRhr5VidZoOHdOBwjW7kgkxa33FYMYHxtRKg+xBrOinrWhIuR6SWNTuBYqAlO8r3CPVHVz8qYrqnLW3+7C60CeIeG0R3HE04MBO/KxDPyKZ1HOg46KND4hDLiJNlVo4WuQow87WB8vcb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CR2cZJtMgZnJhmefJKTNYNvCiFkiE3WYL0yKzm+XrvfsNgsCBItIN2Xqw/qJTVC/oL/XEPpIhYY7UozvcGIXdj1S9WpZvE7V0XISx1QBk+PdZoccBrBKV0EnaeXiYTbUUg2xMaEP7H8e9+GEgoCoE3DYxwGoEEHEbUuDRUShNwEqbDek3MttsAV7vc0IEJA8q7rJyEUECfA== X-Microsoft-Antispam-PRVS: <OSBPR01MB229680EBA6CD70A1B9A8BAA3B8120@OSBPR01MB2296.jpnprd01.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051);SRVR:OSBPR01MB2296;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2296; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(376002)(39860400002)(136003)(396003)(366004)(199004)(189003)(66066001)(4326008)(52116002)(107886003)(6512007)(486006)(6506007)(42882007)(51416003)(386003)(47776003)(78352004)(476003)(26005)(6486002)(105586002)(11346002)(956004)(2616005)(53936002)(446003)(36756003)(76176011)(69590400006)(16526019)(25786009)(97736004)(50466002)(81166006)(5660300001)(50226002)(16586007)(8676002)(6116002)(3846002)(81156014)(68736007)(316002)(48376002)(14444005)(106356001)(498600001)(8936002)(305945005)(2906002)(7736002)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2296;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagn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wK95gCdAzMbg==;5:NEiNp7hgcB5Xcm6gqjlczfk42i9A1xVr5xqXUUna9WDdEjfyNwDBs+Ja1tyKzjybahytXzdyBOAlZcANVPCJzRLNoj6SNI+iKQOsF+/LHHbKhTm5xE0xo5pHdIsBHXsqh2ZccZGl4vSEReJ5BotFZyBXYT70VJbxwSmhuXAewwo=;7:Bn0w7g8CG+qBARtVgkxwaXFy2oMi+3SacrBXsGXXA6+2LWXOA1fY5XyxRiFueNxyBDjg+gXfU3F/5fKSmOI1TjB4PAHNn9q8rcKQWaxSZkp2vcIfiBXAOnZlJlZ4q+ZX/Y6/zpk9ZmbfYIrxJAs0KYb7ACwLNmiBXDGOjOn6z7lIy2a7F7HOKh7wpEXquWAGcwINaLV19R04wOda6ERrKSGggdVdd8BH2d3hn5/KnRkFbqh4tsFt8/VS51HIZ/y7 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;20:kZx5/CxJHoXw4XFBIwaXzBmYLh+yzMUQbu/XeNGFxJZgDDL0NBhcQNySQYq7U80Ec7kZggKFDmWFHiSKmI2Yb7O54keybBVJPqloYc8o9HMdPvnJNeHxa7Yynm1Pw5ZL4aeWrKFNIKzmaI5bSPbys1oE93W8srhnrd3kAN072hM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 11:55:22.2119 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e3be216-c74c-44b4-9941-08d61fb91c49 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2296 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: <linux-renesas-soc.vger.kernel.org> X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
phy: renesas: rcar-gen3-usb2: re-design for all R-Car Gen3 SoCs
|
expand
|
On Fri, Sep 21, 2018 at 08:53:23PM +0900, Yoshihiro Shimoda wrote: > If uses_otg_pins is set to false, this driver 1) should disable otg > related interruptions, and 2) should not get ID pin signal, to avoid > unexpected behaviors. So, this patch adds conditions for it. > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index 93ab860..3f2efe5 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -148,7 +148,7 @@ static void rcar_gen3_control_otg_irq(struct rcar_gen3_chan *ch, int enable) void __iomem *usb2_base = ch->base; u32 val = readl(usb2_base + USB2_OBINTEN); - if (enable) + if (ch->uses_otg_pins && enable) val |= USB2_OBINT_BITS; else val &= ~USB2_OBINT_BITS; @@ -210,6 +210,9 @@ static void rcar_gen3_init_from_a_peri_to_a_host(struct rcar_gen3_chan *ch) static bool rcar_gen3_check_id(struct rcar_gen3_chan *ch) { + if (!ch->uses_otg_pins) + return (ch->dr_mode == USB_DR_MODE_HOST) ? false : true; + return !!(readl(ch->base + USB2_ADPCTRL) & USB2_ADPCTRL_IDDIG); }
If uses_otg_pins is set to false, this driver 1) should disable otg related interruptions, and 2) should not get ID pin signal, to avoid unexpected behaviors. So, this patch adds conditions for it. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)