> On Oct 14, 2016, at 1:31 AM, Andrew Turner <and...@fubar.geek.nz> wrote:
> 
> On Fri, 14 Oct 2016 03:37:36 +0000 (UTC)
> Oleksandr Tymoshenko <go...@freebsd.org <mailto:go...@freebsd.org>> 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
> <s836/s837 macros>
> #endif
> 
>> #define      BCM2835_ARM_IO_BASE             0x3f000000
>> #define      BCM2835_VCBUS_SDRAM_BASE
>> BCM2835_VCBUS_SDRAM_UNCACHED #else
>> 
>> Added: head/sys/arm64/broadcom/bcm2837/files.bcm2837
>> ==============================================================================
>> --- /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.
> 
>> +kern/kern_clocksource.c                     standard
> This is already in files.arm64.

Thanks, I will fix these. 

>> 
>> Added: head/sys/arm64/conf/RPI3
> 
> 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. 


> ...
>> Modified: head/sys/conf/options.arm64
>> ==============================================================================
>> --- 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 
>> # 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’t want to do this in this change. 
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to