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 0AC07C433F5 for ; Sat, 12 Feb 2022 14:26:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 269198368F; Sat, 12 Feb 2022 15:26:54 +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="ixnkHNTA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 99B908343B; Sat, 12 Feb 2022 15:26:52 +0100 (CET) Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) (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 61D888368F for ; Sat, 12 Feb 2022 15:26:49 +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-xd35.google.com with SMTP id q204so14777309iod.8 for ; Sat, 12 Feb 2022 06:26:49 -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:mime-version :content-transfer-encoding; bh=crbrL+imcAl0IC6E4vjV7AFvU+1TrmE4zJFX+Ri4ASA=; b=ixnkHNTAQ07PfZxqkwMuomxf/kXbBmqQWDDWSZFsRA0Rn8VwMX8/cv1RdtoqozShBK UsJYpGRq3jHeVD6SrEn0PNaJ6n5LiZYP7O9hkxiaALIPOamkp1onl9DP0L3cEVaJ2u/K DeAif0WLo4MsN/OEKpJf9w05sNHovnuLbkTIPqx1tfWLoi3rts5yf9PSQM7y3YlPNk2u FUjB6p4tvKyOexlmn7yG3hxzG6eg6cDzfLsuXguYA6Uwfq/r0E0MPXnkB0pzWcSK2jrq Sakitl8yo4sYj22DaRZRbEhQVJzUgM+EWh4qESuBLWCBF5+lpNoWew1A5n1PQiGgDLFL QBCg== 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:mime-version :content-transfer-encoding; bh=crbrL+imcAl0IC6E4vjV7AFvU+1TrmE4zJFX+Ri4ASA=; b=UuW/7+Y4xrpg2CLqaPTbtWYITya+AucmBdID8lCR+u4f9hEs24wN+MUHnj/ZI8PiS3 P0lhd4ewn3oyvz1s0vbA90t8bekAAdOL456lBBYC6dQa4fFYEcPGe+r1KPfuNoZguUMw nA17Nv+19m/iqcywKNkR46ZKsfBk6WN/cChU0mzCO2LmoUxrfU+e2AiGnIsxF5B82cP6 70nrZ07b59unElrOyLMoZHjcl6LhwkJ/RR3MenRohFG26cfT1/FuWTuMkSfUASDcbK+T ES7yAee8Qsv/xShKFl8lf1ZaEDzggeiNvkvnwtjtSmqoPVRiyYdSPJmvIv0QnvxSeAed qmZA== X-Gm-Message-State: AOAM5318nONcub239AAnnc9n/7ielZBuOWQFOntfFpq3R9m4Btv3DZ4x atdGoEXj7hQmTIOnzs1ZAjMFJqB+8rKNVg== X-Google-Smtp-Source: ABdhPJyUhax5BAh0+sjF/eh/x0iWrA6YU2nnVgWgcOdmSNgFtKcu0mfy8EUDGj5ske95b3PYVDTQqA== X-Received: by 2002:a05:6638:14cb:: with SMTP id l11mr3527169jak.58.1644676007238; Sat, 12 Feb 2022 06:26:47 -0800 (PST) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:170d:5361:aa57:f070]) by smtp.gmail.com with ESMTPSA id n3sm16101901ioz.9.2022.02.12.06.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Feb 2022 06:26:46 -0800 (PST) From: Adam Ford To: u-boot@lists.denx.de Cc: marex@denx.de, trini@konsulko.com, Adam Ford Subject: [PATCH] usb: ehci-omap: Drop dead code Date: Sat, 12 Feb 2022 08:26:40 -0600 Message-Id: <20220212142640.1669851-1-aford173@gmail.com> X-Mailer: git-send-email 2.32.0 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 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