AnsweredAssumed Answered

SD card boot problem when LCD and USB both attached

Question asked by fcs on Sep 13, 2012

I have noticed that typically when I have our LVDS LCD screen plugged in (not necessarily with boot args configured to use it) and USB devices plugged in (keyboard & mouse or even just one of them), the bootup of the QSB demo SD card usually/always fails with the following error:

 

Waiting for root device /dev/mmcblk0p1...

usb 1-1.1: new low speed USB device using fsl-ehci and address 3

input: Microsoft Microsoft 3-Button Mouse with IntelliEye(TM) as /devices/platform/fsl-ehci.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input5

generic-usb 0003:045E:0040.0001: input: USB HID v1.10 Mouse [Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)] on usb-fsl-ehci.0-1.1/input0

usb 1-1.2: new low speed USB device using fsl-ehci and address 4

input: Dell Dell USB Keyboard as /devices/platform/fsl-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input6

generic-usb 0003:413C:2003.0002: input: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-fsl-ehci.0-1.2/input0

mmc0: error -110 whilst initialising SD card

 

The complete log is attached.

 

Without a USB device plugged in, the bootup is fine, after which the USB devices can be plugged in and work.

 

The problem is arising in here somewhere, err -110 means "ETIMEDOUT       110     /* Connection timed out */":

 

/*
* Starting point for SD card init.
*/
int mmc_attach_sd(struct mmc_host *host, u32 ocr)
{
        int err;

        BUG_ON(!host);
        WARN_ON(!host->claimed);

        mmc_sd_attach_bus_ops(host);

        /*
         * We need to get OCR a different way for SPI.
         */
        if (mmc_host_is_spi(host)) {
                mmc_go_idle(host);

                err = mmc_spi_read_ocr(host, 0, &ocr);
                if (err)
                        goto err;
        }

        /*
         * Sanity check the voltages that the card claims to
         * support.

         */
        if (ocr & 0x7F) {
                printk(KERN_WARNING "%s: card claims to support voltages "
                       "below the defined range. These will be ignored.\n",
                       mmc_hostname(host));
                ocr &= ~0x7F;
        }

        if (ocr & MMC_VDD_165_195) {
                printk(KERN_WARNING "%s: SD card claims to support the "
                       "incompletely defined 'low voltage range'. This "
                       "will be ignored.\n", mmc_hostname(host));
                ocr &= ~MMC_VDD_165_195;
        }

        host->ocr = mmc_select_voltage(host, ocr);

        /*
         * Can we support the voltage(s) of the card(s)?
         */
        if (!host->ocr) {
                err = -EINVAL;
                goto err;
        }

        /*

        * Detect and init the card.
         */
        err = mmc_sd_init_card(host, host->ocr, NULL);
        if (err)
                goto err;

        mmc_release_host(host);

        err = mmc_add_card(host->card);
        if (err)
                goto remove_card;

        return 0;

remove_card:
        mmc_remove_card(host->card);
        host->card = NULL;
        mmc_claim_host(host);
err:
        mmc_detach_bus(host);
        mmc_release_host(host);

        printk(KERN_ERR "%s: error %d whilst initialising SD card\n",
                mmc_hostname(host), err);

        return err;

}

Original Attachment has been moved to: SD-card-error-that-happens-when-LCD-and-USB-attached.txt.zip

Outcomes