diff options
Diffstat (limited to 'sys/arm/lpc')
-rw-r--r-- | sys/arm/lpc/lpc_machdep.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/sys/arm/lpc/lpc_machdep.c b/sys/arm/lpc/lpc_machdep.c index ee3bb5c..191fbf3 100644 --- a/sys/arm/lpc/lpc_machdep.c +++ b/sys/arm/lpc/lpc_machdep.c @@ -344,11 +344,8 @@ initarm(struct arm_boot_params *abp) &memsize) != 0) while(1); - if (fdt_immr_addr(LPC_DEV_BASE) != 0) - while (1); - /* Platform-specific initialisation */ - pmap_bootstrap_lastaddr = fdt_immr_va - ARM_NOCACHE_KVA_SIZE; + pmap_bootstrap_lastaddr = initarm_lastaddr(); pcpu0_init(); @@ -482,13 +479,7 @@ initarm(struct arm_boot_params *abp) */ OF_interpret("perform-fixup", 0); -#if 0 - /* - * Initialize GPIO as early as possible. - */ - if (platform_gpio_init() != 0) - while (1); -#endif + initarm_gpio_init(); cninit(); @@ -505,6 +496,8 @@ initarm(struct arm_boot_params *abp) printf("WARNING: could not fully configure devmap, error=%d\n", err_devmap); + initarm_late_init(); + /* * Pages were allocated during the secondary bootstrap for the * stacks for different CPU modes. @@ -562,6 +555,27 @@ initarm(struct arm_boot_params *abp) sizeof(struct pcb))); } +vm_offset_t +initarm_lastaddr(void) +{ + + if (fdt_immr_addr(LPC_DEV_BASE) != 0) + while (1); + + /* Platform-specific initialisation */ + return (fdt_immr_va - ARM_NOCACHE_KVA_SIZE); +} + +void +initarm_gpio_init(void) +{ +} + +void +initarm_late_init(void) +{ +} + #define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, 0, 0, } |