public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: u-boot@lists.denx.de
Cc: marex@denx.de, trini@konsulko.com, woods.technical@gmail.com,
	Adam Ford <aford173@gmail.com>
Subject: [PATCH 1/7] usb: ehci-omap: Drop dead code
Date: Sat, 19 Feb 2022 17:08:41 -0600	[thread overview]
Message-ID: <20220219230847.798484-2-aford173@gmail.com> (raw)
In-Reply-To: <20220219230847.798484-1-aford173@gmail.com>

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 <aford173@gmail.com>
---
 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


  reply	other threads:[~2022-02-19 23:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-19 23:08 [PATCH 0/7] Migrate omap_ehci to use phy driver Adam Ford
2022-02-19 23:08 ` Adam Ford [this message]
2022-02-19 23:08 ` [PATCH 2/7] usb: ehci-omap: Move omap_ehci_hcd_init to omap_ehci_probe Adam Ford
2022-02-19 23:08 ` [PATCH 3/7] phy: nop-phy: Fix enabling reset Adam Ford
2022-02-19 23:08 ` [PATCH 4/7] usb: ehci-omap: Make Kconfig select PHY if USB_EHCI_OMAP Adam Ford
2022-02-19 23:08 ` [PATCH 5/7] usb: ehci-omap: Use PHY system to manage phy resets Adam Ford
2022-02-23  4:28   ` Marek Vasut
2022-02-19 23:08 ` [PATCH 6/7] usb: ehci-omap: Remove OMAP_EHCI_PHYx_RESET_GPIO from Kconfig Adam Ford
2022-02-19 23:08 ` [PATCH 7/7] configs: omap various: Remove OMAP_EHCI_PHY from defconfigs Adam Ford
2022-02-22  0:24 ` [PATCH 0/7] Migrate omap_ehci to use phy driver Derald Woods
2022-02-23  4:28   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220219230847.798484-2-aford173@gmail.com \
    --to=aford173@gmail.com \
    --cc=marex@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=woods.technical@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox