summaryrefslogtreecommitdiffstats
path: root/sys/arm/at91
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2013-03-29 18:47:08 +0000
committerian <ian@FreeBSD.org>2013-03-29 18:47:08 +0000
commit899ea162b1d07082910e0f33ea4ee88c844b14c1 (patch)
tree98ecae11490150d0785498fae9867d1a9386e50c /sys/arm/at91
parentd3b1490c73ee89e6e7fa919e01d3508084b2bc13 (diff)
downloadFreeBSD-src-899ea162b1d07082910e0f33ea4ee88c844b14c1.zip
FreeBSD-src-899ea162b1d07082910e0f33ea4ee88c844b14c1.tar.gz
Call soc_info.soc_data->soc_clock_init() before at91_pmc_init_clock(), so
that the latter correctly fills in the clock data structures based on proper hardware-specific shift and mask values from the soc_data structure.
Diffstat (limited to 'sys/arm/at91')
-rw-r--r--sys/arm/at91/at91_machdep.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/arm/at91/at91_machdep.c b/sys/arm/at91/at91_machdep.c
index 3837cbd..f4a9316 100644
--- a/sys/arm/at91/at91_machdep.c
+++ b/sys/arm/at91/at91_machdep.c
@@ -574,8 +574,17 @@ initarm(struct arm_boot_params *abp)
at91_soc_id();
- /* Initialize all the clocks, so that the console can work */
- at91_pmc_init_clock();
+ /*
+ * Initialize all the clocks, so that the console can work. We can only
+ * do this if at91_soc_id() was able to fill in the support data. Even
+ * if we can't init the clocks, still try to do a console init so we can
+ * try to print the error message about missing soc support. There's a
+ * chance the printf will work if the bootloader set up the DBGU.
+ */
+ if (soc_info.soc_data != NULL) {
+ soc_info.soc_data->soc_clock_init();
+ at91_pmc_init_clock();
+ }
cninit();
OpenPOWER on IntegriCloud