From patchwork Thu Apr 3 20:30:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 3934021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A5021BFF02 for ; Thu, 3 Apr 2014 20:31:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A93E320303 for ; Thu, 3 Apr 2014 20:31:02 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6544A202FF for ; Thu, 3 Apr 2014 20:31:01 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WVoHl-0004Aa-2J; Thu, 03 Apr 2014 20:30:53 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WVoHi-0005dz-HX; Thu, 03 Apr 2014 20:30:50 +0000 Received: from mail-ie0-f182.google.com ([209.85.223.182]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WVoHg-0005d7-2k for linux-arm-kernel@lists.infradead.org; Thu, 03 Apr 2014 20:30:48 +0000 Received: by mail-ie0-f182.google.com with SMTP id y20so2437560ier.13 for ; Thu, 03 Apr 2014 13:30:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=aX0J4aS3gU7iCoNQUSqsUdlhFpb1BSb/q7AxGcLBEB0=; b=YZWkEntYz7zvis4Fq37MGifFyFPjHmwTKD0wlXuRXf/BMqhNUqYiEogvQxNlI6c+8h b9qaVYNC2y/DG1Kum8A1sPq/er3yZ0zswkBWoy+DemJqekV3zcvGd2fzGTAm4f3+EFx1 49lchCz67N+lBNe7WLe+PDWqrsu7zt4PROhb7Kq04JnHG4rDk9w+MDaC95+PFQMVQ8Ys 4J4CFUBvXn/UEloNnk+DCxvsBILk7H9NDN+0emu8Si5rH/dSnqsEgJhVop/Eze33WXh0 XV5veE8XIQuWh6TESNLtjvS0bC0YSF3KDRm7pGMP4AzhYdV42I7eEGMfQJUmAdmYPYZg V/fQ== X-Gm-Message-State: ALoCoQkF2pORIw7Ldb4UxralcpbGucrD8+cmo4YHzQHnK0Ij+r/XjKQBdw+XZHsKQPeeKPgxUKPS X-Received: by 10.50.154.66 with SMTP id vm2mr10753018igb.4.1396557025729; Thu, 03 Apr 2014 13:30:25 -0700 (PDT) Received: from localhost.localdomain (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPSA id s9sm273259igw.16.2014.04.03.13.30.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Apr 2014 13:30:24 -0700 (PDT) From: Alex Elder To: bcm@fixthebug.org, mporter@linaro.org Subject: [PATCH] mach-bcm: clean up config and build targets Date: Thu, 3 Apr 2014 15:30:52 -0500 Message-Id: <1396557052-24029-1-git-send-email-elder@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140403_163048_160015_B8D0F920 X-CRM114-Status: GOOD ( 12.57 ) X-Spam-Score: -2.6 (--) Cc: bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently CONFIG_ARCH_BCM_MOBILE is used to select all Broadcom mobile SoCs. Instead, use that only as a config menu switch, and define specific symbols like CONFIG_ARCH_BCM_281XX to select a particular SoC family. If ARCH_BCM_MOBILE is selected, all of the SoCs will be selected by default, but this way each can be disabled individually as well. This allows more precision in controlling what gets built under mach-bcm. Another benefit to doing this is that it makes it obvious that the code that implements SMC calls to control L2 cache is only used for BCM281XX (for example). Also use Kbuild's $(-y) variable mechanism to build a single object file containing everything used for the bcm281xx board in arch/arm/mach-bcm. Note: This patch is based on the current arm-soc/for-next branch: e98cd72 arm-soc: document samsung merges The patch is available here: http://git.linaro.org/landing-teams/working/broadcom/kernel.git Branch review/mach-bcm-cleanup Signed-off-by: Alex Elder --- arch/arm/mach-bcm/Kconfig | 28 ++++++++++++++++++++++++---- arch/arm/mach-bcm/Makefile | 16 ++++++++++++---- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig index 21f97f7..183fdef 100644 --- a/arch/arm/mach-bcm/Kconfig +++ b/arch/arm/mach-bcm/Kconfig @@ -10,7 +10,7 @@ if ARCH_BCM menu "Broadcom SoC Selection" config ARCH_BCM_MOBILE - bool "Broadcom Mobile SoC" if ARCH_MULTI_V7 + bool "Broadcom Mobile SoC Support" if ARCH_MULTI_V7 depends on MMU select ARCH_REQUIRE_GPIOLIB select ARM_ERRATA_754322 @@ -23,9 +23,29 @@ config ARCH_BCM_MOBILE select PINCTRL help This enables support for systems based on Broadcom mobile SoCs. - It currently supports the 'BCM281XX' family, which includes - BCM11130, BCM11140, BCM11351, BCM28145 and - BCM28155 variants. + +if ARCH_BCM_MOBILE + +menu "Broadcom Mobile SoC Selection" + +config ARCH_BCM_281XX + bool "Broadcom BCM281XX SoC family" + default y + help + Enable support for the the BCM281XX family, which includes + BCM11130, BCM11140, BCM11351, BCM28145 and BCM28155 + variants. + +config ARCH_BCM_21664 + bool "Broadcom BCM21664 SoC family" + default y + help + Enable support for the the BCM21664 family, which includes + BCM21663 and BCM21664 variants. + +endmenu + +endif config ARCH_BCM2835 diff --git a/arch/arm/mach-bcm/Makefile b/arch/arm/mach-bcm/Makefile index a326b28..08e63c1 100644 --- a/arch/arm/mach-bcm/Makefile +++ b/arch/arm/mach-bcm/Makefile @@ -10,10 +10,18 @@ # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -obj-$(CONFIG_ARCH_BCM_MOBILE) := board_bcm281xx.o board_bcm21664.o \ - bcm_kona_smc.o bcm_kona_smc_asm.o kona.o -obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o - +# BCM281XX +obj-$(CONFIG_ARCH_BCM_281XX) += bcm281xx.o +bcm281xx-y := board_bcm281xx.o +bcm281xx-y += bcm_kona_smc.o bcm_kona_smc_asm.o kona.o plus_sec := $(call as-instr,.arch_extension sec,+sec) AFLAGS_bcm_kona_smc_asm.o :=-Wa,-march=armv7-a$(plus_sec) + +# BCM21664 +obj-$(CONFIG_ARCH_BCM_21664) += board_bcm21664.o + +# BCM2835 +obj-$(CONFIG_ARCH_BCM2835) += board_bcm2835.o + +# BCM5301X obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o