diff options
| author | Simon Glass <sjg@chromium.org> | 2013-05-16 13:53:26 +0000 | 
|---|---|---|
| committer | Tom Rini <trini@ti.com> | 2013-06-04 16:06:31 -0400 | 
| commit | c6ac13bdea0368cd8ce0478173467c032c9bacfb (patch) | |
| tree | 5d7ba249d980787451030bda408a27e0be58c5d9 | |
| parent | 4651800d51f7714c7e54c51af52a8ff5ee4461de (diff) | |
| download | olio-uboot-2014.01-c6ac13bdea0368cd8ce0478173467c032c9bacfb.tar.xz olio-uboot-2014.01-c6ac13bdea0368cd8ce0478173467c032c9bacfb.zip | |
sandbox: image: Adjust FIT image printing to work with sandbox
Use map_sysmem() to convert from address to pointer, so that sandbox can
print FIT information without crashing.
Signed-off-by: Simon Glass <sjg@chromium.org>
| -rw-r--r-- | common/image-fit.c | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/common/image-fit.c b/common/image-fit.c index 589f53dbb..7bf82d33c 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -351,10 +351,13 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)  #ifndef USE_HOSTCC  	printf("%s  Data Start:   ", p); -	if (ret) +	if (ret) {  		printf("unavailable\n"); -	else -		printf("0x%08lx\n", (ulong)data); +	} else { +		void *vdata = (void *)data; + +		printf("0x%08lx\n", (ulong)map_to_sysmem(vdata)); +	}  #endif  	printf("%s  Data Size:    ", p); |