From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1011DC433F5 for ; Sat, 19 Feb 2022 23:09:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E1F4683C58; Sun, 20 Feb 2022 00:09:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XeNs6OFX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E54C483C5E; Sun, 20 Feb 2022 00:09:13 +0100 (CET) Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4B58C83C64 for ; Sun, 20 Feb 2022 00:09:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=aford173@gmail.com Received: by mail-io1-xd32.google.com with SMTP id w7so11854883ioj.5 for ; Sat, 19 Feb 2022 15:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Iw4XvxrYROS6GTqjqby9efAEGWx7OI7uPApYTOEc0SE=; b=XeNs6OFXfAjvizHFvlLzNWn1N0vZi7YGuu2rpPq0rzL9vyesf0d2TLaltZ2F4H8teM /4A1z08kf1mwtRnTjRO6eqG+Ms9felZJcPrHgHwwtVH6ThbmpC4XVS16WwzeQusdzOr1 +HvbpjfNtqVL1E7/LyG7wTqy+weasb5C/0FEdWETx7SEwLeUBpHUiiS5SVjto2SRDekK RDHVffyTXCVrnah5uebzhZTm7YKJE7NzqfqpeIm896jyTRHRXpoDAfkOomesTt9fhsEl 6svpMY9mJoOWfWBsMzoQ5J9HngOzQVhX+AF19AhdGx6j7oSm1geeB6yvuIp2lGPSn84o w4sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Iw4XvxrYROS6GTqjqby9efAEGWx7OI7uPApYTOEc0SE=; b=V1k9BEjo4N91bQ1+6v0MrPZGQaSgICZSvoSs6dDLWqNTsr9CIWqpF1iUst6KiNT5Mp ssrEx8huhBdviLAtQgxQo8E6QQtxhaK7G924RaTtnTclESbn3+xPbHJzfPhAaihE25Fq x7fTuIeZCnpndftmddOldsvWD1jTI7P8DUPkx4lDYnBqis5G0OqTeA+UQR/ez1u/XvjJ ZnYhBZH+5DqsSSgCx6wO18NgqmX7nawp6PRPBYAUXKMd1QY0bzQFi5xnES1eGj/O/9PA ieYsMxn2O69u+D4xhkvHCFT4SfgCHPSGRCBMSiWrUJWlwSZ7oj+NhKxUhRX1bgkKJUSt wqlw== X-Gm-Message-State: AOAM530AfOGXtT/nQBlGu7HfYbFOCQ0uvtEIGXyvagImGJm9uElB8AzG LJy9d7jJ/2yuygEM2ajaRcOD0/5KpKxJ+A== X-Google-Smtp-Source: ABdhPJwurP9SD+tw5svAb7/+UYJk7n0VJHO1TMdUG6jJF4Jp/3JV6Y2vQtUSKIVP3JOudtnpU21qVA== X-Received: by 2002:a05:6638:398:b0:309:58bf:f50f with SMTP id y24-20020a056638039800b0030958bff50fmr9907405jap.147.1645312142014; Sat, 19 Feb 2022 15:09:02 -0800 (PST) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:4655:df85:f9da:7170]) by smtp.gmail.com with ESMTPSA id u12sm5642173ilg.51.2022.02.19.15.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Feb 2022 15:09:01 -0800 (PST) From: Adam Ford To: u-boot@lists.denx.de Cc: marex@denx.de, trini@konsulko.com, woods.technical@gmail.com, Adam Ford Subject: [PATCH 1/7] usb: ehci-omap: Drop dead code Date: Sat, 19 Feb 2022 17:08:41 -0600 Message-Id: <20220219230847.798484-2-aford173@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220219230847.798484-1-aford173@gmail.com> References: <20220219230847.798484-1-aford173@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean omap_ehci_hcd_stop appears to be dead code, and omap_ehci_hcd_init is only called by the probe function, so it can be static to that function. Remove both from the header along with some additional checking for DM_USB. Signed-off-by: Adam Ford --- arch/arm/include/asm/ehci-omap.h | 13 ------------- drivers/usb/host/ehci-omap.c | 17 +---------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/arch/arm/include/asm/ehci-omap.h b/arch/arm/include/asm/ehci-omap.h index f970bba937..2b51b5eb99 100644 --- a/arch/arm/include/asm/ehci-omap.h +++ b/arch/arm/include/asm/ehci-omap.h @@ -123,17 +123,4 @@ struct omap_ehci { u32 insreg08; /* 0xb0 */ }; -#if !CONFIG_IS_ENABLED(DM_USB) || !CONFIG_IS_ENABLED(OF_CONTROL) -/* - * FIXME: forward declaration of this structs needed because omap got the - * ehci implementation backwards. move out ehci_hcd_x from board files - */ -struct ehci_hccr; -struct ehci_hcor; - -int omap_ehci_hcd_init(int index, struct omap_usbhs_board_data *usbhs_pdata, - struct ehci_hccr **hccr, struct ehci_hcor **hcor); -int omap_ehci_hcd_stop(void); -#endif - #endif /* _OMAP_COMMON_EHCI_H_ */ diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index d5facf10e1..d34c0add4a 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -163,27 +163,12 @@ static inline void omap_ehci_phy_reset(int on, int delay) #define omap_ehci_phy_reset(on, delay) do {} while (0) #endif -/* Reset is needed otherwise the kernel-driver will throw an error. */ -int omap_ehci_hcd_stop(void) -{ - debug("Resetting OMAP EHCI\n"); - omap_ehci_phy_reset(1, 0); - - if (omap_uhh_reset() < 0) - return -1; - - if (omap_ehci_tll_reset() < 0) - return -1; - - return 0; -} - /* * Initialize the OMAP EHCI controller and PHY. * Based on "drivers/usb/host/ehci-omap.c" from Linux 3.1 * See there for additional Copyrights. */ -int omap_ehci_hcd_init(int index, struct omap_usbhs_board_data *usbhs_pdata) +static int omap_ehci_hcd_init(int index, struct omap_usbhs_board_data *usbhs_pdata) { int ret; unsigned int i, reg = 0, rev = 0; -- 2.32.0