public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] common: dfu: ignore reset for spl-dfu
Date: Thu, 27 Apr 2017 15:09:24 +0200	[thread overview]
Message-ID: <20170427150924.0336af9c@jawa> (raw)
In-Reply-To: <6C6B28D4DC342643927BEAFCE8707BF6C0B6E3EE@DBDE04.ent.ti.com>

Hi Ravi,

> Hi Lukasz
>   
> >> > >> +#ifdef CONFIG_SPL_BUILD
> >> > >> +	dfu_reset = 0;
> >> > >> +#endif
> >> > 
> >> > >Why do you only ifdef this part? What problem does this solve?
> >> > 
> >> > Common/dfu.c is common code for SPL and U-boot, for SPL-DFU 
> >> > dfu_reset should not be given. This is must fix. Also this avoid
> >> > use of run_command for SPL-DFU altogether, SPL size also will
> >> > reduce by removing cli.c/cli_hush.c
> >> 
> >> As I've metioned in the other mail. Kconfig option would be OK.
> 
> > And this Kconfig should be _only_ enabled for your SPL-DFU support
> > enabled (also in Kconfig).
> 
> I have already added CONFIG_SPL_DFU_NO_RESET option for SPL-DFU in
> Kconfig.
> 
> >> 
> >> Please look into the dfu_usb_get_reset() __weak function
> >> definition.
> >> 
> >> It is by default set to true.
> >> 
> >> You can extend this function to take into account a Kconfig option
> >> to return false during SPL builds. 
> >>
> 
> As suggested by you, I feel this is best option. 
> 
> I have test verified this option, will post in next patch version.
> 
> __weak bool dfu_usb_get_reset(void)
> {
> +#ifdef CONFIG_SPL_DFU_NO_RESET
> +	return false
> +#else
> 	return true;
> +#endif
> }
> 
> Also changing run_command() to do_reset().
> 
> If (dfu_reset)
> 	do_reset(NULL, 0, 0, NULL);

+1

One question - could you write some numbers before SPL dfu tinification
and afterwards?

I'm just curious how much we can save up.

>  
> Regards
> Ravi 
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

  reply	other threads:[~2017-04-27 13:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1493212325-31879-1-git-send-email-ravibabu@ti.com>
     [not found] ` <1493212325-31879-3-git-send-email-ravibabu@ti.com>
     [not found]   ` <20170427095527.2a3992fe@jawa>
2017-04-27  8:26     ` [U-Boot] [PATCH 2/3] common: dfu: ignore reset for spl-dfu B, Ravi
2017-04-27 10:33       ` Lukasz Majewski
2017-04-27 10:34         ` Lukasz Majewski
2017-04-27 11:19           ` B, Ravi
2017-04-27 13:09             ` Lukasz Majewski [this message]
2017-04-27 17:30               ` B, Ravi
     [not found] ` <1493212325-31879-4-git-send-email-ravibabu@ti.com>
     [not found]   ` <20170427095808.4a87f63c@jawa>
2017-04-27 11:21     ` [U-Boot] [PATCH 3/3] spl: dfu: reduce spl-dfu MLO size B, Ravi
2017-04-26 13:14 [U-Boot] [PATCH 0/3] spl: dfu: misc fixes and reduce MLO foot print Ravi Babu
2017-04-26 13:14 ` [U-Boot] [PATCH 2/3] common: dfu: ignore reset for spl-dfu Ravi Babu
2017-04-26 13:40   ` Tom Rini
2017-04-26 15:58     ` B, Ravi
2017-04-26 16:24       ` Tom Rini
2017-04-26 16:25         ` B, Ravi
2017-04-27  8:06         ` Lukasz Majewski
2017-04-27  8:37           ` B, Ravi
2017-04-27  8:37           ` B, Ravi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170427150924.0336af9c@jawa \
    --to=lukma@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox