From owner-svn-src-all@FreeBSD.ORG Fri Mar 29 18:47:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 779CD448; Fri, 29 Mar 2013 18:47:09 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 69DF95E6; Fri, 29 Mar 2013 18:47:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2TIl9IQ094720; Fri, 29 Mar 2013 18:47:09 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2TIl9KW094719; Fri, 29 Mar 2013 18:47:09 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201303291847.r2TIl9KW094719@svn.freebsd.org> From: Ian Lepore Date: Fri, 29 Mar 2013 18:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248909 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2013 18:47:09 -0000 Author: ian Date: Fri Mar 29 18:47:08 2013 New Revision: 248909 URL: http://svnweb.freebsd.org/changeset/base/248909 Log: 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. Modified: head/sys/arm/at91/at91_machdep.c Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Fri Mar 29 18:46:13 2013 (r248908) +++ head/sys/arm/at91/at91_machdep.c Fri Mar 29 18:47:08 2013 (r248909) @@ -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();