• 全部
  • 问答

2.6.33自带的sd8688的wifi驱动为神马不好使呢?(显示加载固件失败)

HEHE8737 2011-03-10 03:13:25
我用的村田封装的marvell 8688的模块,SDIO接口,启动信息中有关SDIO的如下所示(固件我已经放在了linux-2.6.33/firmware目录下,并指定了位置,USB的RT73曾今这样驱动成功):
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
s3c-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c-sdi s3c2440-sdi: running at 400kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 400kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 400kHz (requested: 400kHz).
lib80211: common routines for IEEE802.11 drivers
s3c-sdi s3c2440-sdi: running at 400kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: running at 400kHz (requested: 400kHz).
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
s3c-sdi s3c2440-sdi: running at 50000kHz (requested: 50000kHz).
s3c-sdi s3c2440-sdi: running at 50000kHz (requested: 50000kHz).
mmc0: new SDIO card at address 0001
libertas_sdio mmc0:0001:1: firmware: using built-in firmware sd8688_helper.bin
libertas_sdio mmc0:0001:1: firmware: using built-in firmware sd8688.bin
libertas: failed to load firmware
libertas_sdio: probe of mmc0:0001:1 failed with error -110
以上是全部有关启动信息,我在源代码中找,发现
static int if_sdio_prog_real(struct if_sdio_card *card)中的
timeout = jiffies + HZ;
while (1) {
u16 scratch;

scratch = if_sdio_read_scratch(card, &ret);
if (ret)
goto release;

if (scratch == IF_SDIO_FIRMWARE_OK)
break;

if (time_after(jiffies, timeout)) {
ret = -ETIMEDOUT;
goto release;
}

msleep(10);
}
中的scratch一直等于0,然后直接跳到了release,没有正常跳出函数,看下面的函数,我怎么觉得scratch必然会等于0呢,呵呵
*************************************************************************************************************
static u16 if_sdio_read_scratch(struct if_sdio_card *card, int *err)
{
int ret;
u16 scratch;

scratch = sdio_readb(card->func, card->scratch_reg, &ret);
if (!ret)
scratch |= sdio_readb(card->func, card->scratch_reg + 1,
&ret) << 8;

if (err)
*err = ret;

if (ret)
return 0xffff;

return scratch;
}

*************************************************************************************************************
u8 sdio_readb(struct sdio_func *func, unsigned int addr, int *err_ret)
{
int ret;
u8 val;

BUG_ON(!func);

if (err_ret)
*err_ret = 0;

ret = mmc_io_rw_direct(func->card, 0, func->num, addr, 0, &val);
if (ret) {
if (err_ret)
*err_ret = ret;
return 0xFF;
}

return val;
}
*************************************************************************************************************
int mmc_io_rw_direct(struct mmc_card *card, int write, unsigned fn,
unsigned addr, u8 in, u8* out)
{
struct mmc_command cmd;
int err;

BUG_ON(!card);
BUG_ON(fn > 7);

/* sanity check */
if (addr & ~0x1FFFF)
return -EINVAL;

memset(&cmd, 0, sizeof(struct mmc_command));

cmd.opcode = SD_IO_RW_DIRECT;
cmd.arg = write ? 0x80000000 : 0x00000000;
cmd.arg |= fn << 28;
cmd.arg |= (write && out) ? 0x08000000 : 0x00000000;
cmd.arg |= addr << 9;
cmd.arg |= in;
cmd.flags = MMC_RSP_SPI_R5 | MMC_RSP_R5 | MMC_CMD_AC;

err = mmc_wait_for_cmd(card->host, &cmd, 0);
if (err)
return err;

if (mmc_host_is_spi(card->host)) {
/* host driver already reported errors */
} else {
if (cmd.resp[0] & R5_ERROR)
return -EIO;
if (cmd.resp[0] & R5_FUNCTION_NUMBER)
return -EINVAL;
if (cmd.resp[0] & R5_OUT_OF_RANGE)
return -ERANGE;
}

if (out) {
if (mmc_host_is_spi(card->host))
*out = (cmd.resp[0] >> 8) & 0xFF;
else
*out = cmd.resp[0] & 0xFF;
}

return 0;
}
**************************************************************************************************************
有了解的大侠请给我答疑解惑,这究竟是什么问题呢???
...全文
564 点赞 收藏 14
写回复
14 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复

还没有回复,快来抢沙发~

相关推荐
发帖
Linux_Kernel
创建于2007-08-27

4112

社区成员

Linux/Unix社区 内核源代码研究区
申请成为版主
帖子事件
创建了帖子
2011-03-10 03:13
社区公告
暂无公告