|
@@ -611,17 +611,19 @@ static void rtas_flash_firmware(int reboot_type)
|
|
for (f = flist; f; f = next) {
|
|
for (f = flist; f; f = next) {
|
|
/* Translate data addrs to absolute */
|
|
/* Translate data addrs to absolute */
|
|
for (i = 0; i < f->num_blocks; i++) {
|
|
for (i = 0; i < f->num_blocks; i++) {
|
|
- f->blocks[i].data = (char *)__pa(f->blocks[i].data);
|
|
|
|
|
|
+ f->blocks[i].data = (char *)cpu_to_be64(__pa(f->blocks[i].data));
|
|
image_size += f->blocks[i].length;
|
|
image_size += f->blocks[i].length;
|
|
|
|
+ f->blocks[i].length = cpu_to_be64(f->blocks[i].length);
|
|
}
|
|
}
|
|
next = f->next;
|
|
next = f->next;
|
|
/* Don't translate NULL pointer for last entry */
|
|
/* Don't translate NULL pointer for last entry */
|
|
if (f->next)
|
|
if (f->next)
|
|
- f->next = (struct flash_block_list *)__pa(f->next);
|
|
|
|
|
|
+ f->next = (struct flash_block_list *)cpu_to_be64(__pa(f->next));
|
|
else
|
|
else
|
|
f->next = NULL;
|
|
f->next = NULL;
|
|
/* make num_blocks into the version/length field */
|
|
/* make num_blocks into the version/length field */
|
|
f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16);
|
|
f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16);
|
|
|
|
+ f->num_blocks = cpu_to_be64(f->num_blocks);
|
|
}
|
|
}
|
|
|
|
|
|
printk(KERN_ALERT "FLASH: flash image is %ld bytes\n", image_size);
|
|
printk(KERN_ALERT "FLASH: flash image is %ld bytes\n", image_size);
|