summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 71f1024)
raw | patch | inline | side by side (parent: 71f1024)
author | x0265825 <x0265825@ti.com> | |
Tue, 17 Sep 2019 14:26:50 +0000 (19:56 +0530) | ||
committer | Hao Zhang <hzhang@ti.com> | |
Thu, 19 Sep 2019 15:17:25 +0000 (10:17 -0500) |
Updated the code to detect the serdes board and enables
the board library serdes configurations enable flag.
Signed-off-by: x0265825 <x0265825@ti.com>
the board library serdes configurations enable flag.
Signed-off-by: x0265825 <x0265825@ti.com>
diag/usb_host/src/usb_host_test.c | patch | blob | history | |
diag/usb_host/src/usb_host_test.h | patch | blob | history | |
diag/usb_host/src/usb_main.c | patch | blob | history |
index 8734a9fb47f12e09000fcd218c5a35688826fc37..2fb0dad440d5ffcecc1d29d86d9d963e0973d159 100644 (file)
#if !defined(DIAG_COMPLIANCE_TEST)
#if defined(am65xx_evm)
+ Board_STATUS status;
USB_Config* usb_config;
#endif
#endif
{
/* Enable USB30 bit for USB3.0 configuration */
#if defined(am65xx_evm)
- USB_getConfig(USB_INSTANCE_SER, &usb_config);
+ BoardDiag_enableI2C(0, CSL_WKUP_I2C0_CFG_BASE);
+ /* Check if SerDes application card is detected */
+ if(Board_detectBoard(SERDES_BRD_DETECT))
+ {
+ status = Board_init(BOARD_INIT_SERDES_PHY);
+ if(status != BOARD_SOK)
+ {
+ return -1;
+ }
+ USB_getConfig(USB_INSTANCE_SER, &usb_config);
- if (usb_config!=0)
- {
- usb_config->usb30Enabled = 1;
- }
+ if (usb_config!=0)
+ {
+ usb_config->usb30Enabled = 1;
+ }
+ }
+ else
+ {
+ UART_printf("\nSerDes Application Card not Connected!!\n");
+ UART_printf("Exiting the Test...\n");
+ return -1;
+ }
+ BoardDiag_enableI2C(0, CSL_I2C0_CFG_BASE);
#endif
usb_host_params.instanceNo = USB_INSTANCE_SER;
boardConnect = true;
boardCfg = BOARD_INIT_MODULE_CLOCK |
BOARD_INIT_PINMUX_CONFIG |
BOARD_INIT_UART_STDIO;
-/* serdes board initialization for USB3.0 */
-#elif defined(am65xx_evm)
- boardCfg = BOARD_INIT_SERDES_PHY|
- BOARD_INIT_UART_STDIO;
#else
boardCfg = BOARD_INIT_UART_STDIO;
#endif
index f9024628e85d740a2d4d4e88e7336b2c8c9d8524..80d32c5464c45a4d3a0e0500b88d8008d1e1f3c1 100644 (file)
#if (defined(SOC_AM65XX) && defined(BUILD_MCU))
#include "intRouter.h"
#endif
+#if defined(am65xx_evm)
+#include "board_cfg.h"
+#include "board_i2c_io_exp.h"
+#include "board_internal.h"
+#endif
#ifdef __cplusplus
extern "C" {
index aa139a8795698244f69f53ccfee63e82c15c1520..8cefd247c0f4ea93f6c11d48dedc2b113b164cbb 100644 (file)
#endif
USB_Handle usb_handle;
int rc;
-
-#ifdef USB3SS_EN
- USB_Config* usb_config;
-#endif
Board_initCfg boardCfg;
boardCfg = BOARD_INIT_MODULE_CLOCK |
/*osalTimerTest();*/
-#ifdef USB3SS_EN
- USB_getConfig(USB_INSTANCE, &usb_config);
-
- if (usb_config!=0)
- {
- usb_config->usb30Enabled = 1;
- }
-#endif
-
usb_host_params.usbMode = USB_HOST_MSC_MODE;
usb_host_params.instanceNo = USB_INSTANCE; /* USB port #1 */