Date: Mon, 25 Jan 2016 16:11:26 +0800 From: Kevin Lo <kevlo@FreeBSD.org> To: Andrew Turner <andrew@FreeBSD.org> 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> In-Reply-To: <201601250024.u0P0Ov2w068306@repo.freebsd.org> References: <201601250024.u0P0Ov2w068306@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <ganbold@freebsd.org> > + * Copyright (c) 2015-2016 Emmanuel Vadot <manu@bidouilliste.com> > * All rights reserved. > * > * This code is derived from software written for Brini by Mark Brinicombe > @@ -45,32 +46,41 @@ __FBSDID("$FreeBSD$"); > #include <machine/bus.h> > #include <machine/devmap.h> > #include <machine/machdep.h> > -#include <machine/platform.h> > +#include <machine/platformvar.h> > > #include <dev/fdt/fdt_common.h> > > #include <arm/allwinner/a10_wdog.h> > +#include <arm/allwinner/allwinner_machdep.h> > > -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 > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160125081126.GA74995>