From c6ff193255c9de9ff618fd4ca815ae5ecdb11764 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Thu, 21 Nov 2013 01:08:10 +0000 Subject: [PATCH] Call cpu_setup() from the initarm() routine on platforms that don't use the common FDT-aware initarm() in arm/machdep.c. Pointed out by: cognet Pointy hat to: ian --- sys/arm/at91/at91_machdep.c | 1 + sys/arm/econa/econa_machdep.c | 1 + sys/arm/s3c2xx0/s3c24x0_machdep.c | 1 + sys/arm/sa11x0/assabet_machdep.c | 1 + sys/arm/xscale/i80321/ep80219_machdep.c | 2 ++ sys/arm/xscale/i80321/iq31244_machdep.c | 2 ++ sys/arm/xscale/i8134x/crb_machdep.c | 2 ++ sys/arm/xscale/ixp425/avila_machdep.c | 2 ++ sys/arm/xscale/pxa/pxa_machdep.c | 1 + 9 files changed, 13 insertions(+) diff --git a/sys/arm/at91/at91_machdep.c b/sys/arm/at91/at91_machdep.c index f7c21f9c6a5..32fa129229c 100644 --- a/sys/arm/at91/at91_machdep.c +++ b/sys/arm/at91/at91_machdep.c @@ -604,6 +604,7 @@ initarm(struct arm_boot_params *abp) * of the stack memory. */ cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE); + cpu_setup(""); set_stackptrs(0); diff --git a/sys/arm/econa/econa_machdep.c b/sys/arm/econa/econa_machdep.c index 0323e7b51ff..04fd208640e 100644 --- a/sys/arm/econa/econa_machdep.c +++ b/sys/arm/econa/econa_machdep.c @@ -309,6 +309,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); /* Set stack for exception handlers */ data_abort_handler_address = (u_int)data_abort_handler; diff --git a/sys/arm/s3c2xx0/s3c24x0_machdep.c b/sys/arm/s3c2xx0/s3c24x0_machdep.c index 3fc0f8ec16b..8f432be951e 100644 --- a/sys/arm/s3c2xx0/s3c24x0_machdep.c +++ b/sys/arm/s3c2xx0/s3c24x0_machdep.c @@ -355,6 +355,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); /* Disable all peripheral interrupts */ ioreg_write32(S3C24X0_INTCTL_BASE + INTCTL_INTMSK, ~0); diff --git a/sys/arm/sa11x0/assabet_machdep.c b/sys/arm/sa11x0/assabet_machdep.c index 79014f2c037..56b0f302438 100644 --- a/sys/arm/sa11x0/assabet_machdep.c +++ b/sys/arm/sa11x0/assabet_machdep.c @@ -371,6 +371,7 @@ initarm(struct arm_boot_params *abp) cpufunc_control(0x337f, 0x107d); arm_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL); + cpu_setup(""); pmap_curmaxkvaddr = freemempos + KERNEL_PT_VMDATA_NUM * 0x400000; diff --git a/sys/arm/xscale/i80321/ep80219_machdep.c b/sys/arm/xscale/i80321/ep80219_machdep.c index 7697b617838..3c52d550c55 100644 --- a/sys/arm/xscale/i80321/ep80219_machdep.c +++ b/sys/arm/xscale/i80321/ep80219_machdep.c @@ -334,6 +334,8 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); + /* * Fetch the SDRAM start/size from the i80321 SDRAM configration * registers. diff --git a/sys/arm/xscale/i80321/iq31244_machdep.c b/sys/arm/xscale/i80321/iq31244_machdep.c index 6074bbcba1d..b9af11a9e7d 100644 --- a/sys/arm/xscale/i80321/iq31244_machdep.c +++ b/sys/arm/xscale/i80321/iq31244_machdep.c @@ -335,6 +335,8 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); + /* * Fetch the SDRAM start/size from the i80321 SDRAM configration * registers. diff --git a/sys/arm/xscale/i8134x/crb_machdep.c b/sys/arm/xscale/i8134x/crb_machdep.c index a9205ee9700..6d6a6cce22f 100644 --- a/sys/arm/xscale/i8134x/crb_machdep.c +++ b/sys/arm/xscale/i8134x/crb_machdep.c @@ -320,6 +320,8 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); + i80321_calibrate_delay(); i81342_sdram_bounds(&obio_bs_tag, IOP34X_VADDR, &memstart, &memsize); physmem = memsize / PAGE_SIZE; diff --git a/sys/arm/xscale/ixp425/avila_machdep.c b/sys/arm/xscale/ixp425/avila_machdep.c index b47e70a216f..6583cde00ca 100644 --- a/sys/arm/xscale/ixp425/avila_machdep.c +++ b/sys/arm/xscale/ixp425/avila_machdep.c @@ -405,6 +405,8 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); + /* ready to setup the console (XXX move earlier if possible) */ cninit(); /* diff --git a/sys/arm/xscale/pxa/pxa_machdep.c b/sys/arm/xscale/pxa/pxa_machdep.c index 01f9c5efec3..cf4825b1ce4 100644 --- a/sys/arm/xscale/pxa/pxa_machdep.c +++ b/sys/arm/xscale/pxa/pxa_machdep.c @@ -317,6 +317,7 @@ initarm(struct arm_boot_params *abp) * this problem will not occur after initarm(). */ cpu_idcache_wbinv_all(); + cpu_setup(""); /* * Sort out bus_space for on-board devices.