]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
gpio: Remove FTGPIO0010 driver
authorTom Rini <trini@konsulko.com>
Wed, 1 Oct 2025 20:30:29 +0000 (14:30 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 10 Oct 2025 16:26:53 +0000 (10:26 -0600)
This driver has never been enabled and currently has build problems
related in part to incorrect out_le32 calls. Remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/ftgpio010.c [deleted file]

index 58e464106a3040e5968fd32c2ca68351db6504fc..db077e472a8157537dad8162eb8aa56773c271dd 100644 (file)
@@ -695,12 +695,6 @@ config SLG7XL45106_I2C_GPO
           8-bit gpo expander, all gpo lines are controlled by writing
           value into data register.
 
-config FTGPIO010
-       bool "Faraday Technology FTGPIO010 driver"
-       depends on DM_GPIO
-       help
-          Support for GPIOs on Faraday Technology's FTGPIO010 controller.
-
 config ADP5585_GPIO
        bool "ADP5585 GPIO driver"
        depends on DM_GPIO && DM_I2C
index 83e10c79b918c79dc64e25daffd8689b716b1f2a..73c94329e36c9dce257eb4644aefd608e035976e 100644 (file)
@@ -77,7 +77,6 @@ obj-$(CONFIG_SL28CPLD_GPIO)   += sl28cpld-gpio.o
 obj-$(CONFIG_ADP5588_GPIO)     += adp5588_gpio.o
 obj-$(CONFIG_ZYNQMP_GPIO_MODEPIN)      += zynqmp_gpio_modepin.o
 obj-$(CONFIG_SLG7XL45106_I2C_GPO)      += gpio_slg7xl45106.o
-obj-$(CONFIG_FTGPIO010)                += ftgpio010.o
 obj-$(CONFIG_$(PHASE_)ADP5585_GPIO)    += adp5585_gpio.o
 obj-$(CONFIG_RZG2L_GPIO)       += rzg2l-gpio.o
 obj-$(CONFIG_MPFS_GPIO)        += mpfs_gpio.o
diff --git a/drivers/gpio/ftgpio010.c b/drivers/gpio/ftgpio010.c
deleted file mode 100644 (file)
index 4cb550a..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Faraday Technology's FTGPIO010 controller.
- */
-
-#include <dm.h>
-#include <asm/io.h>
-#include <asm/gpio.h>
-
-struct ftgpio010_regs {
-       u32 out;
-       u32 in;
-       u32 direction;  // 1 - output
-       u32 reserved;
-       u32 set;
-       u32 clear;
-};
-
-struct ftgpio010_plat {
-       struct ftgpio010_regs __iomem *regs;
-};
-
-static int ftgpio010_direction_input(struct udevice *dev, unsigned int pin)
-{
-       struct ftgpio010_plat *plat = dev_get_plat(dev);
-       struct ftgpio010_regs *const regs = plat->regs;
-
-       clrbits_le32(&regs->direction, 1 << pin);
-       return 0;
-}
-
-static int ftgpio010_direction_output(struct udevice *dev, unsigned int pin,
-                                     int val)
-{
-       struct ftgpio010_plat *plat = dev_get_plat(dev);
-       struct ftgpio010_regs *const regs = plat->regs;
-
-       /* change the data first, then the direction. to avoid glitch */
-       out_le32(val ? &regs->set : &regs->clear, 1 << pin);
-       setbits_le32(&regs->direction, 1 << pin);
-
-       return 0;
-}
-
-static int ftgpio010_get_value(struct udevice *dev, unsigned int pin)
-{
-       struct ftgpio010_plat *plat = dev_get_plat(dev);
-       struct ftgpio010_regs *const regs = plat->regs;
-
-       return in_le32(&regs->in) >> pin & 1;
-}
-
-static int ftgpio010_set_value(struct udevice *dev, unsigned int pin, int val)
-{
-       struct ftgpio010_plat *plat = dev_get_plat(dev);
-       struct ftgpio010_regs *const regs = plat->regs;
-
-       out_le32(val ? &regs->set : &regs->clear, 1 << pin);
-       return 0;
-}
-
-static int ftgpio010_get_function(struct udevice *dev, unsigned int pin)
-{
-       struct ftgpio010_plat *plat = dev_get_plat(dev);
-       struct ftgpio010_regs *const regs = plat->regs;
-
-       if (in_le32(&regs->direction) >> pin & 1)
-               return GPIOF_OUTPUT;
-       return GPIOF_INPUT;
-}
-
-static int ftgpio010_probe(struct udevice *dev)
-{
-       struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
-
-       uc_priv->gpio_count = ofnode_read_u32_default(dev_ofnode(dev),
-                                                     "nr-gpios", 32);
-       return 0;
-}
-
-static int ftgpio010_of_to_plat(struct udevice *dev)
-{
-       struct ftgpio010_plat *plat = dev_get_plat(dev);
-
-       plat->regs = dev_read_addr_ptr(dev);
-       return 0;
-}
-
-static const struct dm_gpio_ops ftgpio010_ops = {
-       .direction_input        = ftgpio010_direction_input,
-       .direction_output       = ftgpio010_direction_output,
-       .get_value              = ftgpio010_get_value,
-       .set_value              = ftgpio010_set_value,
-       .get_function           = ftgpio010_get_function,
-};
-
-static const struct udevice_id ftgpio010_ids[] = {
-       { .compatible = "faraday,ftgpio010" },
-       { }
-};
-
-U_BOOT_DRIVER(ftgpio010) = {
-       .name           = "ftgpio010",
-       .id             = UCLASS_GPIO,
-       .of_match       = ftgpio010_ids,
-       .ops            = &ftgpio010_ops,
-       .of_to_plat     = ftgpio010_of_to_plat,
-       .plat_auto      = sizeof(struct ftgpio010_plat),
-       .probe          = ftgpio010_probe,
-};