From 850dd7e9cd232edc356261e79c43d64da1b05dde Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 17 Dec 2019 23:01:37 +0000 Subject: [PATCH] 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. --- sys/arm/broadcom/bcm2835/bcm2835_machdep.c | 4 ++-- sys/arm/conf/GENERIC | 1 + sys/conf/options.arm | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c index 14c45cc87281..5604695a84ce 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c @@ -139,7 +139,7 @@ FDT_PLATFORM_DEF2(bcm2835, bcm2835_legacy, "bcm2835 (legacy)", 0, "raspberrypi,m 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) */ diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index c5f39ef916ff..9fbc31cb2473 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -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 diff --git a/sys/conf/options.arm b/sys/conf/options.arm index 1bea34a5865d..34229044fbfe 100644 --- a/sys/conf/options.arm +++ b/sys/conf/options.arm @@ -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