Skip to content

Commit

Permalink
gpio: ixp4xx: Detect special machines by compatible
Browse files Browse the repository at this point in the history
There are some special clock amendments for two machines
formerly detected by their machine_is() boardfile macro.

They are now migrated to device tree so use
of_machine_is_compatible() instead.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
  • Loading branch information
linusw authored and brgl committed Apr 18, 2022
1 parent d3bf3dc commit 4f3e79b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ config GPIO_IOP

config GPIO_IXP4XX
bool "Intel IXP4xx GPIO"
depends on ARM # For <asm/mach-types.h>
depends on ARCH_IXP4XX
select GPIO_GENERIC
select GPIOLIB_IRQCHIP
Expand Down
5 changes: 2 additions & 3 deletions drivers/gpio/gpio-ixp4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
/* Include that go away with DT transition */
#include <linux/irqchip/irq-ixp4xx.h>

#include <asm/mach-types.h>

#define IXP4XX_REG_GPOUT 0x00
#define IXP4XX_REG_GPOE 0x04
#define IXP4XX_REG_GPIN 0x08
Expand Down Expand Up @@ -240,7 +238,8 @@ static int ixp4xx_gpio_probe(struct platform_device *pdev)
* Make sure GPIO 14 and 15 are NOT used as clocks but GPIO on
* specific machines.
*/
if (machine_is_dsmg600() || machine_is_nas100d())
if (of_machine_is_compatible("dlink,dsm-g600-a") ||
of_machine_is_compatible("iom,nas-100d"))
__raw_writel(0x0, g->base + IXP4XX_REG_GPCLK);

/*
Expand Down

0 comments on commit 4f3e79b

Please sign in to comment.