From owner-svn-src-all@freebsd.org Fri Oct 14 17:23:28 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 C2A09C12286; Fri, 14 Oct 2016 17:23:28 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (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 8FFDC1B0; Fri, 14 Oct 2016 17:23:28 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from [76.102.118.237] (helo=[10.0.1.5]) by id.bluezbox.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2 (FreeBSD)) (envelope-from ) id 1bv6CZ-0005VE-UD; Fri, 14 Oct 2016 10:23:25 -0700 From: Oleksandr Tymoshenko Message-Id: Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Subject: Re: svn commit: r307257 - in head/sys: arm/broadcom/bcm2835 arm64/broadcom arm64/broadcom/bcm2837 arm64/conf conf Date: Fri, 14 Oct 2016 10:23:24 -0700 In-Reply-To: <20161014093123.606cb8f3@zapp> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Andrew Turner References: <201610140337.u9E3baB7077179@repo.freebsd.org> <20161014093123.606cb8f3@zapp> X-Mailer: Apple Mail (2.3226) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: > On Oct 14, 2016, at 1:31 AM, Andrew Turner wrote: > > On Fri, 14 Oct 2016 03:37:36 +0000 (UTC) > Oleksandr Tymoshenko > wrote: > >> Author: gonzo >> Date: Fri Oct 14 03:37:35 2016 >> New Revision: 307257 >> URL: https://svnweb.freebsd.org/changeset/base/307257 >> >> Log: >> Add initial Raspberry Pi 3 support >> >> RPI3 kernel config builds kernel compatible with latest upstream >> device tree and firmware: >> https://github.com/raspberrypi/firmware/tree/master/boot As of today >> it's 597c662a613df1144a6bc43e5f4505d83bd748ca >> Default console is PL01x, so pi3-disable-bt dt overlay should be >> configured in config.txt and stock U-Boot should be patched to use >> proper serial port. >> Yet unsupported: SMP, VCHIQ, RNG driver. RNG requires some work due >> to upstream device tree incompatibility. >> >> Multiple people contributed to this work over time: db@, loos@, >> manu@ >> >> Added: >> head/sys/arm64/broadcom/ >> head/sys/arm64/broadcom/bcm2837/ >> head/sys/arm64/broadcom/bcm2837/files.bcm2837 (contents, props >> changed) head/sys/arm64/conf/RPI3 (contents, props changed) >> Modified: >> head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h >> head/sys/conf/options.arm64 >> >> Modified: head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h >> ============================================================================== >> --- head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h Fri Oct 14 >> 03:32:20 2016 (r307256) +++ >> head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h Fri Oct 14 >> 03:37:35 2016 (r307257) @@ -37, 7 +37, 7 @@ #define >> BCM2835_VCBUS_IO_BASE 0x7E000000 #define >> BCM2835_VCBUS_SDRAM_UNCACHED 0xC0000000 >> -#ifdef SOC_BCM2836 >> +#if defined(SOC_BCM2836) || defined(SOC_BCM2837) > > You could reverse the logic here to: > #ifdef SOC_BCM2835 > <2835 macros> > #else > > #endif > >> #define BCM2835_ARM_IO_BASE 0x3f000000 >> #define BCM2835_VCBUS_SDRAM_BASE >> BCM2835_VCBUS_SDRAM_UNCACHED #else >> >> Added: [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 HTML_MESSAGE BODY: HTML included in message Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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, 14 Oct 2016 17:23:28 -0000 > On Oct 14, 2016, at 1:31 AM, Andrew Turner = wrote: >=20 > On Fri, 14 Oct 2016 03:37:36 +0000 (UTC) > Oleksandr Tymoshenko > = wrote: >=20 >> Author: gonzo >> Date: Fri Oct 14 03:37:35 2016 >> New Revision: 307257 >> URL: https://svnweb.freebsd.org/changeset/base/307257 >>=20 >> Log: >> Add initial Raspberry Pi 3 support >>=20 >> RPI3 kernel config builds kernel compatible with latest upstream >> device tree and firmware: >> https://github.com/raspberrypi/firmware/tree/master/boot As of today >> it's 597c662a613df1144a6bc43e5f4505d83bd748ca=20 >> Default console is PL01x, so pi3-disable-bt dt overlay should be >> configured in config.txt and stock U-Boot should be patched to use >> proper serial port.=20 >> Yet unsupported: SMP, VCHIQ, RNG driver. RNG requires some work due >> to upstream device tree incompatibility. >>=20 >> Multiple people contributed to this work over time: db@, loos@, >> manu@ >>=20 >> Added: >> head/sys/arm64/broadcom/ >> head/sys/arm64/broadcom/bcm2837/ >> head/sys/arm64/broadcom/bcm2837/files.bcm2837 (contents, props >> changed) head/sys/arm64/conf/RPI3 (contents, props changed) >> Modified: >> head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h >> head/sys/conf/options.arm64 >>=20 >> Modified: head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h Fri Oct 14 >> 03:32:20 2016 (r307256) +++ >> head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.h Fri Oct 14 >> 03:37:35 2016 (r307257) @@ -37,7 +37,7 @@ #define >> BCM2835_VCBUS_IO_BASE 0x7E000000 #define >> BCM2835_VCBUS_SDRAM_UNCACHED 0xC0000000=20 >> -#ifdef SOC_BCM2836 >> +#if defined(SOC_BCM2836) || defined(SOC_BCM2837) >=20 > You could reverse the logic here to: > #ifdef SOC_BCM2835 > <2835 macros> > #else > > #endif >=20 >> #define BCM2835_ARM_IO_BASE 0x3f000000 >> #define BCM2835_VCBUS_SDRAM_BASE >> BCM2835_VCBUS_SDRAM_UNCACHED #else >>=20 >> Added: head/sys/arm64/broadcom/bcm2837/files.bcm2837 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- /dev/null 00:00:00 1970 (empty, because file is >> newly added) +++ head/sys/arm64/broadcom/bcm2837/files.bcm2837 >> Fri Oct 14 03:37:35 2016 (r307257) @@ -0,0 +1,4 @@ >> +# $FreeBSD$ >> + >> +arm/broadcom/bcm2835/bcm2836.c standard > This should be in files.arm64 and enabled when the SOC_ option is set. >=20 >> +kern/kern_clocksource.c standard > This is already in files.arm64. Thanks, I will fix these.=20 >>=20 >> Added: head/sys/arm64/conf/RPI3 >=20 > Why a new kernel config and not GENERIC? I thought about it. But no SMP support yet. When we have SMP support we = can get rid of RPI3 config.=20 > ... >> Modified: head/sys/conf/options.arm64 >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/conf/options.arm64 Fri Oct 14 03:32:20 >> 2016 (r307256) +++ head/sys/conf/options.arm64 Fri Oct >> 14 03:37:35 2016 (r307257) @@ -9,5 +9,6 @@ >> VFP opt_global.h=20 >> # SoC Support >> SOC_ALLWINNER_A64 opt_soc.h >> +SOC_BCM2837 opt_global.h > This should be SOC_BRCM_BCM2837 (or maybe SOC_BRCM_BCM283X) and live = in > opt_soc.h This one to match ARM SOC_XXX pattern. All SOC_ for arm reside in = opt_global, since BCM SoC files are used in ARM and ARM64 files they will need to = include two files to get options from the same category. Probably we should = convert all SOC_XXX opts to opt_soc.h for consistency, but I didn=E2=80=99t want to do this = in this change. =20=