From owner-svn-src-all@freebsd.org Mon Jan 25 08:12:45 2016 Return-Path: Delivered-To: svn-src-all@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 43D8EA45A33; Mon, 25 Jan 2016 08:12:45 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E8D8B69A; Mon, 25 Jan 2016 08:12:44 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.9/8.14.9) with ESMTP id u0P8BRne075016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 25 Jan 2016 16:11:27 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.9/8.14.9/Submit) id u0P8BRxm075015; Mon, 25 Jan 2016 16:11:27 +0800 (CST) (envelope-from kevlo) Date: Mon, 25 Jan 2016 16:11:26 +0800 From: Kevin Lo To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r294698 - in head/sys/arm: allwinner conf Message-ID: <20160125081126.GA74995@ns.kevlo.org> References: <201601250024.u0P0Ov2w068306@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201601250024.u0P0Ov2w068306@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 25 Jan 2016 08:12:45 -0000 Hi Andrew, The allwinner_machdep.h file seems to be missing. On Mon, Jan 25, 2016 at 12:24:57AM +0000, Andrew Turner wrote: > > Author: andrew > Date: Mon Jan 25 00:24:57 2016 > New Revision: 294698 > URL: https://svnweb.freebsd.org/changeset/base/294698 > > Log: > Update the Allwinner kernels: > * Use the ARM PLATFORM framework > * Use ARM_INTRNG on teh A20 as it has a GICv2 > * Add a method to find which Allwinner SoC we are running on > > Differential Revision: https://reviews.freebsd.org/D5059 > > Added: > head/sys/arm/allwinner/allwinner_machdep.c > - copied, changed from r294697, head/sys/arm/allwinner/a10_machdep.c > Deleted: > head/sys/arm/allwinner/a10_machdep.c > Modified: > head/sys/arm/allwinner/a10_common.c > head/sys/arm/allwinner/files.allwinner > head/sys/arm/conf/A20 > head/sys/arm/conf/CUBIEBOARD > > Modified: head/sys/arm/allwinner/a10_common.c > ============================================================================== > --- head/sys/arm/allwinner/a10_common.c Sun Jan 24 23:35:20 2016 (r294697) > +++ head/sys/arm/allwinner/a10_common.c Mon Jan 25 00:24:57 2016 (r294698) > @@ -42,6 +42,8 @@ struct fdt_fixup_entry fdt_fixup_table[] > { NULL, NULL } > }; > > +#ifndef ARM_INTRNG > + > static int > fdt_aintc_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, > int *pol) > @@ -66,3 +68,5 @@ fdt_pic_decode_t fdt_pic_table[] = { > &fdt_aintc_decode_ic, > NULL > }; > + > +#endif /* ARM_INTRNG */ > > Copied and modified: head/sys/arm/allwinner/allwinner_machdep.c (from r294697, head/sys/arm/allwinner/a10_machdep.c) > ============================================================================== > --- head/sys/arm/allwinner/a10_machdep.c Sun Jan 24 23:35:20 2016 (r294697, copy source) > +++ head/sys/arm/allwinner/allwinner_machdep.c Mon Jan 25 00:24:57 2016 (r294698) > @@ -1,5 +1,6 @@ > /*- > * Copyright (c) 2012 Ganbold Tsagaankhuu > + * Copyright (c) 2015-2016 Emmanuel Vadot > * All rights reserved. > * > * This code is derived from software written for Brini by Mark Brinicombe > @@ -45,32 +46,41 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > +#include > > #include > > #include > +#include > > -vm_offset_t > -platform_lastaddr(void) > -{ > +#include "platform_if.h" > > - return (arm_devmap_lastaddr()); > -} > +static u_int soc_type; > +static u_int soc_family; > > -void > -platform_probe_and_attach(void) > +static int > +a10_attach(platform_t plat) > { > + soc_type = ALLWINNERSOC_A10; > + soc_family = ALLWINNERSOC_SUN4I; > + return (0); > } > > -void > -platform_gpio_init(void) > +static int > +a20_attach(platform_t plat) > { > + soc_type = ALLWINNERSOC_A20; > + soc_family = ALLWINNERSOC_SUN7I; > + > + return (0); > } > > -void > -platform_late_init(void) > + > +static vm_offset_t > +allwinner_lastaddr(platform_t plat) > { > + > + return (arm_devmap_lastaddr()); > } > > /* > @@ -83,8 +93,8 @@ platform_late_init(void) > * shouldn't be device-mapped. The original code mapped a 4MB block, but > * perhaps a 1MB block would be more appropriate. > */ > -int > -platform_devmap_init(void) > +static int > +allwinner_devmap_init(platform_t plat) > { > > arm_devmap_add_entry(0x01C00000, 0x00400000); /* 4MB */ > @@ -111,3 +121,34 @@ cpu_reset() > printf("Reset failed!\n"); > while (1); > } > + > +static platform_method_t a10_methods[] = { > + PLATFORMMETHOD(platform_attach, a10_attach), > + PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), > + PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), > + > + PLATFORMMETHOD_END, > +}; > + > +static platform_method_t a20_methods[] = { > + PLATFORMMETHOD(platform_attach, a20_attach), > + PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), > + PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), > + > + PLATFORMMETHOD_END, > +}; > + > +u_int > +allwinner_soc_type(void) > +{ > + return (soc_type); > +} > + > +u_int > +allwinner_soc_family(void) > +{ > + return (soc_family); > +} > + > +FDT_PLATFORM_DEF(a10, "a10", 0, "allwinner,sun4i-a10"); > +FDT_PLATFORM_DEF(a20, "a20", 0, "allwinner,sun7i-a20"); > > Modified: head/sys/arm/allwinner/files.allwinner > ============================================================================== > --- head/sys/arm/allwinner/files.allwinner Sun Jan 24 23:35:20 2016 (r294697) > +++ head/sys/arm/allwinner/files.allwinner Mon Jan 25 00:24:57 2016 (r294698) > @@ -6,11 +6,11 @@ arm/allwinner/a10_clk.c standard > arm/allwinner/a10_common.c standard > arm/allwinner/a10_ehci.c optional ehci > arm/allwinner/a10_gpio.c optional gpio > -arm/allwinner/a10_machdep.c standard > arm/allwinner/a10_mmc.c optional mmc > arm/allwinner/a10_sramc.c standard > arm/allwinner/a10_wdog.c standard > arm/allwinner/a20/a20_cpu_cfg.c standard > +arm/allwinner/allwinner_machdep.c standard > arm/allwinner/if_emac.c optional emac > arm/allwinner/timer.c standard > #arm/allwinner/console.c standard > > Modified: head/sys/arm/conf/A20 > ============================================================================== > --- head/sys/arm/conf/A20 Sun Jan 24 23:35:20 2016 (r294697) > +++ head/sys/arm/conf/A20 Mon Jan 25 00:24:57 2016 (r294698) > @@ -23,9 +23,12 @@ ident A20 > include "std.armv6" > include "../allwinner/a20/std.a20" > > +options ARM_INTRNG > + > options HZ=100 > options SCHED_ULE # ULE scheduler > options SMP # Enable multiple cores > +options PLATFORM > > # Debugging for use in -current > makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols > > Modified: head/sys/arm/conf/CUBIEBOARD > ============================================================================== > --- head/sys/arm/conf/CUBIEBOARD Sun Jan 24 23:35:20 2016 (r294697) > +++ head/sys/arm/conf/CUBIEBOARD Mon Jan 25 00:24:57 2016 (r294698) > @@ -26,6 +26,7 @@ include "../allwinner/std.a10" > > options HZ=100 > options SCHED_4BSD # 4BSD scheduler > +options PLATFORM > > # Debugging for use in -current > makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols > >