I have a custom board with a DM6467T, with a MicroSD card reader pinned out to the SPI interface. I added the following to my board-dm6467t.c file:
static struct spi_board_info dm646x_evm_spi_info[] __initconst = {
{
.modalias = "mmc_spi",
.max_speed_hz = 1 * 1000 * 1000,
.bus_num = 0,
.chip_select = 0,
.mode = SPI_MODE_0,
},
};
I get the following messages on boot (if I take the SD card out before booting, I get all the same messages, except the backtrace):
spi_davinci spi_davinci.0: DaVinci SPI driver in EDMA mode
Using RX channel = 17 , TX channel = 16 and event queue = 3
spi_davinci spi_davinci.0: Controller at 0xfec66800
...
mmc_spi spi0.0: ASSUMING SPI bus stays unshared!
mmc_spi spi0.0: ASSUMING 3.2-3.4 V slot power
mmc_spi spi0.0: SD/MMC host mmc0, no WP, no poweroff
...
mmc_spi spi0.0: can't change chip-select polarity
...
Backtrace:
[<c002a89c>] (dump_backtrace+0x0/0x114) from [<c02afdd0>] (dump_stack+0x18/0x1c)
r7:c20d0400 r6:c20d0400 r5:c20d05c0 r4:00000000
[<c02afdb8>] (dump_stack+0x0/0x1c) from [<c01fde70>] (mmc_spi_request+0xa8/0x9d8)
[<c01fddc8>] (mmc_spi_request+0x0/0x9d8) from [<c01f61b0>] (mmc_wait_for_req+0x1f4/0x21c)
[<c01f5fbc>] (mmc_wait_for_req+0x0/0x21c) from [<c01f6244>] (mmc_wait_for_cmd+0x6c/0x7c)
r7:00000000 r6:c20d0400 r5:c20c9f1c r4:c20c9ee4
[<c01f61d8>] (mmc_wait_for_cmd+0x0/0x7c) from [<c01fa0a8>] (mmc_reset_sdio+0x5c/0x6c)
r7:c20c8000 r6:c20d0550 r5:c20d0400 r4:c20c9f1c
[<c01fa04c>] (mmc_reset_sdio+0x0/0x6c) from [<c01f5d80>] (mmc_rescan+0x24c/0x314)
r5:60000013 r4:c20d0400
[<c01f5b34>] (mmc_rescan+0x0/0x314) from [<c00536dc>] (worker_thread+0x138/0x1f8)
r6:c20b9a60 r5:c20d0550 r4:c20d0554
[<c00535a4>] (worker_thread+0x0/0x1f8) from [<c00574b8>] (kthread+0x88/0x90)
[<c0057430>] (kthread+0x0/0x90) from [<c004456c>] (do_exit+0x0/0x684)
r7:00000000 r6:00000000 r5:00000000 r4:00000000
If I change the SPI max frequency from 1MHz to 400KHz, I get the following message, regardless of whether a card is present or not. (and mmc_spi doesn't run):
spi_davinci spi_davinci.0: can't setup spi0.0, status -22
Any ideas?