mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
usb: ehci-omap: Drop dead code
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>
This commit is contained in:
@@ -123,17 +123,4 @@ struct omap_ehci {
|
|||||||
u32 insreg08; /* 0xb0 */
|
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_ */
|
#endif /* _OMAP_COMMON_EHCI_H_ */
|
||||||
|
@@ -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)
|
#define omap_ehci_phy_reset(on, delay) do {} while (0)
|
||||||
#endif
|
#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.
|
* Initialize the OMAP EHCI controller and PHY.
|
||||||
* Based on "drivers/usb/host/ehci-omap.c" from Linux 3.1
|
* Based on "drivers/usb/host/ehci-omap.c" from Linux 3.1
|
||||||
* See there for additional Copyrights.
|
* 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;
|
int ret;
|
||||||
unsigned int i, reg = 0, rev = 0;
|
unsigned int i, reg = 0, rev = 0;
|
||||||
|
Reference in New Issue
Block a user