u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 03/17] am335x: Remove legacy non-DM_USB code
Date: Sun, 12 Sep 2021 20:32:19 -0400	[thread overview]
Message-ID: <20210913003233.4125-3-trini@konsulko.com> (raw)
In-Reply-To: <20210913003233.4125-1-trini@konsulko.com>

With all SPL cases covered now by having SPL_OF_CONTROL enabled, we can
drop legacy code related to AM335x MUSB options.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/mach-omap2/am33xx/board.c     | 126 -------------------------
 include/configs/am335x_evm.h           |  12 ---
 include/configs/am335x_guardian.h      |   5 -
 include/configs/baltos.h               |  12 ---
 include/configs/chiliboard.h           |   4 -
 include/configs/siemens-am33x-common.h |   8 --
 6 files changed, 167 deletions(-)

diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index 6c0556c57728..4bf9c5359ecc 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -205,130 +205,6 @@ int cpu_mmc_init(struct bd_info *bis)
 /* Board type field bit shift for RTC only with DDR in self-refresh mode */
 #define RTC_BOARD_TYPE_SHIFT	16
 
-/* AM33XX has two MUSB controllers which can be host or gadget */
-#if (defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST)) && \
-	(defined(CONFIG_AM335X_USB0) || defined(CONFIG_AM335X_USB1)) && \
-	(!CONFIG_IS_ENABLED(DM_USB) || !CONFIG_IS_ENABLED(OF_CONTROL)) && \
-	(!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_MUSB_NEW))
-
-static struct musb_hdrc_config musb_config = {
-	.multipoint     = 1,
-	.dyn_fifo       = 1,
-	.num_eps        = 16,
-	.ram_bits       = 12,
-};
-
-#if CONFIG_IS_ENABLED(DM_USB) && !CONFIG_IS_ENABLED(OF_CONTROL)
-static struct ti_musb_plat usb0 = {
-	.base = (void *)USB0_OTG_BASE,
-	.ctrl_mod_base = &((struct ctrl_dev *)CTRL_DEVICE_BASE)->usb_ctrl0,
-	.plat = {
-		.config         = &musb_config,
-		.power          = 50,
-		.platform_ops	= &musb_dsps_ops,
-		},
-};
-
-static struct ti_musb_plat usb1 = {
-	.base = (void *)USB1_OTG_BASE,
-	.ctrl_mod_base = &((struct ctrl_dev *)CTRL_DEVICE_BASE)->usb_ctrl1,
-	.plat = {
-		.config         = &musb_config,
-		.power          = 50,
-		.platform_ops	= &musb_dsps_ops,
-		},
-};
-
-U_BOOT_DRVINFOS(am33xx_usbs) = {
-#if CONFIG_AM335X_USB0_MODE == MUSB_PERIPHERAL
-	{ "ti-musb-peripheral", &usb0 },
-#elif CONFIG_AM335X_USB0_MODE == MUSB_HOST
-	{ "ti-musb-host", &usb0 },
-#endif
-#if CONFIG_AM335X_USB1_MODE == MUSB_PERIPHERAL
-	{ "ti-musb-peripheral", &usb1 },
-#elif CONFIG_AM335X_USB1_MODE == MUSB_HOST
-	{ "ti-musb-host", &usb1 },
-#endif
-};
-
-int arch_misc_init(void)
-{
-	return 0;
-}
-#else
-static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
-
-/* USB 2.0 PHY Control */
-#define CM_PHY_PWRDN			(1 << 0)
-#define CM_PHY_OTG_PWRDN		(1 << 1)
-#define OTGVDET_EN			(1 << 19)
-#define OTGSESSENDEN			(1 << 20)
-
-static void am33xx_usb_set_phy_power(u8 on, u32 *reg_addr)
-{
-	if (on) {
-		clrsetbits_le32(reg_addr, CM_PHY_PWRDN | CM_PHY_OTG_PWRDN,
-				OTGVDET_EN | OTGSESSENDEN);
-	} else {
-		clrsetbits_le32(reg_addr, 0, CM_PHY_PWRDN | CM_PHY_OTG_PWRDN);
-	}
-}
-
-#ifdef CONFIG_AM335X_USB0
-static void am33xx_otg0_set_phy_power(struct udevice *dev, u8 on)
-{
-	am33xx_usb_set_phy_power(on, &cdev->usb_ctrl0);
-}
-
-struct omap_musb_board_data otg0_board_data = {
-	.set_phy_power = am33xx_otg0_set_phy_power,
-};
-
-static struct musb_hdrc_platform_data otg0_plat = {
-	.mode           = CONFIG_AM335X_USB0_MODE,
-	.config         = &musb_config,
-	.power          = 50,
-	.platform_ops	= &musb_dsps_ops,
-	.board_data	= &otg0_board_data,
-};
-#endif
-
-#ifdef CONFIG_AM335X_USB1
-static void am33xx_otg1_set_phy_power(struct udevice *dev, u8 on)
-{
-	am33xx_usb_set_phy_power(on, &cdev->usb_ctrl1);
-}
-
-struct omap_musb_board_data otg1_board_data = {
-	.set_phy_power = am33xx_otg1_set_phy_power,
-};
-
-static struct musb_hdrc_platform_data otg1_plat = {
-	.mode           = CONFIG_AM335X_USB1_MODE,
-	.config         = &musb_config,
-	.power          = 50,
-	.platform_ops	= &musb_dsps_ops,
-	.board_data	= &otg1_board_data,
-};
-#endif
-
-int arch_misc_init(void)
-{
-#ifdef CONFIG_AM335X_USB0
-	musb_register(&otg0_plat, &otg0_board_data,
-		(void *)USB0_OTG_BASE);
-#endif
-#ifdef CONFIG_AM335X_USB1
-	musb_register(&otg1_plat, &otg1_board_data,
-		(void *)USB1_OTG_BASE);
-#endif
-	return 0;
-}
-#endif
-
-#else	/* CONFIG_USB_MUSB_* && CONFIG_AM335X_USB* && !CONFIG_DM_USB */
-
 int arch_misc_init(void)
 {
 	struct udevice *dev;
@@ -349,8 +225,6 @@ int arch_misc_init(void)
 	return 0;
 }
 
-#endif /* CONFIG_USB_MUSB_* && CONFIG_AM335X_USB* && !CONFIG_DM_USB */
-
 #if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT)
 
 #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC) || \
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 0f6ffd9ba7c2..5dd4484be933 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -212,18 +212,6 @@
  * in memory.
  */
 
-/*
- * USB configuration.  We enable MUSB support, both for host and for
- * gadget.  We set USB0 as peripheral and USB1 as host, based on the
- * board schematic and physical port wired to each.  Then for host we
- * add mass storage support and for gadget we add both RNDIS ethernet
- * and DFU.
- */
-#define CONFIG_AM335X_USB0
-#define CONFIG_AM335X_USB0_MODE	MUSB_PERIPHERAL
-#define CONFIG_AM335X_USB1
-#define CONFIG_AM335X_USB1_MODE MUSB_HOST
-
 /*
  * Disable MMC DM for SPL build and can be re-enabled after adding
  * DM support in SPL
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index d93db09c9b5e..608fb167fdd8 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -146,9 +146,4 @@
 
 #endif /* CONFIG_MTD_RAW_NAND */
 
-#define CONFIG_AM335X_USB0
-#define CONFIG_AM335X_USB0_MODE MUSB_PERIPHERAL
-#define CONFIG_AM335X_USB1
-#define CONFIG_AM335X_USB1_MODE MUSB_HOST
-
 #endif	/* ! __CONFIG_AM335X_GUARDIAN_H */
diff --git a/include/configs/baltos.h b/include/configs/baltos.h
index 2fe6c8639392..966b95bdaccc 100644
--- a/include/configs/baltos.h
+++ b/include/configs/baltos.h
@@ -232,18 +232,6 @@
 #endif
 #endif
 
-/*
- * USB configuration.  We enable MUSB support, both for host and for
- * gadget.  We set USB0 as peripheral and USB1 as host, based on the
- * board schematic and physical port wired to each.  Then for host we
- * add mass storage support and for gadget we add both RNDIS ethernet
- * and DFU.
- */
-#define CONFIG_AM335X_USB0
-#define CONFIG_AM335X_USB0_MODE	MUSB_HOST
-#define CONFIG_AM335X_USB1
-#define CONFIG_AM335X_USB1_MODE MUSB_OTG
-
 /* NAND support */
 #ifdef CONFIG_MTD_RAW_NAND
 #define GPMC_NAND_ECC_LP_x8_LAYOUT	1
