Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>

authored by

Linus Walleij and committed by
Bartosz Golaszewski
4f3e79b3 d3bf3dc4

+2 -4
-1
drivers/gpio/Kconfig
··· 353 353 354 354 config GPIO_IXP4XX 355 355 bool "Intel IXP4xx GPIO" 356 - depends on ARM # For <asm/mach-types.h> 357 356 depends on ARCH_IXP4XX 358 357 select GPIO_GENERIC 359 358 select GPIOLIB_IRQCHIP
+2 -3
drivers/gpio/gpio-ixp4xx.c
··· 17 17 /* Include that go away with DT transition */ 18 18 #include <linux/irqchip/irq-ixp4xx.h> 19 19 20 - #include <asm/mach-types.h> 21 - 22 20 #define IXP4XX_REG_GPOUT 0x00 23 21 #define IXP4XX_REG_GPOE 0x04 24 22 #define IXP4XX_REG_GPIN 0x08 ··· 238 240 * Make sure GPIO 14 and 15 are NOT used as clocks but GPIO on 239 241 * specific machines. 240 242 */ 241 - if (machine_is_dsmg600() || machine_is_nas100d()) 243 + if (of_machine_is_compatible("dlink,dsm-g600-a") || 244 + of_machine_is_compatible("iom,nas-100d")) 242 245 __raw_writel(0x0, g->base + IXP4XX_REG_GPCLK); 243 246 244 247 /*