From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 28 Nov 2012 03:45:04 +0100 Subject: [U-Boot] [PATCH 3/9] Only perform DFU board_usb_init() for TRATS In-Reply-To: <1354106642-4587-4-git-send-email-panto@antoniou-consulting.com> References: <1354106642-4587-1-git-send-email-panto@antoniou-consulting.com> <1354106642-4587-4-git-send-email-panto@antoniou-consulting.com> Message-ID: <201211280345.05104.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Pantelis Antoniou, > USB initialization shouldn't happen for all the boards. > > Signed-off-by: Pantelis Antoniou > --- > common/cmd_dfu.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c > index 01d6b3a..327c738 100644 > --- a/common/cmd_dfu.c > +++ b/common/cmd_dfu.c > @@ -55,7 +55,10 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, > char * const argv[]) goto done; > } > > +#ifdef CONFIG_TRATS > board_usb_init(); > +#endif > + It's common code: 1) Why is it called "board_usb_init()" ? Does this have anything to do with usb host? 2) Make it __weak, then if it's undefined for your board, something default will be called. > g_dnl_register(s); > while (1) { > if (ctrlc()) Best regards, Marek Vasut