From owner-svn-src-head@freebsd.org Tue Jul 4 12:17:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA16DD9036E; Tue, 4 Jul 2017 12:17:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9837A79430; Tue, 4 Jul 2017 12:17:50 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v64CHnCh092180; Tue, 4 Jul 2017 12:17:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v64CHnA2092178; Tue, 4 Jul 2017 12:17:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201707041217.v64CHnA2092178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 4 Jul 2017 12:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320642 - in head/sys/arm: conf versatile X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: conf versatile X-SVN-Commit-Revision: 320642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 12:17:50 -0000 Author: andrew Date: Tue Jul 4 12:17:49 2017 New Revision: 320642 URL: https://svnweb.freebsd.org/changeset/base/320642 Log: Teach VERSATILEPB about PLATFORM. This will help move it into the GENERIC kernel configuration. Modified: head/sys/arm/conf/VERSATILEPB head/sys/arm/versatile/versatile_machdep.c Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Tue Jul 4 10:54:08 2017 (r320641) +++ head/sys/arm/conf/VERSATILEPB Tue Jul 4 12:17:49 2017 (r320642) @@ -69,6 +69,7 @@ device md device random # Entropy device options INTRNG +options PLATFORM # Flattened Device Tree options FDT # Configure using FDT/DTB data Modified: head/sys/arm/versatile/versatile_machdep.c ============================================================================== --- head/sys/arm/versatile/versatile_machdep.c Tue Jul 4 10:54:08 2017 (r320641) +++ head/sys/arm/versatile/versatile_machdep.c Tue Jul 4 12:17:49 2017 (r320642) @@ -49,34 +49,21 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include +#include +#include "platform_if.h" + /* Start of address space used for bootstrap map */ #define DEVMAP_BOOTSTRAP_MAP_START 0xE0000000 -vm_offset_t -platform_lastaddr(void) +static vm_offset_t +versatile_lastaddr(platform_t plat) { return (DEVMAP_BOOTSTRAP_MAP_START); } -void -platform_probe_and_attach(void) -{ - -} - -void -platform_gpio_init(void) -{ -} - -void -platform_late_init(void) -{ -} - #define FDT_DEVMAP_MAX (2) /* FIXME */ static struct devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { { 0, 0, 0, }, @@ -87,8 +74,8 @@ static struct devmap_entry fdt_devmap[FDT_DEVMAP_MAX] /* * Construct devmap table with DT-derived config data. */ -int -platform_devmap_init(void) +static int +versatile_devmap_init(platform_t plat) { int i = 0; fdt_devmap[i].pd_va = 0xf0100000; @@ -99,10 +86,18 @@ platform_devmap_init(void) return (0); } -void -cpu_reset(void) +static void +versatile_cpu_reset(platform_t plat) { printf("cpu_reset\n"); while (1); } +static platform_method_t versatile_methods[] = { + PLATFORMMETHOD(platform_lastaddr, versatile_lastaddr), + PLATFORMMETHOD(platform_devmap_init, versatile_devmap_init), + PLATFORMMETHOD(platform_cpu_reset, versatile_cpu_reset), + + PLATFORMMETHOD_END, +}; +FDT_PLATFORM_DEF(versatile, "versatile", 0, "arm,versatile-pb", 1);