Skip to content

Commit 4f3e79b

Browse files
linuswbrgl
authored andcommitted
gpio: ixp4xx: Detect special machines by compatible
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 <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent d3bf3dc commit 4f3e79b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

drivers/gpio/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ config GPIO_IOP
353353

354354
config GPIO_IXP4XX
355355
bool "Intel IXP4xx GPIO"
356-
depends on ARM # For <asm/mach-types.h>
357356
depends on ARCH_IXP4XX
358357
select GPIO_GENERIC
359358
select GPIOLIB_IRQCHIP

drivers/gpio/gpio-ixp4xx.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
/* Include that go away with DT transition */
1818
#include <linux/irqchip/irq-ixp4xx.h>
1919

20-
#include <asm/mach-types.h>
21-
2220
#define IXP4XX_REG_GPOUT 0x00
2321
#define IXP4XX_REG_GPOE 0x04
2422
#define IXP4XX_REG_GPIN 0x08
@@ -240,7 +238,8 @@ static int ixp4xx_gpio_probe(struct platform_device *pdev)
240238
* Make sure GPIO 14 and 15 are NOT used as clocks but GPIO on
241239
* specific machines.
242240
*/
243-
if (machine_is_dsmg600() || machine_is_nas100d())
241+
if (of_machine_is_compatible("dlink,dsm-g600-a") ||
242+
of_machine_is_compatible("iom,nas-100d"))
244243
__raw_writel(0x0, g->base + IXP4XX_REG_GPCLK);
245244

246245
/*

0 commit comments

Comments
 (0)