From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 11 Apr 2014 09:44:25 +0200 Subject: [U-Boot] [PATCH v2] dfu, nand: add medium specific polltimeout function In-Reply-To: <1397195987-6543-1-git-send-email-hs@denx.de> References: <1397195987-6543-1-git-send-email-hs@denx.de> Message-ID: <201404110944.25818.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 On Friday, April 11, 2014 at 07:59:47 AM, Heiko Schocher wrote: > add a possibility to add a medium specific polltimeout > function. So it is possible to define different > poll timeouts. > > Used on nand medium, for setting the DFU_MANIFEST_POLL_TIMEOUT > only on nand ubi partitions, which is currently the only > usecase. > > Signed-off-by: Heiko Schocher > Cc: Lukasz Majewski > Cc: Kyungmin Park > Cc: Marek Vasut > Cc: Pantelis Antoniou > > --- > - changes for v2: > - add comment from Pantelis Antoniou > - add simple accessor for getting the poll timeout > dfu_get_manifest_timeout() > > drivers/dfu/dfu_nand.c | 13 +++++++++++++ > drivers/usb/gadget/f_dfu.c | 10 +++++++++- > include/dfu.h | 1 + > 3 files changed, 23 insertions(+), 1 deletion(-) > > diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c > index 2d07097..ccdbef6 100644 > --- a/drivers/dfu/dfu_nand.c > +++ b/drivers/dfu/dfu_nand.c > @@ -163,6 +163,18 @@ static int dfu_flush_medium_nand(struct dfu_entity > *dfu) return ret; > } > > +unsigned int dfu_polltimeout_nand(struct dfu_entity *dfu) > +{ > + /* > + * Currently, Poll Timeout != 0 is only needed on nand > + * ubi partition, as the not used sectors need an erase Don't you have to erase sectors before writing into them even on RAW NAND ? [..] Other than that: Reviewed-by: Marek Vasut Best regards, Marek Vasut