aboutsummaryrefslogtreecommitdiff
path: root/board/compulab
diff options
context:
space:
mode:
authorJagan Teki <jagan@amarulasolutions.com>2018-07-20 12:43:56 +0530
committerJagan Teki <jagan@amarulasolutions.com>2018-08-23 17:31:24 +0530
commit8b8d59f323d7fbd589ecb32b408841b675ca53f7 (patch)
treedc78ea6e5360a3bbd74f90cc260f78828bd2efdd /board/compulab
parentb71d9e8b3805305ea4116733f515061710ad7081 (diff)
downloadu-boot-8b8d59f323d7fbd589ecb32b408841b675ca53f7.zip
u-boot-8b8d59f323d7fbd589ecb32b408841b675ca53f7.tar.gz
u-boot-8b8d59f323d7fbd589ecb32b408841b675ca53f7.tar.bz2
usb: musb-new: Fix improper musb host pointer
When MUSB is operating in peripheral mode, probe registering musb core using musb_register which intern return int value for validation. so there is no scope to preserve struct musb pointer but the same can be used in .remove musb_stop. So fix this by return musb_register with struct musb pointer. Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Purna Chandra Mandal <purna.mandal@microchip.com> Tested-by: Chen-Yu Tsai <wens@csie.org> # A33-OlinuXino Tested-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'board/compulab')
-rw-r--r--board/compulab/cm_t3517/cm_t3517.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/compulab/cm_t3517/cm_t3517.c b/board/compulab/cm_t3517/cm_t3517.c
index 09cb27d..668bb76 100644
--- a/board/compulab/cm_t3517/cm_t3517.c
+++ b/board/compulab/cm_t3517/cm_t3517.c
@@ -74,8 +74,8 @@ static void cm_t3517_musb_init(void)
CONF2_REFFREQ_13MHZ | CONF2_SESENDEN |
CONF2_VBDTCTEN | CONF2_DATPOL);
- if (musb_register(&cm_t3517_musb_pdata, &cm_t3517_musb_board_data,
- (void *)AM35XX_IPSS_USBOTGSS_BASE))
+ if (!musb_register(&cm_t3517_musb_pdata, &cm_t3517_musb_board_data,
+ (void *)AM35XX_IPSS_USBOTGSS_BASE))
printf("Failed initializing AM35x MUSB!\n");
}
#else