diff options
Diffstat (limited to 'board/ti')
-rw-r--r-- | board/ti/am335x/board.c | 16 | ||||
-rw-r--r-- | board/ti/am43xx/board.c | 10 | ||||
-rw-r--r-- | board/ti/am57xx/board.c | 22 | ||||
-rw-r--r-- | board/ti/beagle/beagle.c | 38 | ||||
-rw-r--r-- | board/ti/common/Kconfig | 1 | ||||
-rw-r--r-- | board/ti/common/board_detect.c | 18 | ||||
-rw-r--r-- | board/ti/dra7xx/evm.c | 14 | ||||
-rw-r--r-- | board/ti/evm/MAINTAINERS | 2 | ||||
-rw-r--r-- | board/ti/evm/evm.c | 128 | ||||
-rw-r--r-- | board/ti/evm/evm.h | 25 | ||||
-rw-r--r-- | board/ti/ks2_evm/README | 4 | ||||
-rw-r--r-- | board/ti/ks2_evm/board.c | 12 | ||||
-rw-r--r-- | board/ti/ks2_evm/board_k2g.c | 4 | ||||
-rw-r--r-- | board/ti/panda/panda.c | 4 | ||||
-rw-r--r-- | board/ti/ti814x/evm.c | 4 | ||||
-rw-r--r-- | board/ti/ti816x/evm.c | 4 |
16 files changed, 191 insertions, 115 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 0a16529b5f..1a52bffc00 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -249,8 +249,8 @@ int spl_start_uboot(void) #ifdef CONFIG_SPL_ENV_SUPPORT env_init(); - env_relocate_spec(); - if (getenv_yesno("boot_os") != 1) + env_load(); + if (env_get_yesno("boot_os") != 1) return 1; #endif @@ -731,7 +731,7 @@ int board_late_init(void) * on HS devices. */ if (get_device_type() == HS_DEVICE) - setenv("boot_fit", "1"); + env_set("boot_fit", "1"); #endif #if !defined(CONFIG_SPL_BUILD) @@ -745,11 +745,11 @@ int board_late_init(void) mac_addr[4] = mac_lo & 0xFF; mac_addr[5] = (mac_lo & 0xFF00) >> 8; - if (!getenv("ethaddr")) { + if (!env_get("ethaddr")) { printf("<ethaddr> not set. Validating first E-fuse MAC\n"); if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("ethaddr", mac_addr); + eth_env_set_enetaddr("ethaddr", mac_addr); } mac_lo = readl(&cdev->macid1l); @@ -761,9 +761,9 @@ int board_late_init(void) mac_addr[4] = mac_lo & 0xFF; mac_addr[5] = (mac_lo & 0xFF00) >> 8; - if (!getenv("eth1addr")) { + if (!env_get("eth1addr")) { if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("eth1addr", mac_addr); + eth_env_set_enetaddr("eth1addr", mac_addr); } #endif @@ -908,7 +908,7 @@ int board_eth_init(bd_t *bis) #if defined(CONFIG_USB_ETHER) && \ (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT)) if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("usbnet_devaddr", mac_addr); + eth_env_set_enetaddr("usbnet_devaddr", mac_addr); rv = usb_eth_initialize(bis); if (rv < 0) diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index 933596d59c..2c417e7545 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -626,7 +626,7 @@ int board_late_init(void) * on HS devices. */ if (get_device_type() == HS_DEVICE) - setenv("boot_fit", "1"); + env_set("boot_fit", "1"); #endif return 0; } @@ -791,10 +791,10 @@ int board_eth_init(bd_t *bis) mac_addr[4] = mac_lo & 0xFF; mac_addr[5] = (mac_lo & 0xFF00) >> 8; - if (!getenv("ethaddr")) { + if (!env_get("ethaddr")) { puts("<ethaddr> not set. Validating first E-fuse MAC\n"); if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("ethaddr", mac_addr); + eth_env_set_enetaddr("ethaddr", mac_addr); } mac_lo = readl(&cdev->macid1l); @@ -806,9 +806,9 @@ int board_eth_init(bd_t *bis) mac_addr[4] = mac_lo & 0xFF; mac_addr[5] = (mac_lo & 0xFF00) >> 8; - if (!getenv("eth1addr")) { + if (!env_get("eth1addr")) { if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("eth1addr", mac_addr); + eth_env_set_enetaddr("eth1addr", mac_addr); } if (board_is_eposevm()) { diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 00a31a97fd..7e7056cf71 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -592,7 +592,7 @@ void am57x_idk_lcd_detect(void) /* we will let default be "no lcd" */ } out: - setenv("idk_lcd", idk_lcd); + env_set("idk_lcd", idk_lcd); return; } @@ -612,7 +612,7 @@ int board_late_init(void) * on HS devices. */ if (get_device_type() == HS_DEVICE) - setenv("boot_fit", "1"); + env_set("boot_fit", "1"); /* * Set the GPIO7 Pad to POWERHOLD. This has higher priority @@ -742,8 +742,8 @@ int spl_start_uboot(void) #ifdef CONFIG_SPL_ENV_SUPPORT env_init(); - env_relocate_spec(); - if (getenv_yesno("boot_os") != 1) + env_load(); + if (env_get_yesno("boot_os") != 1) return 1; #endif @@ -933,11 +933,11 @@ int board_eth_init(bd_t *bis) mac_addr[4] = (mac_lo & 0xFF00) >> 8; mac_addr[5] = mac_lo & 0xFF; - if (!getenv("ethaddr")) { + if (!env_get("ethaddr")) { printf("<ethaddr> not set. Validating first E-fuse MAC\n"); if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("ethaddr", mac_addr); + eth_env_set_enetaddr("ethaddr", mac_addr); } mac_lo = readl((*ctrl)->control_core_mac_id_1_lo); @@ -949,9 +949,9 @@ int board_eth_init(bd_t *bis) mac_addr[4] = (mac_lo & 0xFF00) >> 8; mac_addr[5] = mac_lo & 0xFF; - if (!getenv("eth1addr")) { + if (!env_get("eth1addr")) { if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("eth1addr", mac_addr); + eth_env_set_enetaddr("eth1addr", mac_addr); } ctrl_val = readl((*ctrl)->control_core_control_io1) & (~0x33); @@ -986,9 +986,9 @@ int board_eth_init(bd_t *bis) for (i = 0; i < num_macs; i++) { u64_to_mac(mac1 + i, mac_addr); if (is_valid_ethaddr(mac_addr)) { - eth_setenv_enetaddr_by_index("eth", - i + 2, - mac_addr); + eth_env_set_enetaddr_by_index("eth", + i + 2, + mac_addr); } } } diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 887b577b6a..2f62fbec69 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -341,16 +341,16 @@ int misc_init_r(void) switch (get_board_revision()) { case REVISION_AXBX: printf("Beagle Rev Ax/Bx\n"); - setenv("beaglerev", "AxBx"); + env_set("beaglerev", "AxBx"); break; case REVISION_CX: printf("Beagle Rev C1/C2/C3\n"); - setenv("beaglerev", "Cx"); + env_set("beaglerev", "Cx"); MUX_BEAGLE_C(); break; case REVISION_C4: printf("Beagle Rev C4\n"); - setenv("beaglerev", "C4"); + env_set("beaglerev", "C4"); MUX_BEAGLE_C(); /* Set VAUX2 to 1.8V for EHCI PHY */ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, @@ -360,7 +360,7 @@ int misc_init_r(void) break; case REVISION_XM_AB: printf("Beagle xM Rev A/B\n"); - setenv("beaglerev", "xMAB"); + env_set("beaglerev", "xMAB"); MUX_BEAGLE_XM(); /* Set VAUX2 to 1.8V for EHCI PHY */ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, @@ -371,7 +371,7 @@ int misc_init_r(void) break; case REVISION_XM_C: printf("Beagle xM Rev C\n"); - setenv("beaglerev", "xMC"); + env_set("beaglerev", "xMC"); MUX_BEAGLE_XM(); /* Set VAUX2 to 1.8V for EHCI PHY */ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, @@ -397,14 +397,14 @@ int misc_init_r(void) expansion_config.revision, expansion_config.fab_revision); MUX_TINCANTOOLS_ZIPPY(); - setenv("buddy", "zippy"); + env_set("buddy", "zippy"); break; case TINCANTOOLS_ZIPPY2: printf("Recognized Tincantools Zippy2 board (rev %d %s)\n", expansion_config.revision, expansion_config.fab_revision); MUX_TINCANTOOLS_ZIPPY(); - setenv("buddy", "zippy2"); + env_set("buddy", "zippy2"); break; case TINCANTOOLS_TRAINER: printf("Recognized Tincantools Trainer board (rev %d %s)\n", @@ -412,37 +412,37 @@ int misc_init_r(void) expansion_config.fab_revision); MUX_TINCANTOOLS_ZIPPY(); MUX_TINCANTOOLS_TRAINER(); - setenv("buddy", "trainer"); + env_set("buddy", "trainer"); break; case TINCANTOOLS_SHOWDOG: printf("Recognized Tincantools Showdow board (rev %d %s)\n", expansion_config.revision, expansion_config.fab_revision); /* Place holder for DSS2 definition for showdog lcd */ - setenv("defaultdisplay", "showdoglcd"); - setenv("buddy", "showdog"); + env_set("defaultdisplay", "showdoglcd"); + env_set("buddy", "showdog"); break; case KBADC_BEAGLEFPGA: printf("Recognized KBADC Beagle FPGA board\n"); MUX_KBADC_BEAGLEFPGA(); - setenv("buddy", "beaglefpga"); + env_set("buddy", "beaglefpga"); break; case LW_BEAGLETOUCH: printf("Recognized Liquidware BeagleTouch board\n"); - setenv("buddy", "beagletouch"); + env_set("buddy", "beagletouch"); break; case BRAINMUX_LCDOG: printf("Recognized Brainmux LCDog board\n"); - setenv("buddy", "lcdog"); + env_set("buddy", "lcdog"); break; case BRAINMUX_LCDOGTOUCH: printf("Recognized Brainmux LCDog Touch board\n"); - setenv("buddy", "lcdogtouch"); + env_set("buddy", "lcdogtouch"); break; case BBTOYS_WIFI: printf("Recognized BeagleBoardToys WiFi board\n"); MUX_BBTOYS_WIFI() - setenv("buddy", "bbtoys-wifi"); + env_set("buddy", "bbtoys-wifi"); break; case BBTOYS_VGA: printf("Recognized BeagleBoardToys VGA board\n"); @@ -459,20 +459,20 @@ int misc_init_r(void) case LSR_COM6L_ADPT: printf("Recognized LSR COM6L Adapter Board\n"); MUX_BBTOYS_WIFI() - setenv("buddy", "lsr-com6l-adpt"); + env_set("buddy", "lsr-com6l-adpt"); break; case BEAGLE_NO_EEPROM: printf("No EEPROM on expansion board\n"); - setenv("buddy", "none"); + env_set("buddy", "none"); break; default: printf("Unrecognized expansion board: %x\n", expansion_config.device_vendor); - setenv("buddy", "unknown"); + env_set("buddy", "unknown"); } if (expansion_config.content == 1) - setenv(expansion_config.env_var, expansion_config.env_setting); + env_set(expansion_config.env_var, expansion_config.env_setting); twl4030_power_init(); switch (get_board_revision()) { diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig index c81baa12be..c21eb8c2d2 100644 --- a/board/ti/common/Kconfig +++ b/board/ti/common/Kconfig @@ -42,4 +42,3 @@ config TI_COMMON_CMD_OPTIONS imply CMD_SPI imply CMD_TIME imply CMD_USB if USB - imply ENV_IS_IN_FAT if MMC_OMAP_HS diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index 1da5ace923..6f07ec331a 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -379,21 +379,21 @@ void __maybe_unused set_board_info_env(char *name) struct ti_common_eeprom *ep = TI_EEPROM_DATA; if (name) - setenv("board_name", name); + env_set("board_name", name); else if (ep->name) - setenv("board_name", ep->name); + env_set("board_name", ep->name); else - setenv("board_name", unknown); + env_set("board_name", unknown); if (ep->version) - setenv("board_rev", ep->version); + env_set("board_rev", ep->version); else - setenv("board_rev", unknown); + env_set("board_rev", unknown); if (ep->serial) - setenv("board_serial", ep->serial); + env_set("board_serial", ep->serial); else - setenv("board_serial", unknown); + env_set("board_serial", unknown); } static u64 mac_to_u64(u8 mac[6]) @@ -451,8 +451,8 @@ void board_ti_set_ethaddr(int index) for (i = 0; i < num_macs; i++) { u64_to_mac(mac1 + i, mac_addr); if (is_valid_ethaddr(mac_addr)) { - eth_setenv_enetaddr_by_index("eth", i + index, - mac_addr); + eth_env_set_enetaddr_by_index("eth", i + index, + mac_addr); } } } diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 7d36f03fa1..93d3d0b54e 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -558,7 +558,7 @@ int board_late_init(void) * on HS devices. */ if (get_device_type() == HS_DEVICE) - setenv("boot_fit", "1"); + env_set("boot_fit", "1"); omap_die_id_serial(); omap_set_fastboot_vars(); @@ -825,8 +825,8 @@ int spl_start_uboot(void) #ifdef CONFIG_SPL_ENV_SUPPORT env_init(); - env_relocate_spec(); - if (getenv_yesno("boot_os") != 1) + env_load(); + if (env_get_yesno("boot_os") != 1) return 1; #endif @@ -893,11 +893,11 @@ int board_eth_init(bd_t *bis) mac_addr[4] = (mac_lo & 0xFF00) >> 8; mac_addr[5] = mac_lo & 0xFF; - if (!getenv("ethaddr")) { + if (!env_get("ethaddr")) { printf("<ethaddr> not set. Validating first E-fuse MAC\n"); if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("ethaddr", mac_addr); + eth_env_set_enetaddr("ethaddr", mac_addr); } mac_lo = readl((*ctrl)->control_core_mac_id_1_lo); @@ -909,9 +909,9 @@ int board_eth_init(bd_t *bis) mac_addr[4] = (mac_lo & 0xFF00) >> 8; mac_addr[5] = mac_lo & 0xFF; - if (!getenv("eth1addr")) { + if (!env_get("eth1addr")) { if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("eth1addr", mac_addr); + eth_env_set_enetaddr("eth1addr", mac_addr); } ctrl_val = readl((*ctrl)->control_core_control_io1) & (~0x33); diff --git a/board/ti/evm/MAINTAINERS b/board/ti/evm/MAINTAINERS index 612a08ace0..cd315c1635 100644 --- a/board/ti/evm/MAINTAINERS +++ b/board/ti/evm/MAINTAINERS @@ -1,5 +1,5 @@ EVM BOARD -M: Tom Rini <trini@konsulko.com> +M: Derald D. Woods <woods.technical@gmail.com> S: Maintained F: board/ti/evm/ F: include/configs/omap3_evm.h diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c index a6c5a3d8e1..6bf57f9269 100644 --- a/board/ti/evm/evm.c +++ b/board/ti/evm/evm.c @@ -12,6 +12,8 @@ * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> +#include <dm.h> +#include <ns16550.h> #include <netdev.h> #include <asm/io.h> #include <asm/arch/mem.h> @@ -22,14 +24,35 @@ #include <i2c.h> #include <twl4030.h> #include <asm/mach-types.h> +#include <asm/omap_musb.h> #include <linux/mtd/nand.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 +#ifdef CONFIG_USB_EHCI_HCD +#include <usb.h> +#include <asm/ehci-omap.h> +#endif + +#define OMAP3EVM_GPIO_ETH_RST_GEN1 64 +#define OMAP3EVM_GPIO_ETH_RST_GEN2 7 DECLARE_GLOBAL_DATA_PTR; +static const struct ns16550_platdata omap3_evm_serial = { + .base = OMAP34XX_UART1, + .reg_shift = 2, + .clock = V_NS16550_CLK, + .fcr = UART_FCR_DEFVAL, +}; + +U_BOOT_DEVICE(omap3_evm_uart) = { + "ns16550_serial", + &omap3_evm_serial +}; + static u32 omap3_evm_version; u32 get_omap3_evm_rev(void) @@ -60,25 +83,19 @@ static void omap3_evm_get_revision(void) default: omap3_evm_version = OMAP3EVM_BOARD_GEN_2; } -#else +#else /* !CONFIG_CMD_NET */ #if defined(CONFIG_STATIC_BOARD_REV) - /* - * Look for static defintion of the board revision - */ + /* Look for static defintion of the board revision */ omap3_evm_version = CONFIG_STATIC_BOARD_REV; #else - /* - * Fallback to the default above. - */ + /* Fallback to the default above */ omap3_evm_version = OMAP3EVM_BOARD_GEN_2; -#endif -#endif /* CONFIG_CMD_NET */ +#endif /* CONFIG_STATIC_BOARD_REV */ +#endif /* CONFIG_CMD_NET */ } -#ifdef CONFIG_USB_OMAP3 -/* - * MUSB port on OMAP3EVM Rev >= E requires extvbus programming. - */ +#if defined(CONFIG_USB_MUSB_GADGET) || defined(CONFIG_USB_MUSB_HOST) +/* MUSB port on OMAP3EVM Rev >= E requires extvbus programming. */ u8 omap3_evm_need_extvbus(void) { u8 retval = 0; @@ -88,7 +105,7 @@ u8 omap3_evm_need_extvbus(void) return retval; } -#endif +#endif /* CONFIG_USB_MUSB_{GADGET,HOST} */ /* * Routine: board_init @@ -105,7 +122,7 @@ int board_init(void) return 0; } -#ifdef CONFIG_SPL_BUILD +#if defined(CONFIG_SPL_BUILD) /* * Routine: get_board_mem_timings * Description: If we use SPL then there is no x-loader nor config header @@ -138,7 +155,34 @@ void get_board_mem_timings(struct board_sdrc_timings *timings) timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; timings->mr = MICRON_V_MR_165; } -#endif +#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 @@ -146,6 +190,7 @@ void get_board_mem_timings(struct board_sdrc_timings *timings) */ 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); @@ -161,6 +206,13 @@ int misc_init_r(void) #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) + omap_die_id_usbethaddr(); +#endif return 0; } @@ -175,7 +227,7 @@ void set_muxconf_regs(void) MUX_EVM(); } -#ifdef CONFIG_CMD_NET +#if defined(CONFIG_CMD_NET) /* * Routine: setup_net_chip * Description: Setting up the configuration GPMC registers specific to the @@ -237,7 +289,7 @@ static void reset_net_chip(void) int board_eth_init(bd_t *bis) { int rc = 0; -#ifdef CONFIG_SMC911X +#if defined(CONFIG_SMC911X) #define STR_ENV_ETHADDR "ethaddr" struct eth_device *dev; @@ -245,16 +297,16 @@ int board_eth_init(bd_t *bis) rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); - if (!eth_getenv_enetaddr(STR_ENV_ETHADDR, eth_addr)) { + if (!eth_env_get_enetaddr(STR_ENV_ETHADDR, eth_addr)) { dev = eth_get_dev_by_index(0); if (dev) { - eth_setenv_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); + eth_env_set_enetaddr(STR_ENV_ETHADDR, dev->enetaddr); } else { printf("omap3evm: Couldn't get eth device\n"); rc = -1; } } -#endif +#endif /* CONFIG_SMC911X */ return rc; } #endif /* CONFIG_CMD_NET */ @@ -264,11 +316,35 @@ int board_mmc_init(bd_t *bis) { return omap_mmc_init(0, 0, 0, -1, -1); } -#endif -#if defined(CONFIG_MMC) void board_mmc_power_init(void) { twl4030_power_mmc_init(0); } -#endif +#endif /* CONFIG_MMC */ + +#if defined(CONFIG_USB_EHCI_HCD) +static struct omap_usbhs_board_data usbhs_bdata = { + .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED, + .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, + .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED +}; + +int ehci_hcd_init(int index, enum usb_init_type init, + struct ehci_hccr **hccr, struct ehci_hcor **hcor) +{ + return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); +} + +int ehci_hcd_stop(int index) +{ + return omap_ehci_hcd_stop(); +} +#endif /* CONFIG_USB_EHCI_HCD */ + +#if defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET) && !defined(CONFIG_CMD_NET) +int board_eth_init(bd_t *bis) +{ + return usb_eth_initialize(bis); +} +#endif /* CONFIG_USB_ETHER */ diff --git a/board/ti/evm/evm.h b/board/ti/evm/evm.h index 91e9b88c54..0f8268b33e 100644 --- a/board/ti/evm/evm.h +++ b/board/ti/evm/evm.h @@ -278,12 +278,19 @@ static void reset_net_chip(void); /* TS_PEN_IRQ */\ MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /*GPIO_176*/\ /* - LAN_INTR*/\ - MUX_VAL(CP(MCSPI1_CS3), (IEN | PTD | EN | M0)) /*McSPI1_CS3*/\ - MUX_VAL(CP(MCSPI2_CLK), (IEN | PTD | DIS | M0)) /*McSPI2_CLK*/\ - MUX_VAL(CP(MCSPI2_SIMO), (IEN | PTD | DIS | M0)) /*McSPI2_SIMO*/\ - MUX_VAL(CP(MCSPI2_SOMI), (IEN | PTD | DIS | M0)) /*McSPI2_SOMI*/\ - MUX_VAL(CP(MCSPI2_CS0), (IEN | PTD | EN | M0)) /*McSPI2_CS0*/\ - MUX_VAL(CP(MCSPI2_CS1), (IEN | PTD | EN | M0)) /*McSPI2_CS1*/\ + /* USB EHCI (port 2) */\ + MUX_VAL(CP(MCSPI1_CS3), (IEN | PTD | EN | M3)) /*HSUSB2_DATA2*/\ + MUX_VAL(CP(MCSPI2_CLK), (IEN | PTD | EN | M3)) /*HSUSB2_DATA7*/\ + MUX_VAL(CP(MCSPI2_SIMO), (IEN | PTD | EN | M3)) /*HSUSB2_DATA4*/\ + MUX_VAL(CP(MCSPI2_SOMI), (IEN | PTD | EN | M3)) /*HSUSB2_DATA5*/\ + MUX_VAL(CP(MCSPI2_CS0), (IEN | PTD | EN | M3)) /*HSUSB2_DATA6*/\ + MUX_VAL(CP(MCSPI2_CS1), (IEN | PTD | EN | M3)) /*HSUSB2_DATA3*/\ + MUX_VAL(CP(ETK_D10_ES2), (IDIS | PTD | DIS | M3)) /*HSUSB2_CLK*/\ + MUX_VAL(CP(ETK_D11_ES2), (IDIS | PTD | DIS | M3)) /*HSUSB2_STP*/\ + MUX_VAL(CP(ETK_D12_ES2), (IEN | PTD | EN | M3)) /*HSUSB2_DIR*/\ + MUX_VAL(CP(ETK_D13_ES2), (IEN | PTD | EN | M3)) /*HSUSB2_NXT*/\ + MUX_VAL(CP(ETK_D14_ES2), (IEN | PTD | EN | M3)) /*HSUSB2_DATA0*/\ + MUX_VAL(CP(ETK_D15_ES2), (IEN | PTD | EN | M3)) /*HSUSB2_DATA1*/\ /*Control and debug */\ MUX_VAL(CP(SYS_32K), (IEN | PTD | DIS | M0)) /*SYS_32K*/\ MUX_VAL(CP(SYS_CLKREQ), (IEN | PTD | DIS | M0)) /*SYS_CLKREQ*/\ @@ -318,12 +325,6 @@ static void reset_net_chip(void); MUX_VAL(CP(ETK_D7_ES2 ), (IEN | PTD | DIS | M0)) /*ETK_D7*/\ MUX_VAL(CP(ETK_D8_ES2 ), (IEN | PTD | DIS | M0)) /*ETK_D8*/\ MUX_VAL(CP(ETK_D9_ES2 ), (IEN | PTD | DIS | M0)) /*ETK_D9*/\ - MUX_VAL(CP(ETK_D10_ES2), (IEN | PTD | DIS | M0)) /*ETK_D10*/\ - MUX_VAL(CP(ETK_D11_ES2), (IEN | PTD | DIS | M0)) /*ETK_D11*/\ - MUX_VAL(CP(ETK_D12_ES2), (IEN | PTD | DIS | M0)) /*ETK_D12*/\ - MUX_VAL(CP(ETK_D13_ES2), (IEN | PTD | DIS | M0)) /*ETK_D13*/\ - MUX_VAL(CP(ETK_D14_ES2), (IEN | PTD | DIS | M0)) /*ETK_D14*/\ - MUX_VAL(CP(ETK_D15_ES2), (IEN | PTD | DIS | M0)) /*ETK_D15*/\ /*Die to Die */\ MUX_VAL(CP(D2D_MCAD1), (IEN | PTD | EN | M0)) /*d2d_mcad1*/\ MUX_VAL(CP(D2D_MCAD2), (IEN | PTD | EN | M0)) /*d2d_mcad2*/\ diff --git a/board/ti/ks2_evm/README b/board/ti/ks2_evm/README index 5430c7daf2..a26b7f8131 100644 --- a/board/ti/ks2_evm/README +++ b/board/ti/ks2_evm/README @@ -61,7 +61,7 @@ configs/k2g_evm_defconfig Supported boot modes: - SPI NOR boot - - AEMIF NAND boot + - AEMIF NAND boot (K2E, K2L and K2HK) - UART boot - MMC boot (Only on K2G) @@ -69,7 +69,7 @@ Supported image formats: - u-boot.bin: for loading and running u-boot.bin through Texas Instruments code composure studio (CCS) and for UART boot. - u-boot-spi.gph: gpimage for programming SPI NOR flash for SPI NOR boot - - MLO: gpimage for programming AEMIF NAND flash for NAND boot, MMC boot. + - MLO: gpimage for programming NAND flash for NAND boot, MMC boot. Build instructions: =================== diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index c61baeeb8c..ae86dfbe0a 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -74,7 +74,7 @@ int get_eth_env_param(char *env_name) char *env; int res = -1; - env = getenv(env_name); + env = env_get(env_name); if (env) res = simple_strtol(env, NULL, 0); @@ -151,9 +151,9 @@ int ft_board_setup(void *blob, bd_t *bd) u32 ddr3a_size; int unitrd_fixup = 0; - env = getenv("mem_lpae"); + env = env_get("mem_lpae"); lpae = env && simple_strtol(env, NULL, 0); - env = getenv("uinitrd_fixup"); + env = env_get("uinitrd_fixup"); unitrd_fixup = env && simple_strtol(env, NULL, 0); ddr3a_size = 0; @@ -180,13 +180,13 @@ int ft_board_setup(void *blob, bd_t *bd) } /* reserve memory at start of bank */ - env = getenv("mem_reserve_head"); + env = env_get("mem_reserve_head"); if (env) { start[0] += ustrtoul(env, &endp, 0); size[0] -= ustrtoul(env, &endp, 0); } - env = getenv("mem_reserve"); + env = env_get("mem_reserve"); if (env) size[0] -= ustrtoul(env, &endp, 0); @@ -251,7 +251,7 @@ void ft_board_setup_ex(void *blob, bd_t *bd) char *env; u64 *reserve_start; - env = getenv("mem_lpae"); + env = env_get("mem_lpae"); lpae = env && simple_strtol(env, NULL, 0); if (lpae) { diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 21605762ef..15f0f54af6 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -310,9 +310,9 @@ int board_late_init(void) #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG if (board_is_k2g_gp()) - setenv("board_name", "66AK2GGP\0"); + env_set("board_name", "66AK2GGP\0"); else if (board_is_k2g_ice()) - setenv("board_name", "66AK2GIC\0"); + env_set("board_name", "66AK2GIC\0"); #endif return 0; } diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index 6ffb53c4c6..c59e58a82a 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -103,7 +103,7 @@ int get_board_revision(void) board_id4 = gpio_get_value(PANDA_ES_BOARD_ID_4_GPIO); #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG - setenv("board_name", "panda-es"); + env_set("board_name", "panda-es"); #endif board_id = ((board_id4 << 4) | (board_id3 << 3) | (board_id2 << 2) | (board_id1 << 1) | (board_id0)); @@ -117,7 +117,7 @@ int get_board_revision(void) #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG if ((board_id >= 0x3) && (processor_rev == OMAP4430_ES2_3)) - setenv("board_name", "panda-a4"); + env_set("board_name", "panda-a4"); #endif } diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c index 055a29d9c6..cdde6a8ca3 100644 --- a/board/ti/ti814x/evm.c +++ b/board/ti/ti814x/evm.c @@ -166,7 +166,7 @@ int board_eth_init(bd_t *bis) uint8_t mac_addr[6]; uint32_t mac_hi, mac_lo; - if (!eth_getenv_enetaddr("ethaddr", mac_addr)) { + if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { printf("<ethaddr> not set. Reading from E-fuse\n"); /* try reading mac address from efuse */ mac_lo = readl(&cdev->macid0l); @@ -179,7 +179,7 @@ int board_eth_init(bd_t *bis) mac_addr[5] = (mac_lo & 0xFF00) >> 8; if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("ethaddr", mac_addr); + eth_env_set_enetaddr("ethaddr", mac_addr); else printf("Unable to read MAC address. Set <ethaddr>\n"); } diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c index 9d6c3d6b5d..cb40cc5f47 100644 --- a/board/ti/ti816x/evm.c +++ b/board/ti/ti816x/evm.c @@ -38,7 +38,7 @@ int board_eth_init(bd_t *bis) uint32_t mac_hi, mac_lo; struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; - if (!eth_getenv_enetaddr("ethaddr", mac_addr)) { + if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { printf("<ethaddr> not set. Reading from E-fuse\n"); /* try reading mac address from efuse */ mac_lo = readl(&cdev->macid0l); @@ -51,7 +51,7 @@ int board_eth_init(bd_t *bis) mac_addr[5] = (mac_lo & 0xFF00) >> 8; if (is_valid_ethaddr(mac_addr)) - eth_setenv_enetaddr("ethaddr", mac_addr); + eth_env_set_enetaddr("ethaddr", mac_addr); else printf("Unable to read MAC address. Set <ethaddr>\n"); } |