From owner-svn-src-all@FreeBSD.ORG Wed Sep 26 10:07:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C84911065686; Wed, 26 Sep 2012 10:07:53 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4D778FC15; Wed, 26 Sep 2012 10:07:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8QA7rGM005109; Wed, 26 Sep 2012 10:07:53 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8QA7rXu005107; Wed, 26 Sep 2012 10:07:53 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201209261007.q8QA7rXu005107@svn.freebsd.org> From: Andrew Turner Date: Wed, 26 Sep 2012 10:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240956 - head/sys/arm/lpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 26 Sep 2012 10:07:53 -0000 Author: andrew Date: Wed Sep 26 10:07:53 2012 New Revision: 240956 URL: http://svn.freebsd.org/changeset/base/240956 Log: Create the new initarm_ functions to reduce the diff to the other FDT versions of initarm Modified: head/sys/arm/lpc/lpc_machdep.c Modified: head/sys/arm/lpc/lpc_machdep.c ============================================================================== --- head/sys/arm/lpc/lpc_machdep.c Wed Sep 26 09:37:58 2012 (r240955) +++ head/sys/arm/lpc/lpc_machdep.c Wed Sep 26 10:07:53 2012 (r240956) @@ -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, }