Stephen Warren
0e285b503c
dfu: fix some issues with reads/uploads
...
DFU read support appears to rely upon dfu->read_medium() updating the
passed-by-reference len parameter to indicate the remaining size
available for reading.
dfu_read_medium_mmc() never does this, and the implementation of
dfu_read_medium_nand() will only work if called just once; it hard-codes
the value to the total size of the NAND device irrespective of read
offset.
I believe that overloading dfu->read_medium() is confusing. As such,
this patch introduces a new function dfu->get_medium_size() which can
be used to explicitly find out the medium size, and nothing else.
dfu_read() is modified to use this function to set the initial value for
dfu->r_left, rather than attempting to use the side-effects of
dfu->read_medium() for this purpose.
Due to this change, dfu_read() must initially set dfu->b_left to 0, since
no data has been read.
dfu_read_buffer_fill() must also be modified not to adjust dfu->r_left
when simply copying data from dfu->i_buf_start to the upload request
buffer. r_left represents the amount of data left to be read from HW.
That value is not affected by the memcpy(), but only by calls to
dfu->read_medium().
After this change, I can read from either a 4MB or 1.5MB chunk of a 4MB
eMMC boot partion with CONFIG_SYS_DFU_DATA_BUF_SIZE==1MB. Without this
change, attempting to do that would result in DFU read returning no data
at all due to r_left never being set.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2014-08-09 11:16:58 -04:00
..
2013-07-24 09:44:38 -04:00
2014-07-23 14:07:25 +01:00
2014-08-06 08:38:18 -04:00
2014-01-24 16:59:07 -05:00
2014-07-23 14:08:37 +01:00
2014-06-20 11:56:33 -06:00
2014-01-24 16:59:07 -05:00
2013-10-09 12:52:16 -05:00
2014-07-30 08:47:46 -04:00
2013-07-24 09:44:38 -04:00
2013-11-21 13:32:43 -06:00
2014-07-25 15:21:06 -04:00
2014-05-07 19:40:39 +09:00
2013-07-24 09:44:38 -04:00
2014-06-19 11:19:04 -04:00
2014-05-16 16:24:27 -05:00
2013-07-24 09:44:38 -04:00
2014-07-30 08:48:03 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-04-18 16:14:17 -04:00
2013-09-06 13:09:07 -04:00
2013-07-24 09:44:38 -04:00
2014-07-22 07:44:27 -04:00
2013-07-24 09:44:38 -04:00
2014-05-08 10:38:29 +02:00
2013-07-24 09:44:38 -04:00
2013-08-19 15:34:13 -04:00
2013-10-14 16:06:53 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-08-01 20:01:22 +03:00
2014-05-29 17:52:03 -04:00
2014-07-18 19:42:16 +01:00
2014-07-18 19:42:10 +01:00
2014-02-22 19:30:24 +01:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-06-19 11:19:02 -04:00
2014-05-29 17:49:00 -04:00
2013-08-15 18:38:36 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-05-29 17:45:31 -04:00
2014-05-29 17:52:03 -04:00
2014-02-04 16:32:20 +01:00
2013-07-24 09:44:38 -04:00
2014-06-19 11:19:01 -04:00
2014-04-22 17:58:48 -07:00
2014-07-28 17:19:49 +02:00
2014-07-07 19:43:02 -04:00
2014-07-22 07:44:25 -04:00
2014-02-21 08:42:47 -05:00
2013-12-13 09:18:45 -05:00
2014-02-05 08:04:38 -05:00
2014-06-05 14:44:56 -04:00
2013-07-24 09:44:38 -04:00
2014-07-25 15:21:05 -04:00
2013-07-24 09:45:01 -04:00
2014-03-17 20:05:47 -06:00
2014-03-17 20:05:48 -06:00
2013-10-14 16:06:53 -04:00
2014-04-22 17:58:48 -07:00
2014-08-09 11:16:58 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-05-27 10:21:32 -04:00
2014-06-21 10:06:58 -06:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-10-14 16:06:53 -04:00
2014-05-16 14:54:26 +09:00
2014-04-22 17:58:52 -07:00
2014-03-17 20:05:47 -06:00
2013-08-12 23:32:20 +02:00
2013-08-19 15:45:35 -04:00
2013-07-24 09:44:38 -04:00
2014-07-18 17:53:23 -04:00
2013-10-14 16:06:53 -04:00
2013-07-24 09:44:38 -04:00
2014-08-01 20:12:15 +03:00
2014-08-09 11:16:57 -04:00
2013-07-24 09:44:38 -04:00
2014-08-09 11:16:57 -04:00
2014-07-03 08:40:58 +02:00
2014-07-23 14:07:26 +01:00
2013-07-24 09:44:38 -04:00
2013-10-14 16:06:53 -04:00
2013-11-25 11:43:47 -08:00
2014-05-20 15:23:46 +02:00
2014-08-09 11:16:57 -04:00
2014-04-22 17:58:48 -07:00
2014-04-22 17:58:49 -07:00
2014-04-22 17:58:48 -07:00
2014-04-22 17:58:48 -07:00
2013-07-24 09:44:38 -04:00
2014-04-22 17:58:50 -07:00
2014-07-22 16:25:54 -07:00
2014-04-22 17:58:48 -07:00
2014-07-03 08:40:58 +02:00
2013-11-22 17:03:15 -06:00
2013-07-24 09:44:38 -04:00
2014-04-22 17:58:52 -07:00
2013-07-24 09:44:38 -04:00
2014-05-05 08:21:47 +02:00
2014-07-07 19:47:18 -04:00
2013-07-25 08:51:48 -04:00
2014-06-19 11:18:55 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-02-20 06:48:23 +01:00
2013-09-24 09:10:33 -04:00
2014-07-23 14:07:23 +01:00
2014-07-22 07:44:26 -04:00
2014-07-07 19:47:19 -04:00
2014-05-28 10:58:19 +09:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-06-20 11:54:29 -06:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-07-07 19:43:02 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:45:01 -04:00
2013-09-20 10:29:48 -04:00
2013-07-24 09:44:38 -04:00
2014-05-05 10:24:13 +02:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-10-14 16:06:53 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-11-28 08:28:54 +01:00
2013-09-20 10:30:54 -04:00
2013-07-24 09:44:38 -04:00
2014-07-18 17:53:24 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-10-14 16:06:53 -04:00
2013-07-24 09:44:38 -04:00
2013-08-20 09:57:51 -07:00
2013-07-24 09:44:38 -04:00
2013-10-14 16:06:53 -04:00
2014-05-30 14:03:24 -04:00
2013-11-09 17:21:01 +01:00
2013-07-24 09:44:38 -04:00
2014-08-01 18:44:56 +03:00
2013-07-24 09:44:38 -04:00
2014-03-09 19:19:06 +01:00
2014-05-12 15:19:46 -04:00
2014-07-06 20:12:44 +01:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-05-12 15:19:45 -04:00
2013-07-24 09:44:38 -04:00
2014-03-17 20:05:49 -06:00
2014-05-13 19:43:00 -04:00
2013-10-14 16:06:53 -04:00
2014-06-05 14:44:56 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-25 08:51:48 -04:00
2013-11-09 17:21:01 +01:00
2013-11-09 17:21:01 +01:00
2013-11-09 17:21:01 +01:00
2014-07-07 19:43:02 -04:00
2014-08-06 09:12:30 -04:00
2014-07-22 16:25:54 -07:00
2014-03-07 10:59:06 -05:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-01-08 17:24:03 -07:00
2014-08-09 11:16:57 -04:00
2013-11-12 10:08:48 +01:00
2013-07-24 09:44:38 -04:00
2014-04-08 09:25:08 +02:00
2014-07-22 07:44:26 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-08-20 11:35:24 -04:00
2014-01-09 12:47:15 +09:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-03-17 20:05:49 -06:00
2014-05-13 09:13:59 +02:00
2014-05-13 09:13:59 +02:00
2013-07-24 09:44:38 -04:00
2014-04-22 17:58:50 -07:00
2014-01-12 21:40:22 +05:30
2014-02-19 10:47:43 -05:00
2014-07-18 17:53:23 -04:00
2014-07-23 14:07:24 +01:00
2013-07-24 09:44:38 -04:00
2013-11-08 09:39:13 -05:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-30 09:21:42 -04:00
2014-05-05 08:21:47 +02:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-06-11 16:27:06 -04:00
2013-07-24 09:44:38 -04:00
2013-11-22 17:03:17 -06:00
2013-07-24 09:44:38 -04:00
2013-10-14 16:06:53 -04:00
2013-07-24 09:44:38 -04:00
2013-12-04 08:11:28 -05:00
2013-07-24 09:44:38 -04:00
2013-10-14 16:06:53 -04:00
2013-07-24 09:44:38 -04:00
2013-10-20 23:42:38 +02:00
2014-03-12 17:04:31 -04:00
2014-05-08 10:38:29 +02:00
2014-05-05 08:00:28 +02:00
2013-07-24 09:44:38 -04:00
2013-07-24 09:44:38 -04:00
2014-03-10 18:53:36 +01:00
2014-04-02 16:35:53 -04:00
2013-07-24 09:44:38 -04:00
2013-10-14 16:06:53 -04:00
2013-10-14 16:06:53 -04:00
2013-07-24 09:44:38 -04:00
2013-10-30 10:48:37 +01:00
2013-11-08 09:41:37 -05:00
2013-08-12 22:28:41 +02:00
2013-08-12 22:34:09 +02:00
2014-07-23 14:07:23 +01:00
2014-05-13 09:13:59 +02:00
2013-10-14 16:06:53 -04:00
2013-12-16 08:59:05 -05:00
2013-07-24 09:44:38 -04:00
2014-08-01 14:18:17 -07:00
2014-05-20 15:23:46 +02:00
2013-07-24 09:45:01 -04:00
2014-05-13 09:13:59 +02:00