summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Yanok <ilya.yanok@cogentembedded.com>2012-08-09 02:07:41 +0400
committerVishveshwar Bhat <vishveshwar.bhat@ti.com>2012-10-23 12:18:59 +0530
commit60a2750a2bc22e9297616be013eb5e8dd71f8e78 (patch)
tree3d9b11d52f810a994b66342893938635883685ee
parent8fcd7e1622c77cd02c832061ac2f87196e7fb2c8 (diff)
downloadu-boot-beaglebone-60a2750a2bc22e9297616be013eb5e8dd71f8e78.tar.gz
am335x_evm: enable usb_ether in SPL
Enable new USB SPL support for am335x based boards. We use some fake dev/host eth addresses. Probably will need to fix them. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
-rw-r--r--board/ti/am335x/evm.c8
-rwxr-xr-xinclude/configs/am335x_evm.h4
2 files changed, 9 insertions, 3 deletions
diff --git a/board/ti/am335x/evm.c b/board/ti/am335x/evm.c
index 93cc6d5b1..1b8364fe6 100644
--- a/board/ti/am335x/evm.c
+++ b/board/ti/am335x/evm.c
@@ -1173,7 +1173,8 @@ static struct cpsw_platform_data cpsw_data = {
};
#endif
-#if defined(CONFIG_MUSB_GADGET) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_MUSB_GADGET) && \
+ (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_MUSB_GADGET_SUPPORT))
#ifdef CONFIG_MUSB_GADGET_PORT0
#define USB_CTRL_REG USB_CTRL0
#define OTG_REGS_BASE ((void *)AM335X_USB0_OTG_BASE)
@@ -1226,7 +1227,7 @@ static struct musb_hdrc_platform_data musb_plat = {
#if defined(CONFIG_DRIVER_TI_CPSW) || \
(defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET) && \
- !defined(CONFIG_SPL_BUILD))
+ (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USB_ETH_SUPPORT)))
int board_eth_init(bd_t *bis)
{
int rv, n = 0;
@@ -1292,7 +1293,8 @@ int board_eth_init(bd_t *bis)
else
n += rv;
#endif
-#if defined(CONFIG_USB_ETHER) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_USB_ETHER) && \
+ (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USB_ETH_SUPPORT))
rv = musb_register(&musb_plat, &musb_board_data, OTG_REGS_BASE);
if (rv < 0) {
printf("Error %d registering MUSB device\n", rv);
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index b8725306e..1e0025269 100755
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -340,6 +340,8 @@ to a higher value if a higher sized RAM support is available in Hardware */
#define CONFIG_SPL_NET_SUPPORT
#define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL"
#define CONFIG_SPL_ETH_SUPPORT
+#define CONFIG_SPL_MUSB_GADGET_SUPPORT
+#define CONFIG_SPL_USB_ETH_SUPPORT
#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
/* NAND boot config */
@@ -561,6 +563,8 @@ to a higher value if a higher sized RAM support is available in Hardware */
#ifdef CONFIG_MUSB_GADGET
#define CONFIG_USB_ETHER
#define CONFIG_USB_ETH_RNDIS
+#define CONFIG_USBNET_DEV_ADDR "aa:bb:cc:00:11:33"
+#define CONFIG_USBNET_HOST_ADDR "aa:bb:cc:00:11:44"
#define CONFIG_CMD_NET
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_TFTP