summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMateusz Zalega <m.zalega@samsung.com>2014-04-28 21:13:28 +0200
committerLukasz Majewski <l.majewski@samsung.com>2014-05-05 08:21:47 +0200
commitc4d0e856047f2689278ffea63a562c4f22a35ee3 (patch)
treeae6a7cb91039b0ffa70ae0ebcb4618896d5d725c /common
parentfad8edf0f72b8aba8885d2d137ebb58b3428806a (diff)
downloadu-boot-imx-c4d0e856047f2689278ffea63a562c4f22a35ee3.zip
u-boot-imx-c4d0e856047f2689278ffea63a562c4f22a35ee3.tar.gz
u-boot-imx-c4d0e856047f2689278ffea63a562c4f22a35ee3.tar.bz2
USB: gadget: added a saner gadget downloader registration API
Preprocessor definitions and hardcoded implementation selection in g_dnl core were replaced by a linker list made of (usb_function_name, bind_callback) pairs. Signed-off-by: Mateusz Zalega <m.zalega@samsung.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_dfu.c3
-rw-r--r--common/cmd_thordown.c3
-rw-r--r--common/cmd_usb_mass_storage.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c
index 5547678..a03538d 100644
--- a/common/cmd_dfu.c
+++ b/common/cmd_dfu.c
@@ -22,7 +22,6 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
char *interface = argv[2];
char *devstring = argv[3];
- char *s = "dfu";
int ret, i = 0;
ret = dfu_init_env_entities(interface, simple_strtoul(devstring,
@@ -38,7 +37,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int controller_index = simple_strtoul(usb_controller, NULL, 0);
board_usb_init(controller_index, USB_INIT_DEVICE);
- g_dnl_register(s);
+ g_dnl_register("usb_dnl_dfu");
while (1) {
if (dfu_reset())
/*
diff --git a/common/cmd_thordown.c b/common/cmd_thordown.c
index c4b3511..2dd7509 100644
--- a/common/cmd_thordown.c
+++ b/common/cmd_thordown.c
@@ -22,7 +22,6 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
char *interface = argv[2];
char *devstring = argv[3];
- const char *s = "thor";
int ret;
puts("TIZEN \"THOR\" Downloader\n");
@@ -40,7 +39,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
goto exit;
}
- g_dnl_register(s);
+ g_dnl_register("usb_dnl_thor");
ret = thor_init();
if (ret) {
diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c
index 14a5b6a..d8d9efd 100644
--- a/common/cmd_usb_mass_storage.c
+++ b/common/cmd_usb_mass_storage.c
@@ -40,7 +40,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_FAILURE;
}
- g_dnl_register("ums");
+ g_dnl_register("usb_dnl_ums");
/* Timeout unit: seconds */
int cable_ready_timeout = UMS_CABLE_READY_TIMEOUT;