<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">Hi all,</font></p>
<p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10"> </font></o:p></p><p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10">I am trying to mount SD-Card over SPI on our custom DM6467
board. davinci spi controller driver and mmc over spi drver are selected in the menuconfig. i am using davinci-PSP.03-XX-00-37 kernel. </font></o:p></p><p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10"><br></font></o:p></p><p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10">I have also edited board initialization file to probe the MMC card under SPI as below:</font></o:p></p>
<p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10"> </font></o:p></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">static struct spi_board_info
dm646x_spi_info[] __initconst = {<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">#ifdef CONFIG_MMC_SPI<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"> <b>
{<o:p></o:p></b></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"><b>
.modalias = "mmc_spi",<o:p></o:p></b></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"><b>
.max_speed_hz = (750 * 1000 ), /* max spi clock (SCK)
speed in HZ */<o:p></o:p></b></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"><b>
.bus_num = 0,<o:p></o:p></b></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"><b>
.chip_select =
0,
/* CS0 */<o:p></o:p></b></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"><b>
.mode = SPI_MODE_0,<o:p></o:p></b></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"><b>
},</b><o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">#endif<o:p></o:p></font></p>
<p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10"> </font></o:p></p><p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10"><br></font></o:p></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">The kernel boots with following log</font></p>
<p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10"> </font></o:p></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">spi_davinci spi_davinci.0: DaVinci
SPI driver in EDMA mode<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">Using RX channel = 17 , TX channel =
16 and event queue = 3<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">spi_davinci spi_davinci.0:
Controller at 0xfec66800<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">……………<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">…………..<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc_spi spi0.0: ASSUMING SPI bus
stays unshared!<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc_spi spi0.0: ASSUMING 3.2-3.4 V
slot power<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc0: clock 0Hz busmode 0 powermode
0 cs 0 Vdd 0 width 0 timing 0<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc_spi spi0.0: SD/MMC host mmc0, no
WP, no poweroff<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc0: clock 0Hz busmode 2 powermode
1 cs 1 Vdd 21 width 0 timing 0<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc_spi spi0.0: mmc_spi: power up
(21)<o:p></o:p></font></p>
<p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10"> </font></o:p></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc0: Minimum clock frequency too
high for identification mode<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc0: clock 750000Hz busmode 2
powermode 2 cs 1 Vdd 21 width 0 timing 0<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc_spi spi0.0: mmc_spi: power on
(21)<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc_spi spi0.0: can't change
chip-select polarity 1<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc0: starting CMD52 arg 80000c08
flags 00000015<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc_spi spi0.0: bogus command<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">Backtrace: <o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">[<c002a7d0>]
(dump_backtrace+0x0/0x114) from [<c023f5e4>] (dump_stack+0x18/0x1c)<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"> r7:ce0bf400 r6:ce0bf400
r5:ce0bf5c0 r4:00000000<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">[<c023f5cc>]
(dump_stack+0x0/0x1c) from [<c01af3f0>] (mmc_spi_request+0xa8/0x9d8)<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">[<c01af348>]
(mmc_spi_request+0x0/0x9d8) from [<c01a75f8>]
(mmc_wait_for_req+0x1f4/0x21c)<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">[<c01a7404>]
(mmc_wait_for_req+0x0/0x21c) from [<c01a768c>] (mmc_wait_for_cmd+0x6c/0x7c)<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"> r7:00000000 r6:ce0bf400
r5:ce091f1c r4:ce091ee4<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">[<c01a7620>]
(mmc_wait_for_cmd+0x0/0x7c) from [<c01ab4f0>] (mmc_reset_sdio+0x5c/0x6c)<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"> r7:ce090000 r6:ce0bf550
r5:ce0bf400 r4:ce091f1c<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">[<c01ab494>]
(mmc_reset_sdio+0x0/0x6c) from [<c01a71f0>] (mmc_rescan+0x24c/0x2ec)<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"> r5:60000013 r4:ce0bf400<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">[<c01a6fa4>]
(mmc_rescan+0x0/0x2ec) from [<c004eb28>] (worker_thread+0x138/0x1f8)<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"> r6:ce092de0 r5:ce0bf550
r4:ce0bf554<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">[<c004e9f0>]
(worker_thread+0x0/0x1f8) from [<c0052904>] (kthread+0x88/0x90)<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">[<c005287c>] (kthread+0x0/0x90)
from [<c003f9b8>] (do_exit+0x0/0x684)<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10"> r7:00000000 r6:00000000
r5:00000000 r4:00000000<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc0: req done (CMD52): -22:
00000000 00000000 00000000 00000000<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc0: starting CMD0 arg 00000000
flags 000000c0<o:p></o:p></font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">mmc_spi spi0.0: mmc_spi:
CMD0, resp R1<o:p></o:p></font></p>
<p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10"> </font></o:p></p><p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10">I am not able to identify the micro SD card. Is there
anything which i am missing?</font></o:p></p>
<p class="MsoNormal"><o:p><font class="Apple-style-span" color="#1D1B10"> </font></o:p></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">Regards,</font></p>
<p class="MsoNormal"><font class="Apple-style-span" color="#1D1B10">Sumesh.</font></p>                                            </body>
</html>