diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/rtas_flash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 658e89d2025b..db2b482af658 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -611,17 +611,19 @@ static void rtas_flash_firmware(int reboot_type) | |||
611 | for (f = flist; f; f = next) { | 611 | for (f = flist; f; f = next) { |
612 | /* Translate data addrs to absolute */ | 612 | /* Translate data addrs to absolute */ |
613 | for (i = 0; i < f->num_blocks; i++) { | 613 | for (i = 0; i < f->num_blocks; i++) { |
614 | f->blocks[i].data = (char *)__pa(f->blocks[i].data); | 614 | f->blocks[i].data = (char *)cpu_to_be64(__pa(f->blocks[i].data)); |
615 | image_size += f->blocks[i].length; | 615 | image_size += f->blocks[i].length; |
616 | f->blocks[i].length = cpu_to_be64(f->blocks[i].length); | ||
616 | } | 617 | } |
617 | next = f->next; | 618 | next = f->next; |
618 | /* Don't translate NULL pointer for last entry */ | 619 | /* Don't translate NULL pointer for last entry */ |
619 | if (f->next) | 620 | if (f->next) |
620 | f->next = (struct flash_block_list *)__pa(f->next); | 621 | f->next = (struct flash_block_list *)cpu_to_be64(__pa(f->next)); |
621 | else | 622 | else |
622 | f->next = NULL; | 623 | f->next = NULL; |
623 | /* make num_blocks into the version/length field */ | 624 | /* make num_blocks into the version/length field */ |
624 | f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16); | 625 | f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16); |
626 | f->num_blocks = cpu_to_be64(f->num_blocks); | ||
625 | } | 627 | } |
626 | 628 | ||
627 | printk(KERN_ALERT "FLASH: flash image is %ld bytes\n", image_size); | 629 | printk(KERN_ALERT "FLASH: flash image is %ld bytes\n", image_size); |