summaryrefslogtreecommitdiffstats
path: root/common/uimage.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-08-13 14:34:08 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-08-13 14:48:15 +0800
commit3120585df8b537493681fd4c395919a341f96e6e (patch)
tree5fb38eb80b85de42d6add7e62d9f5451b9d75558 /common/uimage.c
parent73918efe1a720f8837760fd99b6402e39bb8daf9 (diff)
downloadbarebox-3120585df8b537493681fd4c395919a341f96e6e.tar.gz
uimage_sdram_flush: fix resource start
The start is the start of the previous resource nor the size of it. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'common/uimage.c')
-rw-r--r--common/uimage.c3
1 files changed, 2 insertions, 1 deletions
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",