From 389f1856bd0882471214c2ac94da2b415362c10f Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Wed, 5 Aug 2015 16:58:17 +0200 Subject: dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression The following commit enforces CONFIG_DM_ETH for USB Ethernet which breaks any board using CONFIG_USB_HOST_ETHER without CONFIG_DM_ETH which this patch fixes. commit 69559093f6173dcfcb041df0995063bdbd07d49b dm: usb: Avoid using USB ethernet with CONFIG_DM_USB and no DM_ETH Tested on Colibri T20/T30 as well as Apalis T30 with CONFIG_USB_HOST_ETHER and CONFIG_USB_ETHER_ASIX enabled and a LevelOne USB-0301 ASIX AX88772 dongle. Signed-off-by: Marcel Ziswiler Acked-by: Simon Glass --- common/cmd_usb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 0ade7759f0..6874af7547 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -530,13 +530,16 @@ static void do_usb_start(void) /* try to recognize storage devices immediately */ usb_stor_curr_dev = usb_stor_scan(1); #endif +#endif #ifdef CONFIG_USB_HOST_ETHER # ifdef CONFIG_DM_ETH -# error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH" -# endif +# ifndef CONFIG_DM_USB +# error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH" +# endif +# else /* try to recognize ethernet devices immediately */ usb_ether_curr_dev = usb_host_eth_scan(1); -#endif +# endif #endif #ifdef CONFIG_USB_KEYBOARD drv_usb_kbd_init(); -- cgit From 224d1ddcc5fa18d88e2c735778c39b8df61016ea Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 2 Jul 2015 18:16:07 -0600 Subject: dm: pmic: Display the regulator limits on error When a regulator command cannot honour the requested voltage, display the limits to try to be helpful. Signed-off-by: Simon Glass Acked-by: Przemyslaw Marczak --- common/cmd_regulator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/cmd_regulator.c b/common/cmd_regulator.c index 6149d1ee44..793f08e81a 100644 --- a/common/cmd_regulator.c +++ b/common/cmd_regulator.c @@ -241,7 +241,8 @@ static int do_value(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) value = simple_strtoul(argv[1], NULL, 0); if ((value < uc_pdata->min_uV || value > uc_pdata->max_uV) && !force) { - printf("Value exceeds regulator constraint limits\n"); + printf("Value exceeds regulator constraint limits %d..%d uV\n", + uc_pdata->min_uV, uc_pdata->max_uV); return CMD_RET_FAILURE; } -- cgit