diff options
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r-- | arch/powerpc/lib/board.c | 2 | ||||
-rw-r--r-- | arch/powerpc/lib/bootm.c | 27 | ||||
-rw-r--r-- | arch/powerpc/lib/interrupts.c | 10 |
3 files changed, 25 insertions, 14 deletions
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index aaa5add..22bbc52 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -932,8 +932,6 @@ void board_init_r (gd_t *id, ulong dest_addr) udelay (20); - set_timer (0); - /* Initialize from environment */ if ((s = getenv ("loadaddr")) != NULL) { load_addr = simple_strtoul (s, NULL, 16); diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c index e01787d..1375474 100644 --- a/arch/powerpc/lib/bootm.c +++ b/arch/powerpc/lib/bootm.c @@ -87,7 +87,7 @@ static void boot_jump_linux(bootm_headers_t *images) * r8: 0 * r9: 0 */ -#if defined(CONFIG_85xx) || defined(CONFIG_440) +#if defined(CONFIG_MPC85xx) || defined(CONFIG_440) #define EPAPR_MAGIC (0x45504150) #else #define EPAPR_MAGIC (0x65504150) @@ -226,6 +226,24 @@ static int boot_bd_t_linux(bootm_headers_t *images) return ret; } +/* + * Verify the device tree. + * + * This function is called after all device tree fix-ups have been enacted, + * so that the final device tree can be verified. The definition of "verified" + * is up to the specific implementation. However, it generally means that the + * addresses of some of the devices in the device tree are compared with the + * actual addresses at which U-Boot has placed them. + * + * Returns 1 on success, 0 on failure. If 0 is returned, U-boot will halt the + * boot process. + */ +static int __ft_verify_fdt(void *fdt) +{ + return 1; +} +__attribute__((weak, alias("__ft_verify_fdt"))) int ft_verify_fdt(void *fdt); + static int boot_body_linux(bootm_headers_t *images) { ulong rd_len; @@ -288,14 +306,19 @@ static int boot_body_linux(bootm_headers_t *images) return ret; of_size = ret; - if (*initrd_start && *initrd_end) + if (*initrd_start && *initrd_end) { of_size += FDT_RAMDISK_OVERHEAD; + fdt_set_totalsize(*of_flat_tree, of_size); + } /* Create a new LMB reservation */ lmb_reserve(lmb, (ulong)*of_flat_tree, of_size); /* fixup the initrd now that we know where it should be */ if (*initrd_start && *initrd_end) fdt_initrd(*of_flat_tree, *initrd_start, *initrd_end, 1); + + if (!ft_verify_fdt(*of_flat_tree)) + return -1; } #endif /* CONFIG_OF_LIBFDT */ return 0; diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c index f603170..aeae413 100644 --- a/arch/powerpc/lib/interrupts.c +++ b/arch/powerpc/lib/interrupts.c @@ -137,17 +137,7 @@ void timer_interrupt (struct pt_regs *regs) #endif /* CONFIG_SHOW_ACTIVITY */ } -void reset_timer (void) -{ - timestamp = 0; -} - ulong get_timer (ulong base) { return (timestamp - base); } - -void set_timer (ulong t) -{ - timestamp = t; -} |