[Feature][ZXW-293]Fix WIFI related control foot gpio132, gpio91 is still affected after removing mmc0 from uboot
Only Configure :No
Affected branch: master
Affected module: wifi
Is it affected on both ZXIC and MTK:only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I8325fe99a6c60d62a64b5dd592d68008d19d195f
diff --git a/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/pwr_ctrl.c b/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/pwr_ctrl.c
index f8bf4c1..e5ec161 100755
--- a/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/pwr_ctrl.c
+++ b/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/pwr_ctrl.c
@@ -285,9 +285,15 @@
printk("request aic_vehicle_power_en gpio failed\n");
gpio_free(ZX29_GPIO_91);
}
- gpio_direction_output(ZX29_GPIO_132, 1);
- gpio_direction_output(ZX29_GPIO_91, 1);
- #else
+
+ // zw.wang The WiFi-related control pins gpio132 and gpio91 are still affected after the uboot removes mmc0 on 20240531 on start
+ if ((ioread32(MMC_CFG_BASE) & (1 << 0)))
+ {
+ gpio_direction_output(ZX29_GPIO_132, 1);
+ gpio_direction_output(ZX29_GPIO_91, 1);
+ }
+ // zw.wang The WiFi-related control pins gpio132 and gpio91 are still affected after the uboot removes mmc0 on 20240531 on end
+#else
ret=gpio_request(ZX29_GPIO_123,"aic_ufi_en");
if(ret){
printk("request aic_ufi_en gpio failed\n");
diff --git a/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/wifi_dev_aic88.c b/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/wifi_dev_aic88.c
index b65b051..a020bbc 100755
--- a/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/wifi_dev_aic88.c
+++ b/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/wifi_dev_aic88.c
@@ -5,6 +5,9 @@
#include <linux/miscdevice.h>
#include <asm/uaccess.h>
#include <linux/slab.h>
+//zw.wang The WiFi-related control pins gpio132 and gpio91 are still affected after the uboot removes mmc0 on 20240531 on start
+#include <mach/iomap.h>
+//zw.wang The WiFi-related control pins gpio132 and gpio91 are still affected after the uboot removes mmc0 on 20240531 on end
#define WIFI_IOCTL_STOP 0x0
#define WIFI_IOCTL_START 0x1
@@ -47,7 +50,10 @@
{
int ret = 0;
void __user *argp = (void __user *) arg;
-
+ //zw.wang The WiFi-related control pins gpio132 and gpio91 are still affected after the uboot removes mmc0 on 20240531 on start
+ if(!(ioread32(MMC_CFG_BASE)&(1<<0)))
+ return -ENODEV;
+ //zw.wang The WiFi-related control pins gpio132 and gpio91 are still affected after the uboot removes mmc0 on 20240531 on end
switch (cmd) {
case WIFI_IOCTL_STOP: {
printk(KERN_INFO "@@@exit Wlan@@@\n");