<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello all,<br>
<br>
I'm attempting to get MMC over xilinx_spi working on a custom Xilinx
Virtex-4 board (that has a working SD/SPI interface, tested with a
standalone app).<br>
<br>
I'm having issues mounting the device, and after doing a bit of
debugging, I'm confused about how things are supposed to work.&nbsp; I'm
using 2.6.24-rc8-xlnx from git.xilinx.com, with some patches (for the
uartlite (Grant Likely), and other minor things).&nbsp; In addition, I'm
using some of a patch from <a href="list?person=202&amp;id=11577">Andrei
Konovalov (</a><a class="moz-txt-link-freetext" href="http://patchwork.ozlabs.org/linuxppc-embedded/patch?id=11577">http://patchwork.ozlabs.org/linuxppc-embedded/patch?id=11577</a>)
for Xilinx SPI support in virtex_devices.c (BTW, will this patch hit
the main git.xilinx.com tree at some point?)<br>
<br>
Here's what I do, and what I see:<br>
- Create a block device: "mknod /dev/m0 b 179 0"<br>
- Access that device ("cat /dev/m0")<br>
- I see the calls into the kernel:<br>
&nbsp;&nbsp;&nbsp; blkdev_open()<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; do_open()<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; get_gendisk()<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; kobj_lookup(bdev_map, ...)<br>
- The device is not found (bdev_map has been initialized, but the only
"probe" at major 179 is base_probe().<br>
- kobj_lookup() returns NULL, and the open returns ENXIO (No such
device or address).<br>
<br>
Here's what I don't understand:&nbsp; In order for kobj_lookup to
successfully return non-NULL, a "probe" has to have been added to
bdev_map using kobj_map().&nbsp; But, kobj_map(bdev_map,...) is called only
by blk_register_region(), which is never called by the MMC driver.<br>
<br>
I'm clearly missing something here.&nbsp; Has anyone successfully used MMC
over SPI or xilinx_spi?&nbsp; How is the MMC driver supposed to work in
regards to opening a device?<br>
<br>
Also, for reference:<br>
<br>
I've added the following configs:<br>
CONFIG_SPI=y<br>
CONFIG_SPI_DEBUG=y<br>
CONFIG_SPI_MASTER=y<br>
CONFIG_SPI_BITBANG=y<br>
CONFIG_SPI_XILINX=y<br>
<br>
CONFIG_MMC=y<br>
CONFIG_MMC_BLOCK=y<br>
CONFIG_MMC_BLOCK_BOUNCE=y<br>
CONFIG_MMC_SPI=y<br>
<br>
And, /proc/devices does report the mmc device:<br>
<br>
# cat /proc/devices<br>
Character devices:<br>
&nbsp; 1 mem<br>
&nbsp; 4 /dev/vc/0<br>
&nbsp; 4 tty<br>
&nbsp; 5 /dev/tty<br>
&nbsp; 5 /dev/console<br>
&nbsp; 5 /dev/ptmx<br>
&nbsp; 7 vcs<br>
&nbsp;10 misc<br>
&nbsp;13 input<br>
128 ptm<br>
136 pts<br>
204 ttyUL<br>
<br>
Block devices:<br>
&nbsp; 1 ramdisk<br>
179 mmc<br>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Brian Silverman
Concept X, LLC
</pre>
</body>
</html>