diff --git a/include/configs/chiliboard.h b/include/configs/chiliboard.h
index 86cac236f96b..da1efd003e12 100644
--- a/include/configs/chiliboard.h
+++ b/include/configs/chiliboard.h
@@ -146,10 +146,6 @@
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x000c0000
 /* NAND: SPL related configs */
 
-/* USB configuration */
-#define CONFIG_AM335X_USB1
-#define CONFIG_AM335X_USB1_MODE MUSB_HOST
-
 /*
  * Disable MMC DM for SPL build and can be re-enabled after adding
  * DM support in SPL
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 6ccba95f3052..18e0786d6d09 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -115,14 +115,6 @@
  */
 
 #ifndef CONFIG_SPL_BUILD
-/*
- * USB configuration
- */
-#define CONFIG_AM335X_USB0
-#define CONFIG_AM335X_USB0_MODE	MUSB_PERIPHERAL
-#define CONFIG_AM335X_USB1
-#define CONFIG_AM335X_USB1_MODE MUSB_HOST
-
 /* USB DRACO ID as default */
 #define CONFIG_USBD_HS
 
-- 
2.17.1


  parent reply	other threads:[~2021-09-13  0:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  0:32 [PATCH 01/17] am335x_guardian: Enable SPL_OF_CONTROL Tom Rini
2021-09-13  0:32 ` [PATCH 02/17] am335x_boneblack_vboot: " Tom Rini
2021-09-13  0:32 ` Tom Rini [this message]
2021-09-13  0:32 ` [PATCH 04/17] keystone2: Move CONFIG_AEMIF_CNTRL_BASE out of CONFIG namespace Tom Rini
2021-09-28 23:20   ` Tom Rini
2021-09-13  0:32 ` [PATCH 05/17] usb: phy: ti: Remove non-DM PHY code Tom Rini
2021-09-28 23:20   ` Tom Rini
2021-09-13  0:32 ` [PATCH 06/17] Convert CONFIG_USB_XHCI_OMAP to Kconfig Tom Rini
2021-09-28 23:20   ` Tom Rini
2021-09-13  0:32 ` [PATCH 07/17] compulab: Clean up some unused symbols Tom Rini
2021-09-28 23:21   ` Tom Rini
2021-09-13  0:32 ` [PATCH 08/17] ti: keystone: Clean up or migrate some NAND related options Tom Rini
2021-09-28 23:21   ` Tom Rini
2021-09-13  0:32 ` [PATCH 09/17] ti: keystone: dma: Migrate to Kconfig Tom Rini
2021-09-28 23:21   ` Tom Rini
2021-09-13  0:32 ` [PATCH 10/17] omapl138_lcdk: Stop using CONFIG_MACH_OMAPL138_LCDK Tom Rini
2021-09-28 23:21   ` Tom Rini
2021-09-13  0:32 ` [PATCH 11/17] usb: ehci-omap: Drop non-DM_USB legacy code Tom Rini
2021-09-28 23:21   ` Tom Rini
2021-09-13  0:32 ` [PATCH 12/17] Convert CONFIG_OMAP_EHCI_PHY1_RESET_GPIO et al to Kconfig Tom Rini
2021-09-28 23:21   ` Tom Rini
2021-09-13  0:32 ` [PATCH 13/17] am3517_evm: Remove unused comments/code Tom Rini
2021-09-28 23:21   ` Tom Rini
2021-09-13  0:32 ` [PATCH 14/17] omap3_logic: " Tom Rini
2021-09-28 23:21   ` Tom Rini
2021-09-13  0:32 ` [PATCH 15/17] omap4_panda: " Tom Rini
2021-09-28 23:21   ` Tom Rini
2021-09-13  0:32 ` [PATCH 16/17] ti: keystone: Move away from CONFIG_SOC_KEYSTONE Tom Rini
2021-09-28 23:21   ` Tom Rini
2021-09-13  0:32 ` [PATCH 17/17] ti: keystone: Migrate CONFIG_SOC_K2* to Kconfig Tom Rini
2021-09-28 23:21   ` Tom Rini

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=20210913003233.4125-3-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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;
as well as URLs for NNTP newsgroup(s).