From a1d594835111b35386780c428c27c59db18e7bd7 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Sun, 16 Jul 2017 19:17:51 +0200 Subject: [PATCH] Add more sanity checks of GPIO masks in qca_gpio_init.S --- u-boot/cpu/mips/ar7240/qca_gpio_init.S | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 -- 2.25.1