Commit cc146d1d authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

powerpc/powernv: Fix little endian issues in OPAL flash code

With this patch I was able to update firmware on an LE kernel.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 298b34d7
...@@ -131,11 +131,15 @@ static DEFINE_MUTEX(image_data_mutex); ...@@ -131,11 +131,15 @@ static DEFINE_MUTEX(image_data_mutex);
*/ */
static inline void opal_flash_validate(void) static inline void opal_flash_validate(void)
{ {
struct validate_flash_t *args_buf = &validate_flash_data; long ret;
void *buf = validate_flash_data.buf;
__be32 size, result;
ret = opal_validate_flash(__pa(buf), &size, &result);
args_buf->status = opal_validate_flash(__pa(args_buf->buf), validate_flash_data.status = ret;
&(args_buf->buf_size), validate_flash_data.buf_size = be32_to_cpu(size);
&(args_buf->result)); validate_flash_data.result = be32_to_cpu(result);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment