summaryrefslogtreecommitdiff
path: root/board/ti
diff options
context:
space:
mode:
authorDerald D. Woods <woods.technical@gmail.com>2020-07-18 19:23:04 -0500
committerLokesh Vutla <lokeshvutla@ti.com>2020-08-11 20:34:45 +0530
commit5297a956cba34ed850f7854abf1b01ba00259fa1 (patch)
tree822bde70e70f5c5db88d72078a4d2cceb5d18bd5 /board/ti
parent864e2857393dc98504ec5da16e0e41e38a0abe39 (diff)
ARM: omap3: evm: Complete DM_ETH and DM_USB migrations
This commit completes the migrations for DM_ETH and DM_USB. The board is now consistent with omap3_beagle and other remaining OMAP3 boards. Cc: Tom Rini <trini@konsulko.com> Cc: Adam Ford <aford173@gmail.com> Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
Diffstat (limited to 'board/ti')
-rw-r--r--board/ti/evm/evm.c82
1 files changed, 11 insertions, 71 deletions
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index 193b3eb576..ecbd843676 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -16,7 +16,6 @@
#include <init.h>
#include <net.h>
#include <ns16550.h>
-#include <netdev.h>
#include <serial.h>
#include <asm/io.h>
#include <asm/arch/mem.h>
@@ -24,20 +23,17 @@
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
#include <asm/gpio.h>
-#include <i2c.h>
#include <twl4030.h>
#include <asm/mach-types.h>
-#include <asm/omap_musb.h>
#include <linux/delay.h>
#include <linux/mtd/rawnand.h>
-#include <linux/usb/ch9.h>
-#include <linux/usb/gadget.h>
-#include <linux/usb/musb.h>
#include "evm.h"
#define OMAP3EVM_GPIO_ETH_RST_GEN1 64
#define OMAP3EVM_GPIO_ETH_RST_GEN2 7
+#define CONFIG_SMC911X_BASE 0x2C000000
+
DECLARE_GLOBAL_DATA_PTR;
static u32 omap3_evm_version;
@@ -49,7 +45,7 @@ u32 get_omap3_evm_rev(void)
static void omap3_evm_get_revision(void)
{
-#if defined(CONFIG_CMD_NET)
+#if defined(CONFIG_SMC911X)
/*
* Board revision can be ascertained only by identifying
* the Ethernet chipset.
@@ -70,7 +66,7 @@ static void omap3_evm_get_revision(void)
default:
omap3_evm_version = OMAP3EVM_BOARD_GEN_2;
}
-#else /* !CONFIG_CMD_NET */
+#else /* !CONFIG_SMC911X */
#if defined(CONFIG_STATIC_BOARD_REV)
/* Look for static defintion of the board revision */
omap3_evm_version = CONFIG_STATIC_BOARD_REV;
@@ -78,7 +74,7 @@ static void omap3_evm_get_revision(void)
/* Fallback to the default above */
omap3_evm_version = OMAP3EVM_BOARD_GEN_2;
#endif /* CONFIG_STATIC_BOARD_REV */
-#endif /* CONFIG_CMD_NET */
+#endif /* CONFIG_SMC911X */
}
#if defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST)
@@ -155,33 +151,6 @@ void get_board_mem_timings(struct board_sdrc_timings *timings)
}
#endif /* CONFIG_SPL_BUILD */
-#if defined(CONFIG_USB_MUSB_OMAP2PLUS)
-static struct musb_hdrc_config musb_config = {
- .multipoint = 1,
- .dyn_fifo = 1,
- .num_eps = 16,
- .ram_bits = 12,
-};
-
-static struct omap_musb_board_data musb_board_data = {
- .interface_type = MUSB_INTERFACE_ULPI,
-};
-
-static struct musb_hdrc_platform_data musb_plat = {
-#if defined(CONFIG_USB_MUSB_HOST)
- .mode = MUSB_HOST,
-#elif defined(CONFIG_USB_MUSB_GADGET)
- .mode = MUSB_PERIPHERAL,
-#else
-#error "Please define either CONFIG_USB_MUSB_HOST or CONFIG_USB_MUSB_GADGET"
-#endif /* CONFIG_USB_MUSB_{GADGET,HOST} */
- .config = &musb_config,
- .power = 100,
- .platform_ops = &omap2430_ops,
- .board_data = &musb_board_data,
-};
-#endif /* CONFIG_USB_MUSB_OMAP2PLUS */
-
/*
* Routine: misc_init_r
* Description: Init ethernet (done here so udelay works)
@@ -190,25 +159,18 @@ int misc_init_r(void)
{
twl4030_power_init();
-#ifdef CONFIG_SYS_I2C_OMAP24XX
- i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
-#endif
-
-#if defined(CONFIG_CMD_NET)
+#if defined(CONFIG_SMC911X)
setup_net_chip();
#endif
omap3_evm_get_revision();
-#if defined(CONFIG_CMD_NET)
+#if defined(CONFIG_SMC911X)
reset_net_chip();
#endif
omap_die_id_display();
-#if defined(CONFIG_USB_MUSB_OMAP2PLUS)
- musb_register(&musb_plat, &musb_board_data, (void *)MUSB_BASE);
-#endif
-
-#if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET)
+#if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET) && \
+ !defined(CONFIG_SMC911X)
omap_die_id_usbethaddr();
#endif
return 0;
@@ -225,7 +187,7 @@ void set_muxconf_regs(void)
MUX_EVM();
}
-#if defined(CONFIG_CMD_NET)
+#if defined(CONFIG_SMC911X)
/*
* Routine: setup_net_chip
* Description: Setting up the configuration GPMC registers specific to the
@@ -283,33 +245,11 @@ static void reset_net_chip(void)
udelay(1);
gpio_set_value(rst_gpio, 1);
}
-
-int board_eth_init(struct bd_info *bis)
-{
-#if defined(CONFIG_SMC911X)
- env_set("ethaddr", NULL);
- return smc911x_initialize(0, CONFIG_SMC911X_BASE);
-#else
- return 0;
-#endif
-}
-#endif /* CONFIG_CMD_NET */
+#endif /* CONFIG_SMC911X */
#if defined(CONFIG_MMC)
-int board_mmc_init(struct bd_info *bis)
-{
- return omap_mmc_init(0, 0, 0, -1, -1);
-}
-
void board_mmc_power_init(void)
{
twl4030_power_mmc_init(0);
}
#endif /* CONFIG_MMC */
-
-#if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET) && !defined(CONFIG_CMD_NET)
-int board_eth_init(struct bd_info *bis)
-{
- return usb_eth_initialize(bis);
-}
-#endif /* CONFIG_USB_ETHER */