On our custom board we are having an intermittent problem with our uSD card. We are using only the first HSMCI port, with a bus width of 4 (SD/SDIO). We are using the same kernel configuration we had been using on our G45 eval kit, which is the following:
(on the 2.6.30 kernel, with the at91 and the at91-exp.4 patchsets applied) (
http://www.at91.com/linux4sam/bin/view/ ... inuxKernel)
#
# OTG and related infrastructure
#
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_NOP_USB_XCEIV is not set
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set
#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_BOUNCE=y
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set
#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_SDHCI is not set
# CONFIG_MMC_AT91 is not set
CONFIG_MMC_ATMELMCI=y
CONFIG_MMC_ATMELMCI_DMA=y
# CONFIG_MMC_SPI is not set
# CONFIG_MEMSTICK is not set
# CONFIG_ACCESSIBILITY is not set
On the eval kit, everything works fine (4GB SD card). On our custom board, everything works fine MOST of the time. Some of the time however, on a power cycle to the board, the uSD card we have in the slot (32GB) \gets detected as a 30.8 MB card, and fails to mount. Rebooting (without power cycling) does not help and the only solution is to power cycle the board again and hope that the card detects properly (as 29.7 GB).
In searching around online, it appears this problem may be common to embedded other products using embedded linux (even the 30.8 MB detection number for 32GB cards).
Any ideas?
Thanks!