diff options
author | Adam Ford <aford173@gmail.com> | 2018-12-12 08:17:41 -0600 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-12-14 17:59:09 +0100 |
commit | f187ace80ee2f6e1ac150a1320473e41dca65555 (patch) | |
tree | 284a90f0b2827dd9fc2b4da3584e49ec24f81d51 /drivers/usb/musb | |
parent | 66c65f0a9178a2f044d9e65759f0d9498da279b1 (diff) | |
download | u-boot-f187ace80ee2f6e1ac150a1320473e41dca65555.zip u-boot-f187ace80ee2f6e1ac150a1320473e41dca65555.tar.gz u-boot-f187ace80ee2f6e1ac150a1320473e41dca65555.tar.bz2 |
usb: musb: Remove legacy CONFIG_USB_DA8XX
There don't appear to be any boards enabling CONFIG_USB_DA8XX,
and there is a newer version of the MUSB driver, so let's remove
the legacy version of it.
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/Kconfig | 4 | ||||
-rw-r--r-- | drivers/usb/musb/Makefile | 1 | ||||
-rw-r--r-- | drivers/usb/musb/da8xx.c | 127 |
3 files changed, 0 insertions, 132 deletions
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index 7e6be03..2508b6e 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig @@ -15,10 +15,6 @@ config USB_OMAP3 bool "Legacy MUSB OMAP3 / OMAP4" depends on ARCH_OMAP2PLUS -config USB_DA8XX - bool "Legacy MUSB DA8xx/OMAP-L1x" - depends on ARCH_DAVINCI - config USB_AM35X bool"Legacy MUSB AM35x" depends on ARCH_OMAP2PLUS && !USB_OMAP3 diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile index 1242ce1..744f2cf 100644 --- a/drivers/usb/musb/Makefile +++ b/drivers/usb/musb/Makefile @@ -6,5 +6,4 @@ obj-$(CONFIG_USB_MUSB_HCD) += musb_hcd.o musb_core.o obj-$(CONFIG_USB_MUSB_UDC) += musb_udc.o musb_core.o obj-$(CONFIG_USB_OMAP3) += omap3.o -obj-$(CONFIG_USB_DA8XX) += da8xx.o obj-$(CONFIG_USB_AM35X) += am35x.o diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c deleted file mode 100644 index a652a7c..0000000 --- a/drivers/usb/musb/da8xx.c +++ /dev/null @@ -1,127 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * da8xx.c - TI's DA8xx platform specific usb wrapper functions. - * - * Author: Ajay Kumar Gupta <ajay.gupta@ti.com> - * - * Based on drivers/usb/musb/davinci.c - * - * Copyright (C) 2009 Texas Instruments Incorporated - */ -#include <common.h> - -#include "musb_core.h" -#include <asm/arch/da8xx-usb.h> - -/* MUSB platform configuration */ -struct musb_config musb_cfg = { - .regs = (struct musb_regs *)DA8XX_USB_OTG_CORE_BASE, - .timeout = DA8XX_USB_OTG_TIMEOUT, - .musb_speed = 0, -}; - -/* - * This function enables VBUS by driving the GPIO Bank4 Pin 15 high. - */ -static void enable_vbus(void) -{ - u32 value; - - /* configure GPIO bank4 pin 15 in output direction */ - value = readl(&davinci_gpio_bank45->dir); - writel((value & (~DA8XX_USB_VBUS_GPIO)), &davinci_gpio_bank45->dir); - - /* set GPIO bank4 pin 15 high to drive VBUS */ - value = readl(&davinci_gpio_bank45->set_data); - writel((value | DA8XX_USB_VBUS_GPIO), &davinci_gpio_bank45->set_data); -} - -/* - * Enable the usb0 phy. This initialization procedure is explained in - * the DA8xx USB user guide document. - */ -static u8 phy_on(void) -{ - u32 timeout; - u32 cfgchip2; - - cfgchip2 = readl(&davinci_syscfg_regs->cfgchip2); - - cfgchip2 &= ~(CFGCHIP2_RESET | CFGCHIP2_PHYPWRDN | CFGCHIP2_OTGPWRDN | - CFGCHIP2_OTGMODE | CFGCHIP2_REFFREQ); - cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN | CFGCHIP2_PHY_PLLON | - CFGCHIP2_REFFREQ_24MHZ; - - writel(cfgchip2, &davinci_syscfg_regs->cfgchip2); - - /* wait until the usb phy pll locks */ - timeout = musb_cfg.timeout; - while (timeout--) - if (readl(&davinci_syscfg_regs->cfgchip2) & CFGCHIP2_PHYCLKGD) - return 1; - - /* USB phy was not turned on */ - return 0; -} - -/* - * Disable the usb phy - */ -static void phy_off(void) -{ - u32 cfgchip2; - - /* - * Power down the on-chip PHY. - */ - cfgchip2 = readl(&davinci_syscfg_regs->cfgchip2); - cfgchip2 &= ~CFGCHIP2_PHY_PLLON; - cfgchip2 |= CFGCHIP2_PHYPWRDN | CFGCHIP2_OTGPWRDN; - writel(cfgchip2, &davinci_syscfg_regs->cfgchip2); -} - -/* - * This function performs DA8xx platform specific initialization for usb0. - */ -int musb_platform_init(void) -{ - u32 revision; - - /* enable psc for usb2.0 */ - lpsc_on(33); - - /* enable usb vbus */ - enable_vbus(); - - /* reset the controller */ - writel(0x1, &da8xx_usb_regs->control); - udelay(5000); - - /* start the on-chip usb phy and its pll */ - if (phy_on() == 0) - return -1; - - /* Returns zero if e.g. not clocked */ - revision = readl(&da8xx_usb_regs->revision); - if (revision == 0) - return -1; - - /* Disable all interrupts */ - writel((DA8XX_USB_USBINT_MASK | DA8XX_USB_TXINT_MASK | - DA8XX_USB_RXINT_MASK), &da8xx_usb_regs->intmsk_set); - return 0; -} - -/* - * This function performs DA8xx platform specific deinitialization for usb0. - */ -void musb_platform_deinit(void) -{ - /* Turn of the phy */ - phy_off(); - - /* flush any interrupts */ - writel((DA8XX_USB_USBINT_MASK | DA8XX_USB_TXINT_MASK | - DA8XX_USB_RXINT_MASK), &da8xx_usb_regs->intmsk_clr); - writel(0, &da8xx_usb_regs->eoi); -} |