<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/dfu, branch v2016.05</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>Merge branch 'master' of git://git.denx.de/u-boot-usb</title>
<updated>2016-05-07T02:12:15+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2016-05-07T02:12:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7b4f17bf3653ffff0d5d7b76bb8c2d8c293db4ce'/>
<id>7b4f17bf3653ffff0d5d7b76bb8c2d8c293db4ce</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>dfu: avoid memory leak</title>
<updated>2016-05-06T18:06:56+00:00</updated>
<author>
<name>Peng Fan</name>
<email>van.freenix@gmail.com</email>
</author>
<published>2016-05-03T02:24:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5d8fae79163e94671956c99654abf48cf49757ba'/>
<id>5d8fae79163e94671956c99654abf48cf49757ba</id>
<content type='text'>
When dfu_fill_entity fail, need to free dfu to avoid memory leak.

Reported by Coverity:
"
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable dfu going out of scope leaks the storage
it points to.
"

Signed-off-by: Peng Fan &lt;van.freenix@gmail.com&gt;
Cc: "Łukasz Majewski" &lt;l.majewski@samsung.com&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When dfu_fill_entity fail, need to free dfu to avoid memory leak.

Reported by Coverity:
"
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable dfu going out of scope leaks the storage
it points to.
"

Signed-off-by: Peng Fan &lt;van.freenix@gmail.com&gt;
Cc: "Łukasz Majewski" &lt;l.majewski@samsung.com&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix various typos, scattered over the code.</title>
<updated>2016-05-06T01:39:26+00:00</updated>
<author>
<name>Robert P. J. Day</name>
<email>rpjday@crashcourse.ca</email>
</author>
<published>2016-05-04T08:47:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1cc0a9f49657734c54939f03fc1e3ca0ec9d7eef'/>
<id>1cc0a9f49657734c54939f03fc1e3ca0ec9d7eef</id>
<content type='text'>
Spelling corrections for (among other things):

* environment
* override
* variable
* ftd (should be "fdt", for flattened device tree)
* embedded
* FTDI
* emulation
* controller
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Spelling corrections for (among other things):

* environment
* override
* variable
* ftd (should be "fdt", for flattened device tree)
* embedded
* FTDI
* emulation
* controller
</pre>
</div>
</content>
</entry>
<entry>
<title>dfu: ram: fix number base of RAM entity parameters</title>
<updated>2016-04-25T15:56:30+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2016-04-22T19:34:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3517de6d26de7baeddb2c9e9bf145456c35885e1'/>
<id>3517de6d26de7baeddb2c9e9bf145456c35885e1</id>
<content type='text'>
U-Boot typically interprets unprefixed numbers as base 16, and DFU RAM
entity parsing has historically done so. Reverse the change to default
to base 10, so that values in previously working command-lines aren't
mis-parsed, causing RAM corruption, crashes, hangs, etc.

Fixes: 6aeb877afef0 ("drivers: dfu: ram: fix a crash with dfu ram with invalid dfu_alt_info env")

Cc: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Tested-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
[Test HW: AM335x BBB]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
U-Boot typically interprets unprefixed numbers as base 16, and DFU RAM
entity parsing has historically done so. Reverse the change to default
to base 10, so that values in previously working command-lines aren't
mis-parsed, causing RAM corruption, crashes, hangs, etc.

Fixes: 6aeb877afef0 ("drivers: dfu: ram: fix a crash with dfu ram with invalid dfu_alt_info env")

Cc: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Tested-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
[Test HW: AM335x BBB]
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: dfu: ram: fix a crash with dfu ram with invalid dfu_alt_info env</title>
<updated>2016-04-25T15:56:30+00:00</updated>
<author>
<name>Mugunthan V N</name>
<email>mugunthanvnm@ti.com</email>
</author>
<published>2016-04-22T08:49:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e1b0f6fe3d0a0317486fb879e83dc1440cac3029'/>
<id>e1b0f6fe3d0a0317486fb879e83dc1440cac3029</id>
<content type='text'>
U-Boot crashes when an invalid dfu_alt_info is set and tried
using dfu command. Fixing this as it is handled in dfu-mmc.

=&gt; dfu 0 ram 0
data abort
pc : [&lt;9ff893d6&gt;]          lr : [&lt;9ff6edb9&gt;]
reloc pc : [&lt;808323d6&gt;]    lr : [&lt;80817db9&gt;]
sp : 9ef36cf0  ip : 00000158     fp : 9ffbc0b8
r10: 9ffbc0b8  r9 : 9ef36ed8     r8 : 00000000
r7 : 00000000  r6 : 9ffbc0c8     r5 : 9ef36cfc  r4 : 9ef392c8
r3 : 00000004  r2 : 00000000     r1 : 9ff9a985  r0 : ffffffff
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

resetting ...

Signed-off-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
U-Boot crashes when an invalid dfu_alt_info is set and tried
using dfu command. Fixing this as it is handled in dfu-mmc.

=&gt; dfu 0 ram 0
data abort
pc : [&lt;9ff893d6&gt;]          lr : [&lt;9ff6edb9&gt;]
reloc pc : [&lt;808323d6&gt;]    lr : [&lt;80817db9&gt;]
sp : 9ef36cf0  ip : 00000158     fp : 9ffbc0b8
r10: 9ffbc0b8  r9 : 9ef36ed8     r8 : 00000000
r7 : 00000000  r6 : 9ffbc0c8     r5 : 9ef36cfc  r4 : 9ef392c8
r3 : 00000004  r2 : 00000000     r1 : 9ff9a985  r0 : ffffffff
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

resetting ...

Signed-off-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: part: Rename some partition functions</title>
<updated>2016-03-14T21:34:50+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-02-29T22:25:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3e8bd469504f5d5a8800a2ea46d664dde701105b'/>
<id>3e8bd469504f5d5a8800a2ea46d664dde701105b</id>
<content type='text'>
Rename three partition functions so that they start with part_. This makes
it clear what they relate to.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename three partition functions so that they start with part_. This makes
it clear what they relate to.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: Drop the block_dev_desc_t typedef</title>
<updated>2016-03-14T21:34:50+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-02-29T22:25:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4101f6879256720b30df712089a3df18565f9203'/>
<id>4101f6879256720b30df712089a3df18565f9203</id>
<content type='text'>
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
and causes 80-column violations, rename it to struct blk_desc.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
and causes 80-column violations, rename it to struct blk_desc.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: store hwpart in the block device</title>
<updated>2016-01-14T02:05:19+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2015-12-07T18:38:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=873cc1d7775ed5de07e6722c7ff423080c2e8f71'/>
<id>873cc1d7775ed5de07e6722c7ff423080c2e8f71</id>
<content type='text'>
This will allow us to have multiple block device structs each referring
to the same eMMC device, yet different HW partitions.

For now, there is still a single block device per eMMC device. As before,
this block device always accesses whichever HW partition was most recently
selected. Clients wishing to make use of multiple block devices referring
to different HW partitions can simply take a copy of this block device
once it points at the correct HW partition, and use each one as they wish.
This feature will be used by the next patch.

In the future, perhaps get_device() could be enhanced to return a
dynamically allocated block device struct, to avoid the client needing to
copy it in order to maintain multiple block devices. However, this would
require all users to be updated to free those block device structs at some
point, which is rather a large change.

Most callers of mmc_switch_part() wish to permanently switch the default
MMC block device's HW partition. Enhance mmc_switch_part() so that it does
this. This removes the need for callers to do this. However,
common/env_mmc.c needs to save and restore the current HW partition. Make
it do this more explicitly.

Replace use of mmc_switch_part() with mmc_select_hwpart() in order to
remove duplicate code that skips the call if that HW partition is already
selected.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will allow us to have multiple block device structs each referring
to the same eMMC device, yet different HW partitions.

For now, there is still a single block device per eMMC device. As before,
this block device always accesses whichever HW partition was most recently
selected. Clients wishing to make use of multiple block devices referring
to different HW partitions can simply take a copy of this block device
once it points at the correct HW partition, and use each one as they wish.
This feature will be used by the next patch.

In the future, perhaps get_device() could be enhanced to return a
dynamically allocated block device struct, to avoid the client needing to
copy it in order to maintain multiple block devices. However, this would
require all users to be updated to free those block device structs at some
point, which is rather a large change.

Most callers of mmc_switch_part() wish to permanently switch the default
MMC block device's HW partition. Enhance mmc_switch_part() so that it does
this. This removes the need for callers to do this. However,
common/env_mmc.c needs to save and restore the current HW partition. Make
it do this more explicitly.

Replace use of mmc_switch_part() with mmc_select_hwpart() in order to
remove duplicate code that skips the call if that HW partition is already
selected.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: pass block dev not num to read/write/erase()</title>
<updated>2016-01-14T02:05:18+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2015-12-07T18:38:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86'/>
<id>7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86</id>
<content type='text'>
This will allow the implementation to make use of data in the block_dev
structure beyond the base device number. This will be useful so that eMMC
block devices can encompass the HW partition ID rather than treating this
out-of-band. Equally, the existence of the priv field is crying out for
this patch to exist.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will allow the implementation to make use of data in the block_dev
structure beyond the base device number. This will be useful so that eMMC
block devices can encompass the HW partition ID rather than treating this
out-of-band. Equally, the existence of the priv field is crying out for
this patch to exist.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dfu: dfu_sf: Pass duplicate devstr to parse_dev</title>
<updated>2015-11-03T16:29:33+00:00</updated>
<author>
<name>Vignesh R</name>
<email>vigneshr@ti.com</email>
</author>
<published>2015-10-20T09:52:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=30e3ea4c79dd35e97d04546bd39e2468c8ba63ef'/>
<id>30e3ea4c79dd35e97d04546bd39e2468c8ba63ef</id>
<content type='text'>
parse_dev() alters the string pointed by devstr parameter. Due to this
subsequent parsing of sf entities will fail, as string pointed by devstr
is no longer valid sf dev arguments.
Fix this by passing pointer to the copy of the string to parse_dev
instead of pointer to the actual devstr.

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
parse_dev() alters the string pointed by devstr parameter. Due to this
subsequent parsing of sf entities will fail, as string pointed by devstr
is no longer valid sf dev arguments.
Fix this by passing pointer to the copy of the string to parse_dev
instead of pointer to the actual devstr.

Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
