From patchwork Fri Apr 16 23:37:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 422677 Delivered-To: patch@linaro.org Received: by 2002:a17:906:6d12:0:0:0:0 with SMTP id m18csp845288ejr; Fri, 16 Apr 2021 16:38:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT5C49og/ZKpRGyfTj71y0DJ+ahTdn2ABP5jIlQXsEaApfUV2/d8Lxvhq5OnQd5AdN0Bcm X-Received: by 2002:a17:906:d795:: with SMTP id pj21mr10598138ejb.102.1618616300191; Fri, 16 Apr 2021 16:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618616300; cv=none; d=google.com; s=arc-20160816; b=L/4OqJNeEo1sO0/Bc6igQLbZsTUgf470Mjqf9XW89uQjMUlWrqeIs5tyo4/mTVgvoc hrKhGs2/pQnUsFuPdeFQZH4gKWhPFWzcNGnB+pJVE+xpqgF22VoflR+WA5m5E4qPo/6R z+CBMRp4WtBfKvLtV1YWEeqR9cjGneUp8R5EGYAMAGNFcW+RJTb98WkFcqgI/0kZCdAk WxP8wY/zXUEqF5szcM/mm4ZiJ8qaGTCe3hRl4XbKeYz/z8CqMEERnrTtNMvqkdRsGNMW +2QaSg2+QB0jT1gqGvshfzGR6lxVDhNXKTNqRRDx1dV0eNHoGjsTcxP4gp+tytIP4K/5 08zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=OX0RL2qqfXBCAl+EdsjXP69VJG7O5JcwHeWiXzt6HzM=; b=r1/cwSRIxnKfl0ScCaMCUsBrPrQT5VgUclG9qZT6Tl2x5rwYtguYQwON/GkrZ2MOOj i8h33aQSJHzYUMp6Yf88YkZ0xIxBoEb87Kr0kz8sSL9uQr2X42XMbeMgOLD1D1pzhp+w gBnPXQvck7a8C2flUa/3bwDN9FmDoaohdxUxUBbCw8Ajyuo4MkCUN9C/Ui1hTdhjylfk XCIkuSgq1GZpF5+C0HnC+3vzdD+ppjMAXX9oQAed4xaVubOg/TltkINj5M1rnI3xKZy7 GnXo/Som+FwaG4UUFKQOKUq9Ur2bFsFy7wELCxSLC6eMWMv98h5QcGr5OsWa3ZgY+Oih GBDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GCbrPbv0; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id k23si6093480ejs.98.2021.04.16.16.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 16:38:20 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GCbrPbv0; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D3D7C81607; Sat, 17 Apr 2021 01:38:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="GCbrPbv0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DE71581F95; Sat, 17 Apr 2021 01:38:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BB4DA81E81 for ; Sat, 17 Apr 2021 01:38:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pj1-x1036.google.com with SMTP id z22-20020a17090a0156b029014d4056663fso15440250pje.0 for ; Fri, 16 Apr 2021 16:38:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=OX0RL2qqfXBCAl+EdsjXP69VJG7O5JcwHeWiXzt6HzM=; b=GCbrPbv0Rf8wqMh5K2qHMwwAzFtmRijZTZobb/ytN16mWPuknkXAdskvXs0leJrpvN fR8QwGtt+2P2U1WcTZgXZ/QVRkmwpKhqIN0IFqZb3phvJVe+tjupvjkaKojirDnoGD5a 68KPSk8wLGpvWn09c7qBuMZ8exIa1E+N52QZZMlRgt3zY4wDb3aGcy5JtscIWcNm293U YUvTOGA2azuRJIuHOYSU+FYEXbEmFdDkiwgoCRg4v0ldrJzazKZjM/IAQ4ELKNqO9E3j 9GgWa88fcNm5IH4t44Bi4yC9HpIqULFwzB4lDNFP2gXWWFehGu+OgNQd+dXjaIU9YFtu jRUQ== 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:user-agent:mime-version:content-transfer-encoding; bh=OX0RL2qqfXBCAl+EdsjXP69VJG7O5JcwHeWiXzt6HzM=; b=adKqiZ7UwAKnfzyn2581w8V7cTix6vrgrPhYspb3QggkV7Tt9VlQXdPS67tYF22FG/ eJHInUMjlxyFLp258sgjnOc5oiiB4wG7kYoLbTyHrrQVw7UwKYC+1Jan2RiOXqnLULTy SIwxibuyLwAawfqCJKS39Q8/KdrdTUujZudwPtC8VrOC2BBTAbOO1mDA/V74NPqEVeDy jhlO5XD0KOpxomOLtMo6tP4IbRF7VZj5ClyvZNPcop8QbjKlTUz/ogETKZW8hFevUkx2 ysFyDROhFMNvcN9D78vWls7IXY0xj7fxjE7b6gPi3oSR9XnvQqxv5P0e5hpK6BxHMjLk VcxA== X-Gm-Message-State: AOAM531ZXXkgBHVsVfo48CG4Iq/Ah8VrEGZHbbc+gEokTg6dXK/7ljcx L0Nv2Fnd4SowpKZU5BFBEOoK6A== X-Received: by 2002:a17:90b:4a07:: with SMTP id kk7mr11986571pjb.165.1618616279235; Fri, 16 Apr 2021 16:37:59 -0700 (PDT) Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp. [210.141.244.193]) by smtp.gmail.com with ESMTPSA id x2sm5517294pfu.77.2021.04.16.16.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 16:37:58 -0700 (PDT) From: Masami Hiramatsu To: Peng Fan , Simon Glass , Tom Rini , Heinrich Schuchardt , Alexander Graf , Jagan Teki , Vignesh R , Joe Hershberger , Ramon Fried , Sughosh Ganu Cc: Masami Hiramatsu , Jassi Brar , Ilias Apalodimas , Masahisa Kojima , Takahiro Akashi , Tim Harvey , Bin Meng , u-boot@lists.denx.de Subject: [PATCH v2 04/13] gpio: Introduce CONFIG_ONLY_GENERIC_GPIO to cleanup #ifdefs Date: Sat, 17 Apr 2021 08:37:54 +0900 Message-Id: <161861627412.298230.5111171339392037845.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <161861622792.298230.15803163505976731363.stgit@localhost> References: <161861622792.298230.15803163505976731363.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Many architecture do not have specific asm/arch/gpio.h, so instead of adding !defined(CONFIG_ARCH_xxx), introduce CONFIG_ONLY_GENERIC_GPIO and select it. Signed-off-by: Masami Hiramatsu --- arch/arm/Kconfig | 17 +++++++++++++++++ arch/arm/include/asm/gpio.h | 8 +------- board/cortina/common/Kconfig | 1 + 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3307f2b3fc..fba28323cd 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -89,6 +89,11 @@ config HAS_VBAR config HAS_THUMB2 bool +config ONLY_GENERIC_GPIO + bool + help + The target has no arch-xxxx/gpio.h and use only asm-generic/gpio.h. + # Used for compatibility with asm files copied from the kernel config ARM_ASM_UNIFIED bool @@ -634,18 +639,21 @@ config ARCH_BCM283X config ARCH_BCM63158 bool "Broadcom BCM63158 family" + select ONLY_GENERIC_GPIO select DM select OF_CONTROL imply CMD_DM config ARCH_BCM68360 bool "Broadcom BCM68360 family" + select ONLY_GENERIC_GPIO select DM select OF_CONTROL imply CMD_DM config ARCH_BCM6858 bool "Broadcom BCM6858 family" + select ONLY_GENERIC_GPIO select DM select OF_CONTROL imply CMD_DM @@ -716,6 +724,7 @@ config TARGET_BCMNS2 config TARGET_BCMNS3 bool "Support Broadcom NS3" select ARM64 + select ONLY_GENERIC_GPIO select BOARD_LATE_INIT help Support for Broadcom Northstar 3 SoCs. NS3 is a octo-core 64-bit @@ -784,6 +793,7 @@ config ARCH_KEYSTONE config ARCH_K3 bool "Texas Instruments' K3 Architecture" + select ONLY_GENERIC_GPIO select SPL select SUPPORT_SPL select FIT @@ -929,6 +939,7 @@ config ARCH_OWL config ARCH_QEMU bool "QEMU Virtual Platform" + select ONLY_GENERIC_GPIO select DM select DM_SERIAL select OF_CONTROL @@ -1061,6 +1072,7 @@ config ARCH_SUNXI config ARCH_U8500 bool "ST-Ericsson U8500 Series" select CPU_V7A + select ONLY_GENERIC_GPIO select DM select DM_GPIO select DM_MMC if MMC @@ -1203,6 +1215,7 @@ config TARGET_VEXPRESS64_JUNO config TARGET_TOTAL_COMPUTE bool "Support Total Compute Platform" select ARM64 + select ONLY_GENERIC_GPIO select PL01X_SERIAL select DM select DM_SERIAL @@ -1633,6 +1646,7 @@ config TARGET_COLIBRI_PXA270 config ARCH_UNIPHIER bool "Socionext UniPhier SoCs" + select ONLY_GENERIC_GPIO select BOARD_LATE_INIT select DM select DM_ETH @@ -1670,6 +1684,7 @@ config ARCH_STM32 config ARCH_STI bool "Support STMicrolectronics SoCs" + select ONLY_GENERIC_GPIO select BLK select CPU_V7A select DM @@ -1717,6 +1732,7 @@ config ARCH_STM32MP config ARCH_ROCKCHIP bool "Support Rockchip SoCs" + select ONLY_GENERIC_GPIO select BLK select BINMAN if SPL_OPTEE select DM @@ -1778,6 +1794,7 @@ config TARGET_THUNDERX_88XX config ARCH_ASPEED bool "Support Aspeed SoCs" + select ONLY_GENERIC_GPIO select DM select OF_CONTROL imply CMD_DM diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index 7609367884..bf1f239f81 100644 --- a/arch/arm/include/asm/gpio.h +++ b/arch/arm/include/asm/gpio.h @@ -1,10 +1,4 @@ -#if !defined(CONFIG_ARCH_UNIPHIER) && !defined(CONFIG_ARCH_STI) && \ - !defined(CONFIG_ARCH_K3) && !defined(CONFIG_ARCH_BCM68360) && \ - !defined(CONFIG_ARCH_BCM6858) && !defined(CONFIG_ARCH_BCM63158) && \ - !defined(CONFIG_ARCH_ROCKCHIP) && !defined(CONFIG_ARCH_ASPEED) && \ - !defined(CONFIG_ARCH_U8500) && !defined(CONFIG_CORTINA_PLATFORM) && \ - !defined(CONFIG_TARGET_BCMNS3) && !defined(CONFIG_TARGET_TOTAL_COMPUTE) && \ - !defined(CONFIG_ARCH_QEMU) +#if !defined(CONFIG_ONLY_GENERIC_GPIO) #include #endif #include diff --git a/board/cortina/common/Kconfig b/board/cortina/common/Kconfig index 00c709e70f..3f1be84d21 100644 --- a/board/cortina/common/Kconfig +++ b/board/cortina/common/Kconfig @@ -1,6 +1,7 @@ config CORTINA_PLATFORM bool "Cortina-Access Platform" default y + select ONLY_GENERIC_GPIO help Select this option for Cortina-Access platforms to enables selection of CAxxxx drivers