diff options
author | Allen Martin <amartin@nvidia.com> | 2012-12-19 13:02:36 -0800 |
---|---|---|
committer | Allen Martin <amartin@nvidia.com> | 2012-12-19 13:02:36 -0800 |
commit | a098cf41fdb2a6607c675f7fe4f3164617c9367e (patch) | |
tree | b37acb36f65909e6f74cc537d73efd883a1485a6 /board/ti | |
parent | b8a7c467960ffb4d5a5e1eef5f7783fb6f594542 (diff) | |
parent | 095728803eedfce850a2f85828f79500cb09979e (diff) | |
download | u-boot-imx-a098cf41fdb2a6607c675f7fe4f3164617c9367e.zip u-boot-imx-a098cf41fdb2a6607c675f7fe4f3164617c9367e.tar.gz u-boot-imx-a098cf41fdb2a6607c675f7fe4f3164617c9367e.tar.bz2 |
Merge remote-tracking branch 'u-boot/master' into u-boot-arm-merged
Conflicts:
README
arch/arm/cpu/armv7/exynos/clock.c
board/samsung/universal_c210/universal.c
drivers/misc/Makefile
drivers/power/power_fsl.c
include/configs/mx35pdk.h
include/configs/mx53loco.h
include/configs/seaboard.h
Diffstat (limited to 'board/ti')
-rw-r--r-- | board/ti/am335x/board.c | 23 | ||||
-rw-r--r-- | board/ti/beagle/beagle.c | 43 |
2 files changed, 64 insertions, 2 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index b56a801..f0eca54 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -379,9 +379,14 @@ static struct cpsw_platform_data cpsw_data = { .host_port_num = 0, .version = CPSW_CTRL_VERSION_2, }; +#endif +#if defined(CONFIG_DRIVER_TI_CPSW) || \ + (defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET)) int board_eth_init(bd_t *bis) { + int rv, n = 0; +#ifdef CONFIG_DRIVER_TI_CPSW uint8_t mac_addr[6]; uint32_t mac_hi, mac_lo; @@ -400,7 +405,7 @@ int board_eth_init(bd_t *bis) if (is_valid_ether_addr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); else - return -1; + goto try_usbether; } if (board_is_bone() || board_is_bone_lt() || board_is_idk()) { @@ -413,6 +418,20 @@ int board_eth_init(bd_t *bis) PHY_INTERFACE_MODE_RGMII; } - return cpsw_register(&cpsw_data); + rv = cpsw_register(&cpsw_data); + if (rv < 0) + printf("Error %d registering CPSW switch\n", rv); + else + n += rv; +#endif +try_usbether: +#if defined(CONFIG_USB_ETHER) && !defined(CONFIG_SPL_BUILD) + rv = usb_eth_initialize(bis); + if (rv < 0) + printf("Error %d registering USB_ETHER\n", rv); + else + n += rv; +#endif + return n; } #endif diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 6175e1d..f20ebed 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -42,6 +42,11 @@ #include <asm/arch/sys_proto.h> #include <asm/gpio.h> #include <asm/mach-types.h> +#include <asm/omap_musb.h> +#include <asm/errno.h> +#include <linux/usb/ch9.h> +#include <linux/usb/gadget.h> +#include <linux/usb/musb.h> #include "beagle.h" #include <command.h> @@ -285,6 +290,33 @@ static void beagle_dvi_pup(void) } #endif +#ifdef 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_MUSB_HOST) + .mode = MUSB_HOST, +#elif defined(CONFIG_MUSB_GADGET) + .mode = MUSB_PERIPHERAL, +#else +#error "Please define either CONFIG_MUSB_HOST or CONFIG_MUSB_GADGET" +#endif + .config = &musb_config, + .power = 100, + .platform_ops = &omap2430_ops, + .board_data = &musb_board_data, +}; +#endif + /* * Routine: misc_init_r * Description: Configure board specific parts @@ -466,6 +498,10 @@ int misc_init_r(void) omap3_dss_enable(); #endif +#ifdef CONFIG_USB_MUSB_OMAP2PLUS + musb_register(&musb_plat, &musb_board_data, (void *)MUSB_BASE); +#endif + return 0; } @@ -513,3 +549,10 @@ int ehci_hcd_stop(int index) } #endif /* CONFIG_USB_EHCI */ + +#if defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET) +int board_eth_init(bd_t *bis) +{ + return usb_eth_initialize(bis); +} +#endif |