|
楼主 |
发表于 2015-1-29 10:32:10
|
显示全部楼层
我的硬件平台AR6103是接在SD3上的,然后我在初始化的时候这么配置的:
- static const struct esdhc_platform_data mx6q_sabresd_sd3_data __initconst = {
- /*.cd_gpio = SABRESD_SD3_CD,
- .wp_gpio = SABRESD_SD3_WP,
- .keep_power_at_suspend = 1,
- .support_8bit = 1,
- .delay_line = 0,
- .cd_type = ESDHC_CD_CONTROLLER,
- .runtime_pm = 1,*/
- .always_present = 1,
- .keep_power_at_suspend = 1,
- .support_8bit = 1,
- .delay_line = 0,
- .cd_type = ESDHC_CD_PERMANENT,
- };
复制代码
然后系统启动后的log显示如下:
- ath6kl_sdio_init_platform register success!
- android_readwrite_file: ret=-2
- android_readwrite_file: ret=-2
- ath6kl: sdio new func 1 vendor 0x271 device 0x301 block 0x800/0x200
- ath6kl: ath6kl_sdio_set_mbox_info end!
- ath6kl: ath6kl_sdio_config end!
- ath6kl: [ath6kl_core_init]:test1
- ath6kl: hif power on
- SDIO: Enabling device mmc1:0001:1...
- [sdio_enable_func]:test1
- [sdio_enable_func]:test2
- ath6kl: Unable to enable sdio func: -62
- ath6kl: ret=-62
- ath6kl: Current ath6kl driver version is: 3.4.0.189
- ath6kl: Failed to init ath6kl core
- ath6kl_sdio: probe of mmc1:0001:1 failed with error -62
- ehci_fsl_bus_resume begins, DR
- init: sys_prop: permission denied uid:1003 name:service.bootanim.exit
- timeout while waiting for init operation
- android_readwrite_file: ret=-2
- android_readwrite_file: ret=-2
复制代码
我追踪下代码,是在这里出现问题的:
- int sdio_enable_func(struct sdio_func *func)
- {
- int ret;
- unsigned char reg;
- unsigned long timeout;
- BUG_ON(!func);
- BUG_ON(!func->card);
- pr_debug("SDIO: Enabling device %s...\n", sdio_func_id(func));
- pr_err("SDIO: Enabling device %s...\n", sdio_func_id(func));//add by lihao <Jan 28th,2015> for wifi module debug
-
- ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IOEx, 0, ®);
- if (ret)
- goto err;
- pr_err("[sdio_enable_func]:test1\n");
-
- reg |= 1 << func->num;
- ret = mmc_io_rw_direct(func->card, 1, 0, SDIO_CCCR_IOEx, reg, NULL);
- if (ret)
- goto err;
- pr_err("[sdio_enable_func]:test2\n");
- timeout = jiffies + msecs_to_jiffies(func->enable_timeout);
- while (1) {
- ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IORx, 0, ®);
- if (ret)
- goto err;
- if (reg & (1 << func->num))
- break;
- ret = -ETIME;
- if (time_after(jiffies, timeout))
- goto err;
- }
- pr_err("SDIO: Enabled device %s\n", sdio_func_id(func));
- pr_debug("SDIO: Enabled device %s\n", sdio_func_id(func));
- return 0;
- err:
- pr_debug("SDIO: Failed to enable device %s\n", sdio_func_id(func));
- return ret;
- }
复制代码
看情况是sdio读写的问题,请教高手 |
|