All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: u-boot@lists.denx.de
Cc: lokeshvutla@ti.com, marex@denx.de, sjg@chromium.org,
	woods.technical@gmail.com, Adam Ford <aford173@gmail.com>
Subject: [RFC 1/3] usb: ehci-omap: Remove dead code
Date: Sun,  3 Oct 2021 19:24:05 -0500	[thread overview]
Message-ID: <20211004002407.464910-1-aford173@gmail.com> (raw)

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

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


             reply	other threads:[~2021-10-04  0:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04  0:24 Adam Ford [this message]
2021-10-04  0:24 ` [RFC 2/3] phy: nop-phy: Enable reset-gpios support Adam Ford
2021-10-04  0:24 ` [RFC 3/3] usb: ehci-omap: Enable phy drivers to enable/reset phy Adam Ford

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=20211004002407.464910-1-aford173@gmail.com \
    --to=aford173@gmail.com \
    --cc=lokeshvutla@ti.com \
    --cc=marex@denx.de \
    --cc=sjg@chromium.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.