Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Oct 2016 10:23:24 -0700
From:      Oleksandr Tymoshenko <gonzo@freebsd.org>
To:        Andrew Turner <andrew@fubar.geek.nz>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r307257 - in head/sys: arm/broadcom/bcm2835 arm64/broadcom arm64/broadcom/bcm2837 arm64/conf conf
Message-ID:  <B4AF5EFE-4BE4-4D61-B54D-E256CD9BCD40@freebsd.org>
In-Reply-To: <20161014093123.606cb8f3@zapp>
References:  <201610140337.u9E3baB7077179@repo.freebsd.org> <20161014093123.606cb8f3@zapp>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Oct 14, 2016, at 1:31 AM, Andrew Turner <andrew@fubar.geek.nz> =
wrote:
>=20
> On Fri, 14 Oct 2016 03:37:36 +0000 (UTC)
> Oleksandr Tymoshenko <gonzo@FreeBSD.org <mailto:gonzo@FreeBSD.org>> =
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
> <s836/s837 macros>
> #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=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B4AF5EFE-4BE4-4D61-B54D-E256CD9BCD40>