svn commit: r355867 - in head/sys: arm/broadcom/bcm2835 arm/conf conf

Kyle Evans kevans at FreeBSD.org
Tue Dec 17 23:01:38 UTC 2019


Author: kevans
Date: Tue Dec 17 23:01:37 2019
New Revision: 355867
URL: https://svnweb.freebsd.org/changeset/base/355867

Log:
  arm: add SOC_BRCM_BCM2837 option, include it in GENERIC
  
  We use armv7/GENERIC for the RPI2 images. The original RPI2 is actually a
  32-bit BCM2836, but v1.2 was upgraded to the 64-bit BCM2837. The project
  continues to provide the RPI2 image as armv7, as it's the lowest common
  denominator of the two. Historically, we've just kind of implicitly
  acknowledged this by including some bcm2837 bits on a SOC_BCM2836 kernel
  config -- this worked until r354875 added code that actually cared.
  
  Acknowledge formally that BCM2837 is valid in arm32.
  
  This name is inconsistent with the other BCM* SOC on !arm64 for two reasons:
  
  1. It's a pre-existing option on arm64, and
  2. the naming convention on arm/ should've arguably changed to include BRCM
  
  #1 seems to be a convincing enough argument to maintain the existing name
  for it.

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
  head/sys/arm/conf/GENERIC
  head/sys/conf/options.arm

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c	Tue Dec 17 22:58:07 2019	(r355866)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c	Tue Dec 17 23:01:37 2019	(r355867)
@@ -139,7 +139,7 @@ FDT_PLATFORM_DEF2(bcm2835, bcm2835_legacy, "bcm2835 (l
 FDT_PLATFORM_DEF2(bcm2835, bcm2835, "bcm2835", 0, "brcm,bcm2835", 100);
 #endif
 
-#ifdef SOC_BCM2836
+#if defined(SOC_BCM2836) || defined(SOC_BRCM_BCM2837)
 static platform_method_t bcm2836_methods[] = {
 	PLATFORMMETHOD(platform_devmap_init,	bcm2836_devmap_init),
 	PLATFORMMETHOD(platform_late_init,	bcm2835_late_init),
@@ -155,4 +155,4 @@ static platform_method_t bcm2836_methods[] = {
 FDT_PLATFORM_DEF2(bcm2836, bcm2836_legacy, "bcm2836 (legacy)", 0, "brcm,bcm2709", 100);
 FDT_PLATFORM_DEF2(bcm2836, bcm2836, "bcm2836", 0, "brcm,bcm2836", 100);
 FDT_PLATFORM_DEF2(bcm2836, bcm2837, "bcm2837", 0, "brcm,bcm2837", 100);
-#endif
+#endif	/* defined(SOC_BCM2836) || defined(SOC_BRCM_BCM2837) */

Modified: head/sys/arm/conf/GENERIC
==============================================================================
--- head/sys/arm/conf/GENERIC	Tue Dec 17 22:58:07 2019	(r355866)
+++ head/sys/arm/conf/GENERIC	Tue Dec 17 23:01:37 2019	(r355867)
@@ -57,6 +57,7 @@ options 	SOC_ALLWINNER_A83T
 options 	SOC_ALLWINNER_H2PLUS
 options 	SOC_ALLWINNER_H3
 options 	SOC_BCM2836
+options 	SOC_BRCM_BCM2837
 options 	SOC_MV_ARMADA38X
 options 	SOC_MV_ARMADAXP
 options		SOC_TI_AM335X

Modified: head/sys/conf/options.arm
==============================================================================
--- head/sys/conf/options.arm	Tue Dec 17 22:58:07 2019	(r355866)
+++ head/sys/conf/options.arm	Tue Dec 17 23:01:37 2019	(r355867)
@@ -47,6 +47,7 @@ SOC_ALTERA_ARRIA10	opt_global.h
 SOC_ALTERA_CYCLONE5	opt_global.h
 SOC_BCM2835		opt_global.h
 SOC_BCM2836		opt_global.h
+SOC_BRCM_BCM2837	opt_global.h
 SOC_IMX51		opt_global.h
 SOC_IMX53		opt_global.h
 SOC_IMX6		opt_global.h


More information about the svn-src-all mailing list