From: Andre Przywara <andre.przywara@arm.com>
To: Samuel Holland <samuel@sholland.org>
Cc: u-boot@lists.denx.de, Jagan Teki <jagan@amarulasolutions.com>
Subject: Re: [PATCH 1/3] sunxi: Clean up inclusions of asm/arch/gpio.h
Date: Tue, 14 Sep 2021 00:53:13 +0100 [thread overview]
Message-ID: <20210914005313.085b6748@slackpad.fritz.box> (raw)
In-Reply-To: <20210911215049.5840-2-samuel@sholland.org>
On Sat, 11 Sep 2021 16:50:47 -0500
Samuel Holland <samuel@sholland.org> wrote:
> As part of migrating to DM_GPIO and DM_PINCTRL, eventually we will
> remove the asm/arch/gpio.h header. In preparation, clean up the various
> files that include it.
>
> Some files did not contain any GPIO code at all, so this header was
> completely unused.
>
> A few files contained only legacy platform-specific GPIO code for
> setting up pin muxes. They were left unchanged, as that code will be
> completely removed by the DM_PINCTRL migration.
>
> The remaining files contain some combination of DM_GPIO and legacy GPIO
> code. For those, switch to including asm/gpio.h (if it wasn't included
> already). Right now, this header provides both sets of functions,
> because ARCH_SUNXI selects GPIO_EXTRA_HEADER. This will still be the
> right header to include once the DM_GPIO migration is complete and
> GPIO_EXTRA_HEADER is no longer needed.
Nice cleanup, and it survived a buildman sunxi (all 158 boards).
> Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
>
> arch/arm/mach-sunxi/board.c | 1 -
> arch/arm/mach-sunxi/clock.c | 1 -
> arch/arm/mach-sunxi/clock_sun4i.c | 1 -
> board/sunxi/board.c | 1 -
> board/sunxi/gmac.c | 1 -
> drivers/gpio/axp_gpio.c | 1 -
> drivers/gpio/sunxi_gpio.c | 1 -
> drivers/mmc/sunxi_mmc.c | 3 +--
> drivers/net/sun8i_emac.c | 5 +----
> drivers/power/axp809.c | 1 -
> drivers/power/axp818.c | 1 -
> drivers/usb/musb-new/sunxi.c | 2 --
> drivers/video/sunxi/sunxi_display.c | 1 -
> drivers/video/sunxi/sunxi_lcd.c | 1 -
> 14 files changed, 2 insertions(+), 19 deletions(-)
>
> diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
> index d9b04f75fc4..373cb56db49 100644
> --- a/arch/arm/mach-sunxi/board.c
> +++ b/arch/arm/mach-sunxi/board.c
> @@ -21,7 +21,6 @@
> #include <asm/gpio.h>
> #include <asm/io.h>
> #include <asm/arch/clock.h>
> -#include <asm/arch/gpio.h>
> #include <asm/arch/spl.h>
> #include <asm/arch/sys_proto.h>
> #include <asm/arch/timer.h>
> diff --git a/arch/arm/mach-sunxi/clock.c b/arch/arm/mach-sunxi/clock.c
> index f591affebf7..de7e8752988 100644
> --- a/arch/arm/mach-sunxi/clock.c
> +++ b/arch/arm/mach-sunxi/clock.c
> @@ -10,7 +10,6 @@
> #include <common.h>
> #include <asm/io.h>
> #include <asm/arch/clock.h>
> -#include <asm/arch/gpio.h>
> #include <asm/arch/prcm.h>
> #include <asm/arch/gtbus.h>
> #include <asm/arch/sys_proto.h>
> diff --git a/arch/arm/mach-sunxi/clock_sun4i.c b/arch/arm/mach-sunxi/clock_sun4i.c
> index 57ee018eaa2..471609764d2 100644
> --- a/arch/arm/mach-sunxi/clock_sun4i.c
> +++ b/arch/arm/mach-sunxi/clock_sun4i.c
> @@ -12,7 +12,6 @@
> #include <common.h>
> #include <asm/io.h>
> #include <asm/arch/clock.h>
> -#include <asm/arch/gpio.h>
> #include <asm/arch/sys_proto.h>
>
> #ifdef CONFIG_SPL_BUILD
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index 2b7d655678d..dcd7f0b4375 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
> @@ -25,7 +25,6 @@
> #include <asm/arch/cpu.h>
> #include <asm/arch/display.h>
> #include <asm/arch/dram.h>
> -#include <asm/arch/gpio.h>
> #include <asm/arch/mmc.h>
> #include <asm/arch/prcm.h>
> #include <asm/arch/spl.h>
> diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c
> index d8fdf7728e0..1fa54ed72de 100644
> --- a/board/sunxi/gmac.c
> +++ b/board/sunxi/gmac.c
> @@ -4,7 +4,6 @@
> #include <asm/gpio.h>
> #include <asm/io.h>
> #include <asm/arch/clock.h>
> -#include <asm/arch/gpio.h>
>
> void eth_init_board(void)
> {
> diff --git a/drivers/gpio/axp_gpio.c b/drivers/gpio/axp_gpio.c
> index 73058cf40b4..35585dc8ac9 100644
> --- a/drivers/gpio/axp_gpio.c
> +++ b/drivers/gpio/axp_gpio.c
> @@ -6,7 +6,6 @@
> */
>
> #include <common.h>
> -#include <asm/arch/gpio.h>
> #include <asm/arch/pmic_bus.h>
> #include <asm/gpio.h>
> #include <axp_pmic.h>
> diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
> index 24cb604e3e3..7ce3ef73b46 100644
> --- a/drivers/gpio/sunxi_gpio.c
> +++ b/drivers/gpio/sunxi_gpio.c
> @@ -14,7 +14,6 @@
> #include <errno.h>
> #include <fdtdec.h>
> #include <malloc.h>
> -#include <asm/arch/gpio.h>
> #include <asm/io.h>
> #include <asm/gpio.h>
> #include <dm/device-internal.h>
> diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
> index 178b8cf106d..c62b5f5a6f9 100644
> --- a/drivers/mmc/sunxi_mmc.c
> +++ b/drivers/mmc/sunxi_mmc.c
> @@ -15,12 +15,11 @@
> #include <mmc.h>
> #include <clk.h>
> #include <reset.h>
> +#include <asm/gpio.h>
> #include <asm/io.h>
> #include <asm/arch/clock.h>
> #include <asm/arch/cpu.h>
> -#include <asm/arch/gpio.h>
> #include <asm/arch/mmc.h>
> -#include <asm-generic/gpio.h>
> #include <linux/delay.h>
>
> #ifndef CCM_MMC_CTRL_MODE_SEL_NEW
> diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
> index d7553fe1634..46786d9f764 100644
> --- a/drivers/net/sun8i_emac.c
> +++ b/drivers/net/sun8i_emac.c
> @@ -14,9 +14,9 @@
> #include <log.h>
> #include <asm/cache.h>
> #include <asm/global_data.h>
> +#include <asm/gpio.h>
> #include <asm/io.h>
> #include <asm/arch/clock.h>
> -#include <asm/arch/gpio.h>
> #include <common.h>
> #include <clk.h>
> #include <dm.h>
> @@ -31,9 +31,6 @@
> #include <reset.h>
> #include <dt-bindings/pinctrl/sun4i-a10.h>
> #include <wait_bit.h>
> -#if CONFIG_IS_ENABLED(DM_GPIO)
> -#include <asm-generic/gpio.h>
> -#endif
>
> #define MDIO_CMD_MII_BUSY BIT(0)
> #define MDIO_CMD_MII_WRITE BIT(1)
> diff --git a/drivers/power/axp809.c b/drivers/power/axp809.c
> index 6323492b66d..0396502cdb5 100644
> --- a/drivers/power/axp809.c
> +++ b/drivers/power/axp809.c
> @@ -13,7 +13,6 @@
> #include <common.h>
> #include <command.h>
> #include <errno.h>
> -#include <asm/arch/gpio.h>
> #include <asm/arch/pmic_bus.h>
> #include <axp_pmic.h>
>
> diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c
> index 0531707c8aa..2dc736467bb 100644
> --- a/drivers/power/axp818.c
> +++ b/drivers/power/axp818.c
> @@ -13,7 +13,6 @@
> #include <common.h>
> #include <command.h>
> #include <errno.h>
> -#include <asm/arch/gpio.h>
> #include <asm/arch/pmic_bus.h>
> #include <axp_pmic.h>
>
> diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
> index fea4105f3d1..7e62e3fe6ea 100644
> --- a/drivers/usb/musb-new/sunxi.c
> +++ b/drivers/usb/musb-new/sunxi.c
> @@ -25,8 +25,6 @@
> #include <reset.h>
> #include <asm/arch/cpu.h>
> #include <asm/arch/clock.h>
> -#include <asm/arch/gpio.h>
> -#include <asm-generic/gpio.h>
> #include <dm/device_compat.h>
> #include <dm/lists.h>
> #include <dm/root.h>
> diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c
> index 4361a58cd7e..128888f7af1 100644
> --- a/drivers/video/sunxi/sunxi_display.c
> +++ b/drivers/video/sunxi/sunxi_display.c
> @@ -17,7 +17,6 @@
>
> #include <asm/arch/clock.h>
> #include <asm/arch/display.h>
> -#include <asm/arch/gpio.h>
> #include <asm/arch/lcdc.h>
> #include <asm/arch/pwm.h>
> #include <asm/arch/tve.h>
> diff --git a/drivers/video/sunxi/sunxi_lcd.c b/drivers/video/sunxi/sunxi_lcd.c
> index 7a9eba1ed42..8b9c3b2bfa9 100644
> --- a/drivers/video/sunxi/sunxi_lcd.c
> +++ b/drivers/video/sunxi/sunxi_lcd.c
> @@ -15,7 +15,6 @@
> #include <asm/io.h>
> #include <asm/arch/clock.h>
> #include <asm/arch/lcdc.h>
> -#include <asm/arch/gpio.h>
> #include <asm/global_data.h>
> #include <asm/gpio.h>
>
next prev parent reply other threads:[~2021-09-13 23:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-11 21:50 [PATCH 0/3] sunxi: Cleanup to prepare for DM_GPIO/DM_PINCTRL Samuel Holland
2021-09-11 21:50 ` [PATCH 1/3] sunxi: Clean up inclusions of asm/arch/gpio.h Samuel Holland
2021-09-13 23:53 ` Andre Przywara [this message]
2021-09-11 21:50 ` [PATCH 2/3] sunxi: gpio: Remove name_to_gpio macro Samuel Holland
2021-09-13 23:53 ` Andre Przywara
2021-09-11 21:50 ` [PATCH 3/3] sunxi: gpio: Remove bank-specific size macros Samuel Holland
2021-09-13 23:53 ` Andre Przywara
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=20210914005313.085b6748@slackpad.fritz.box \
--to=andre.przywara@arm.com \
--cc=jagan@amarulasolutions.com \
--cc=samuel@sholland.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox