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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDC04C433F5 for ; Mon, 4 Oct 2021 00:24:27 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9FF9D6126A for ; Mon, 4 Oct 2021 00:24:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9FF9D6126A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8481E8324B; Mon, 4 Oct 2021 02:24:24 +0200 (CEST) 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="EuwyvIAG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 981C8834A2; Mon, 4 Oct 2021 02:24:21 +0200 (CEST) Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) (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 66C318324B for ; Mon, 4 Oct 2021 02:24:17 +0200 (CEST) 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-il1-x136.google.com with SMTP id l20so4182494ilk.2 for ; Sun, 03 Oct 2021 17:24:17 -0700 (PDT) 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=MsBax2zXP67paT3PRJF8mfZc6vcvFBjF4VZuRh391f4=; b=EuwyvIAGYSTn0CDfdzae8hU5+qPy5w2Muvyd4Mj6SmodiP+qDZFZqAKJwUpCBvXMQJ 5Lzh8VQsT0BuvtkHA8PR+48QllmnL+x7eQdkVBuWNmZ/spnq82YuKcjDYsJvEUm1mMIU UGpKx8lNUYwkMdhgq6n2VLtw+ThRpAJ/rDAr7Uu6oivNdZb4KTcq8idB5+3/N77RFfVc 10Vy+Y+ZJBryTxNEgX1L3B72zjBAC2eGVooK9OjPNXmtG/YkQbONf/h/a0s9PhxpCWmL AHyj+NuiaqnNsXkQC6RxSrqnah1gZLQUNqMQt/DvG6E+2wKdObcRhVyMJx7ftvJwF/zD 2ZoA== 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=MsBax2zXP67paT3PRJF8mfZc6vcvFBjF4VZuRh391f4=; b=zSAHc7BBAzpbvCHYcDLhfhs4x3lFw+896upBKUHnQk9f7ghoR/WLS7okEuaY+QeGNF LR20aeLI26YFXFC/xNdEsp3w+43SDIRhLevXQtPW+SmlHPYT/dW6umVD7wWx0L+kXfZc 8EQw/Z4LKylzRbbn6ovtOuvoe/OPsEkWdBj0yDM8JaO5ndq0wBAGTspatd68sBOxylLi bz8LxffNyj+Bz1nyHhYOIvylKbMqxOfwWhFRaUjz/gOhYT02eo0NuKFo95n4JKYyVg6j IEJ69m5vdTmV83+igUeedah4PjcrzPGVLNcwaW6IqD4u9i+I7XDTFK7YcuMCbOU9Ky5b R7UQ== X-Gm-Message-State: AOAM533dJIm/blhZ3xpTmoeIkq+S0owPN4UUIIGxUySk6x5lkcv0O2BR 950atPJ+Cg2emFisQJFaCLZNuWDNAiA= X-Google-Smtp-Source: ABdhPJwfset/vwj7LnXRp41w1jMy1LAYgKxeiSVX+knf6n2Okq4msWY0BRWENnXIutk5kpoMqxGAdQ== X-Received: by 2002:a92:300c:: with SMTP id x12mr7706164ile.230.1633307055425; Sun, 03 Oct 2021 17:24:15 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:cc4e:ab52:cc12:32be]) by smtp.gmail.com with ESMTPSA id v14sm4687236iln.23.2021.10.03.17.24.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 17:24:14 -0700 (PDT) From: Adam Ford To: u-boot@lists.denx.de Cc: lokeshvutla@ti.com, marex@denx.de, sjg@chromium.org, woods.technical@gmail.com, Adam Ford Subject: [RFC 1/3] usb: ehci-omap: Remove dead code Date: Sun, 3 Oct 2021 19:24:05 -0500 Message-Id: <20211004002407.464910-1-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Since it's expected that DM_USB is enabled by now, remove some dead code and the checks 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 12c422d811..324d2c0db1 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -163,37 +163,14 @@ 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. */ -#if !CONFIG_IS_ENABLED(DM_USB) || !CONFIG_IS_ENABLED(OF_CONTROL) -int omap_ehci_hcd_init(int index, struct omap_usbhs_board_data *usbhs_pdata, - struct ehci_hccr **hccr, struct ehci_hcor **hcor) -{ - *hccr = (struct ehci_hccr *)(OMAP_EHCI_BASE); - *hcor = (struct ehci_hcor *)(OMAP_EHCI_BASE + 0x10); -#else int omap_ehci_hcd_init(int index, struct omap_usbhs_board_data *usbhs_pdata) { -#endif int ret; unsigned int i, reg = 0, rev = 0; @@ -304,8 +281,6 @@ int omap_ehci_hcd_init(int index, struct omap_usbhs_board_data *usbhs_pdata) return 0; } -#if CONFIG_IS_ENABLED(DM_USB) - static struct omap_usbhs_board_data usbhs_bdata = { .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED, @@ -409,5 +384,3 @@ U_BOOT_DRIVER(usb_omap_ehci) = { .ops = &ehci_usb_ops, .flags = DM_FLAG_ALLOC_PRIV_DMA, }; - -#endif -- 2.25.1