[PATCH 3/4] uimage_sdram_flush: fix resource start
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Mon Aug 13 02:57:13 EDT 2012
The start is the start of the previous resource nor the size of it.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
common/uimage.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/uimage.c b/common/uimage.c
index 43878b5..735b64e 100644
--- a/common/uimage.c
+++ b/common/uimage.c
@@ -355,8 +355,9 @@ static struct resource *uimage_resource;
static int uimage_sdram_flush(void *buf, unsigned int len)
{
if (uimage_size + len > resource_size(uimage_resource)) {
- resource_size_t start = resource_size(uimage_resource);
+ resource_size_t start = uimage_resource->start;
resource_size_t size = resource_size(uimage_resource) + len;
+
release_sdram_region(uimage_resource);
uimage_resource = request_sdram_region("uimage",
--
1.7.10.4
More information about the barebox
mailing list