:smileylaugh:
hai:
I do as Phuong Dang Minh sayed.but i failed;
can'n find mmc1: new SDIO card at address 0001.
can you help me?
i find that mmc_send_io_op_cond() return failure;
int mmc_send_io_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr)
{
struct mmc_command cmd;
int i, err = 0;
BUG_ON(!host);
memset(&cmd, 0, sizeof(struct mmc_command));
cmd.opcode = SD_IO_SEND_OP_COND;
cmd.arg = ocr;
cmd.flags = MMC_RSP_SPI_R4 | MMC_RSP_R4 | MMC_CMD_BCR;
for (i = 100; i; i--) {
err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
printk("==============err = mmc_wait_for_cmd(),err: %d\n", err);//err = -110
if (err)
break;
/* if we're just probing, do a single pass */
if (ocr == 0)
break;
/* otherwise wait until reset completes */
if (mmc_host_is_spi(host)) {
/*
* Both R1_SPI_IDLE and MMC_CARD_BUSY indicate
* an initialized card under SPI, but some cards
* (Marvell's) only behave when looking at this
* one.
*/
if (cmd.resp[1] & MMC_CARD_BUSY)
break;
} else {
if (cmd.resp[0] & MMC_CARD_BUSY)
break;
}
err = -ETIMEDOUT;
mmc_delay(10);
}
if (rocr)
*rocr = cmd.resp[mmc_host_is_spi(host) ? 1 : 0];
return err;
}
my kernel log:
mxsdhci: MXC Secure Digital Host Controller Interface driver
mxsdhci: MXC SDHCI Controller Driver.
mmc0: SDHCI detect irq 0 irq 1 INTERNAL DMA
mxsdhci: MXC SDHCI Controller Driver.
================mmc_rescan
mmc1: SDHCI detect irq 0 irq 2 INTERNAL DMA
mxsdhci: MXC SDHCI Controller Driver.
mmc2: SDHCI detect irq 203 irq 3 INTERNAL DMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Cirrus Logic CS42888 ALSA SoC Codec Driver
sgtl5000-i2c 1-000a: SGTL5000 revision 17
================First we search for SDIO...
==============err = mmc_wait_for_cmd(),err: -110
================...then normal SD...
==============err = mmc_wait_for_app_cmd,err: 0
==============err = mmc_wait_for_app_cmd,err: 0
mxc_spdif mxc_spdif.0: MXC SPDIF Audio Transmitter
No device for codec mxc spdif
No device for DAI mxc spdif
No device for DAI imx-ssi-1-0
No device for DAI imx-ssi-1-1
No device for DAI imx-ssi-2-0
No device for DAI imx-ssi-2-1
No device for DAI imx-spdif-dai
==============err = mmc_wait_for_app_cmd,err: 0
DMA Sound Buffer Allocated: Playback UseIram=1 ext_ram=0 buf->addr=f8016000 buf->area=e0856000 size=24576
DMA Sound Buffer Allocated: Capture UseIram=1 ext_ram=1 buf->addr=cf370000 buf->area=fa8ad000 size=24576
asoc: SGTL5000 <-> imx-ssi-2-0 mapping ok
mmc0: new high speed SDHC card at address aaaa
mmcblk0: mmc0:aaaa SU04G 3.69 GiB
mmcblk0: p1
================mmc_rescan
DMA Sound Buffer Allocated: Playback UseIram=1 ext_ram=1 buf->addr=cf430000 buf->area=fa8b3000 size=24576
asoc: mxc spdif <-> imx-spdif-dai mapping ok
ALSA device list:
#0: imx-3stack (SGTL5000)
#1: imx-3stack-spdif (mxc spdif)
TCP cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
Bluetooth: L2CAP ver 2.14
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO (Voice Link) ver 0.6
Bluetooth: SCO socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
lib80211: common routines for IEEE802.11 drivers
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2
================First we search for SDIO...
==============err = mmc_wait_for_cmd(),err: -110
================...then normal SD...
input: mxc_ts as /devices/virtual/input/input2
mxc input touchscreen loaded
mxc_rtc mxc_rtc.0: setting system clock to 1970-01-01 00:00:00 UTC (0)
==============err = mmc_wait_for_app_cmd,err: -110
================...and finally MMC.
================mmc_rescan
================First we search for SDIO...
==============err = mmc_wait_for_cmd(),err: -123
================...then normal SD...
==============err = mmc_wait_for_app_cmd,err: -123
================...and finally MMC.