From patchwork Tue Oct 1 11:56:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Raghavendra X-Patchwork-Id: 1169865 X-Patchwork-Delegate: lukma@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="uJVn6rAr"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46jHrL2QnPz9sN1 for ; Tue, 1 Oct 2019 21:59:46 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 08CE7C21C3F; Tue, 1 Oct 2019 11:58:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EE45EC21DCA; Tue, 1 Oct 2019 11:58:20 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 51731C21C3F; Tue, 1 Oct 2019 11:56:48 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lists.denx.de (Postfix) with ESMTPS id 07290C21D4A for ; Tue, 1 Oct 2019 11:56:45 +0000 (UTC) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x91Bugv5078750; Tue, 1 Oct 2019 06:56:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569931003; bh=wzAhe/lhgl1ylAUnuQU3p8nZLvGtlbSa0EQeut8xxgM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=uJVn6rArd7etCO6TPG3Z3Vx9NM5El0wusu5w+EOvFSJGbE+datCu+HkZ1zy5QZ+Mm 4PdvlJoJcHcsJK8zrhbapuyRGVxk7u7IFxWmAHrTMyw385xOMBBi8m7Xwt9tZxazgI 6t+LHnpyUf2Ey+4ZV8Fg9PcJKVWk7CRcENw+U7yA= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x91Bug3K028961 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 1 Oct 2019 06:56:42 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 1 Oct 2019 06:56:42 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 1 Oct 2019 06:56:42 -0500 Received: from a0132425.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x91BuF0o019461; Tue, 1 Oct 2019 06:56:40 -0500 From: Vignesh Raghavendra To: Marek Vasut , Lukasz Majewski Date: Tue, 1 Oct 2019 17:26:36 +0530 Message-ID: <20191001115636.21052-9-vigneshr@ti.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191001115636.21052-1-vigneshr@ti.com> References: <20191001115636.21052-1-vigneshr@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: Tom Rini , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 8/8] usb: gadget: Add gadget_is_cdns3() macro X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add a new bcdDevice entry for Cadence USB gadget controller similar to other controller and add gadget_is_cdns3() macro as well. Signed-off-by: Vignesh Raghavendra --- drivers/usb/gadget/gadget_chips.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h index 2c8f235d51c8..91b0285244ec 100644 --- a/drivers/usb/gadget/gadget_chips.h +++ b/drivers/usb/gadget/gadget_chips.h @@ -149,6 +149,12 @@ #define gadget_is_dwc3(g) 0 #endif +#ifdef CONFIG_USB_CDNS3_GADGET +#define gadget_is_cdns3(g) (!strcmp("cdns3-gadget", (g)->name)) +#else +#define gadget_is_cdns3(g) 0 +#endif + /** * usb_gadget_controller_number - support bcdDevice id convention * @gadget: the controller being driven @@ -208,5 +214,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) return 0x22; else if (gadget_is_dwc3(gadget)) return 0x23; + else if (gadget_is_cdns3(gadget)) + return 0x24; return -ENOENT; }