From: Piotr Dymacz Date: Sun, 16 Jul 2017 17:17:51 +0000 (+0200) Subject: Add more sanity checks of GPIO masks in qca_gpio_init.S X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a1d594835111b35386780c428c27c59db18e7bd7;p=oweals%2Fu-boot_mod.git Add more sanity checks of GPIO masks in qca_gpio_init.S --- diff --git a/u-boot/cpu/mips/ar7240/qca_gpio_init.S b/u-boot/cpu/mips/ar7240/qca_gpio_init.S index 7199c48..146843c 100644 --- a/u-boot/cpu/mips/ar7240/qca_gpio_init.S +++ b/u-boot/cpu/mips/ar7240/qca_gpio_init.S @@ -64,6 +64,23 @@ #error "GPIOs for active low LEDs must be included in CONFIG_QCA_GPIO_MASK_OUT!" #endif +#if defined(CONFIG_QCA_GPIO_MASK_LED_ACT_H) &&\ + defined(CONFIG_QCA_GPIO_MASK_LED_ACT_L) + #if ((CONFIG_QCA_GPIO_MASK_LED_ACT_H) &\ + (CONFIG_QCA_GPIO_MASK_LED_ACT_L)) + #error "Same GPIO/s included in CONFIG_QCA_GPIO_MASK_LED_ACT_H and CONFIG_QCA_GPIO_MASK_LED_ACT_L" + #endif +#endif + +/* Output GPIOs cannot have initial value hi and low at the same time */ +#if defined(CONFIG_QCA_GPIO_MASK_OUT_INIT_H) &&\ + defined(CONFIG_QCA_GPIO_MASK_OUT_INIT_L) + #if ((CONFIG_QCA_GPIO_MASK_OUT_INIT_H) &\ + (CONFIG_QCA_GPIO_MASK_OUT_INIT_L)) + #error "Same GPIO/s included in CONFIG_QCA_GPIO_MASK_OUT_INIT_H and CONFIG_QCA_GPIO_MASK_OUT_INIT_L" + #endif +#endif + .globl lowlevel_gpio_init .type lowlevel_gpio_init, @function .align 4