#ifeq ($(CONFIG_MACH_ODROID_4210),y)
DHDOFILES += dhd_gpio.o
-DHDCFLAGS += -DCUSTOMER_HW -DDHD_OF_SUPPORT -DCUSTOMER_HW_AMLOGIC -DHW_OOB_LOW_LEVEL
+DHDCFLAGS += -DCUSTOMER_HW -DDHD_OF_SUPPORT -DCUSTOMER_HW_AMLOGIC
#DHDCFLAGS += -DBCMWAPI_WPI -DBCMWAPI_WAI
#endif
#include <dngl_stats.h>
#include <dhd.h>
+#include <linux/amlogic/aml_gpio_consumer.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)) && defined(CONFIG_PM_SLEEP)
#include <linux/suspend.h>
extern volatile bool dhd_mmc_suspend;
}
#if defined(OOB_INTR_ONLY) && defined(HW_OOB)
-
+extern int wifi_irq_trigger_level(void);
SDIOH_API_RC
sdioh_enable_hw_oob_intr(sdioh_info_t *sd, bool enable)
{
SDIOH_API_RC status;
uint8 data;
- if (enable)
-#ifdef HW_OOB_LOW_LEVEL
- data = SDIO_SEPINT_MASK | SDIO_SEPINT_OE;
-#else
- data = SDIO_SEPINT_MASK | SDIO_SEPINT_OE | SDIO_SEPINT_ACT_HI;
-#endif
+ if (enable) {
+ if (wifi_irq_trigger_level() == GPIO_IRQ_LOW)
+ data = SDIO_SEPINT_MASK | SDIO_SEPINT_OE;
+ else
+ data = SDIO_SEPINT_MASK | SDIO_SEPINT_OE | SDIO_SEPINT_ACT_HI;
+ }
else
data = SDIO_SEPINT_ACT_HI; /* disable hw oob interrupt */