From: Masami Hiramatsu <masami.hiramatsu@linaro.org>
To: 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 [thread overview]
Message-ID: <161861627412.298230.5111171339392037845.stgit@localhost> (raw)
In-Reply-To: <161861622792.298230.15803163505976731363.stgit@localhost>
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 <masami.hiramatsu@linaro.org>
---
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 <asm/arch/gpio.h>
#endif
#include <asm-generic/gpio.h>
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
next prev parent reply other threads:[~2021-04-16 23:37 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 23:37 [PATCH v2 00/13] arm64: synquacer: Add SynQuacer/DeveloperBox support Masami Hiramatsu
2021-04-16 23:37 ` [PATCH v2 01/13] ata: ahci-pci: Use scsi_ops to initialize ops Masami Hiramatsu
2021-04-16 23:37 ` [PATCH v2 02/13] dm: pci: Skip setting VGA bridge bits if parent device is the host bus Masami Hiramatsu
2021-04-16 23:37 ` [PATCH v2 03/13] efi: Fix to use null handle to create new handle for efi_fmp_raw Masami Hiramatsu
2021-04-16 23:37 ` Masami Hiramatsu [this message]
2021-04-29 16:09 ` [PATCH v2 04/13] gpio: Introduce CONFIG_ONLY_GENERIC_GPIO to cleanup #ifdefs Simon Glass
2021-04-30 2:03 ` Masami Hiramatsu
2021-04-30 18:13 ` Simon Glass
2021-05-03 11:51 ` Tom Rini
2021-05-06 2:28 ` Masami Hiramatsu
2021-04-16 23:38 ` [PATCH v2 05/13] mtd: spi-nor-ids: add support for Macronix mx25u51245g and mx66u1g45g flash Masami Hiramatsu
2021-04-19 8:41 ` Pratyush Yadav
2021-04-21 2:39 ` Masami Hiramatsu
2021-04-21 11:15 ` Pratyush Yadav
2021-04-16 23:38 ` [PATCH v2 06/13] pci: synquacer: Add SynQuacer ECAM based PCIe driver Masami Hiramatsu
2021-04-16 23:38 ` [PATCH v2 07/13] mmc: synquacer: Add SynQuacer F_SDH30 SDHCI driver Masami Hiramatsu
2021-04-19 22:05 ` Jaehoon Chung
2021-04-20 0:59 ` Masami Hiramatsu
2021-04-20 5:35 ` Jaehoon Chung
2021-04-25 22:05 ` Jassi Brar
2021-04-25 23:06 ` Jaehoon Chung
2021-04-16 23:38 ` [PATCH v2 08/13] spi: synquacer: Add HSSPI SPI controller driver for SynQuacer Masami Hiramatsu
2021-04-16 23:38 ` [PATCH v2 09/13] net: synquacer: Add netsec driver Masami Hiramatsu
2021-04-23 0:16 ` Ramon Fried
2021-04-16 23:38 ` [PATCH v2 10/13] ARM: dts: synquacer: Add device trees for DeveloperBox Masami Hiramatsu
2021-04-16 23:39 ` [PATCH v2 11/13] board: synquacer: Add DeveloperBox 96boards EE support Masami Hiramatsu
2021-04-21 2:40 ` Masami Hiramatsu
2021-04-16 23:39 ` [PATCH v2 12/13] doc: qemu: arm64: Fix the documentation of capsule update Masami Hiramatsu
2021-04-17 18:21 ` Heinrich Schuchardt
2021-04-18 8:07 ` Sughosh Ganu
2021-04-19 0:37 ` Takahiro Akashi
2021-04-19 2:24 ` Masami Hiramatsu
2021-04-19 2:35 ` Heinrich Schuchardt
2021-04-20 6:16 ` Takahiro Akashi
2021-04-16 23:39 ` [PATCH v2 13/13] configs: synquacer: Enable EFI capsule update support Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=161861627412.298230.5111171339392037845.stgit@localhost \
--to=masami.hiramatsu@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.