From patchwork Thu Mar 21 18:01:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 1060345 X-Patchwork-Delegate: twarren@nvidia.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="i/EnRxdW"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44QF9h12Krz9sPP for ; Fri, 22 Mar 2019 05:07:04 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id DBE91C220BB; Thu, 21 Mar 2019 18:04:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2350AC220E1; Thu, 21 Mar 2019 18:02:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 197B3C2208A; Thu, 21 Mar 2019 18:01:36 +0000 (UTC) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by lists.denx.de (Postfix) with ESMTPS id 89DDFC220D2 for ; Thu, 21 Mar 2019 18:01:32 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id a188so3675335wmf.3 for ; Thu, 21 Mar 2019 11:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4xo4s8ctKfUMWm6yWCnpb6MvIeCW9frOdWam+8yu3bE=; b=i/EnRxdW/FI4fchdgYqOVZN8SEaHTlS2pPYxoVWrXFSA9EdLqog9NFDy6kepGtIA8Y ISci0+rtC0HCPMboA4yJRF+bzWj6QEyogEj3Xiln0hN2SGTbR+iw79Omzqrgmy8YZO8E awYnRNY8t3bIpqTo+TyR1DnfzlOJfI7RdJ/i53asDkCPyKg9sxkhgAB9nb1a2SlD8vMX 4uWJYx6Wz7uLPhcvLPYbiNfJgpt7G3G28Wf2K2t1Q/eepDWGoMUeNdKXTc0pcRpO6tst Lc5JGg9/Khpps8dCauRcsM4bRtJgty2tr2ns80J328rr2T0v2z+dr+6kJLu3QhSH1kVf zAtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4xo4s8ctKfUMWm6yWCnpb6MvIeCW9frOdWam+8yu3bE=; b=OCNutmrppHE/xNVNCrH1rf9XkNMcG1VHzWb/DhoOIYO1c7I4KDbXa/4HPh2WOvVPLE jGsi5CnH+LOw/RZNM5Arrlu5VnqOyTmAKfiZFUqU39q0hxUo1dKJjxsAseR5xjMzKKxA 0X1EkEONr1BNkHiwiCQXONYV3zTvL24UC0+Vwg6KhWljBUzvogrCMBsB7s1smu+0okVp IOV96dPG2jEjwVW6ORB81doZK1sJg4pNpfvJ0NznFdYKfBQ91S0xBDnD5PSQYYL8afRf yaGnjq8GLr6tNjt1jaxzUuLEDLn6MgvE2R7a75kK9CjCDt6WWHi1Opjt1JLp9IWF2ENt Pq7g== X-Gm-Message-State: APjAAAUufZubSjyjvTPZqZf2JiCbvH4U9IMRDK9/fpCE1F/LLjZDwOlj uf3e51tHbemnAjSCkcWfPcrPLVAk X-Google-Smtp-Source: APXvYqxLJO+16TEteUQ/i4eX3o0cP+IXOKomNA6b7nVSx9s0OB/1jg+iMYNut/rMkeo5eKiuLdcS8Q== X-Received: by 2002:a1c:c018:: with SMTP id q24mr333382wmf.148.1553191290385; Thu, 21 Mar 2019 11:01:30 -0700 (PDT) Received: from localhost (pD9E51D2D.dip0.t-ipconnect.de. [217.229.29.45]) by smtp.gmail.com with ESMTPSA id w13sm6259270wrr.21.2019.03.21.11.01.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Mar 2019 11:01:29 -0700 (PDT) From: Thierry Reding To: Tom Warren Date: Thu, 21 Mar 2019 19:01:04 +0100 Message-Id: <20190321180118.26475-6-thierry.reding@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190321180118.26475-1-thierry.reding@gmail.com> References: <20190321180118.26475-1-thierry.reding@gmail.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 05/19] ARM: tegra: Guard pin controller code with a Kconfig symbol X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Thierry Reding Pin controller code is not relevant on all Tegra SoC generations, so guard it with a Kconfig symbol that can be selected by the generations that need it. This is in preparation for unifying Tegra186 code with the code used on older generations. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/Kconfig | 5 +++++ arch/arm/mach-tegra/Makefile | 2 +- arch/arm/mach-tegra/board.c | 6 ++++++ arch/arm/mach-tegra/board2.c | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 5763c4ae3cd1..be20ac2e804e 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -29,6 +29,9 @@ config TEGRA_IVC config TEGRA_MC bool +config TEGRA_PINCTRL + bool + config TEGRA_COMMON bool "Tegra common options" select BINMAN @@ -70,6 +73,7 @@ config TEGRA_ARMV7_COMMON select TEGRA_GP_PADCTRL select TEGRA_MC select TEGRA_NO_BPMP + select TEGRA_PINCTRL config TEGRA_ARMV8_COMMON bool "Tegra 64-bit common options" @@ -117,6 +121,7 @@ config TEGRA210 select TEGRA_GP_PADCTRL select TEGRA_MC select TEGRA_NO_BPMP + select TEGRA_PINCTRL config TEGRA186 bool "Tegra186 family" diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile index 69f802c01b45..395e0191a458 100644 --- a/arch/arm/mach-tegra/Makefile +++ b/arch/arm/mach-tegra/Makefile @@ -17,7 +17,7 @@ obj-$(CONFIG_TEGRA_GP_PADCTRL) += ap.o obj-y += board.o board2.o obj-y += cache.o obj-$(CONFIG_TEGRA_CLKRST) += clock.o -obj-y += pinmux-common.o +obj-$(CONFIG_TEGRA_PINCTRL) += pinmux-common.o obj-y += powergate.o obj-y += xusb-padctl-dummy.o endif diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c index 7ef5a67edd1f..b65bdde5a78d 100644 --- a/arch/arm/mach-tegra/board.c +++ b/arch/arm/mach-tegra/board.c @@ -12,7 +12,9 @@ #if IS_ENABLED(CONFIG_TEGRA_CLKRST) #include #endif +#if IS_ENABLED(CONFIG_TEGRA_PINCTRL) #include +#endif #if IS_ENABLED(CONFIG_TEGRA_MC) #include #endif @@ -132,6 +134,7 @@ int dram_init(void) return 0; } +#if IS_ENABLED(CONFIG_TEGRA_PINCTRL) static int uart_configs[] = { #if defined(CONFIG_TEGRA20) #if defined(CONFIG_TEGRA_UARTA_UAA_UAB) @@ -199,9 +202,11 @@ static void setup_uarts(int uart_ids) } } } +#endif void board_init_uart_f(void) { +#if IS_ENABLED(CONFIG_TEGRA_PINCTRL) int uart_ids = 0; /* bit mask of which UART ids to enable */ #ifdef CONFIG_TEGRA_ENABLE_UARTA @@ -220,6 +225,7 @@ void board_init_uart_f(void) uart_ids |= UARTE; #endif setup_uarts(uart_ids); +#endif } #if !CONFIG_IS_ENABLED(OF_CONTROL) diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index b94077221f77..ce1c9346959d 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -25,8 +25,10 @@ #if IS_ENABLED(CONFIG_TEGRA_CLKRST) #include #endif +#if IS_ENABLED(CONFIG_TEGRA_PINCTRL) #include #include +#endif #include #ifdef CONFIG_TEGRA_CLOCK_SCALING #include