SD communication protocol

Bas Wijnen wijnen at debian.org
Fri May 28 02:22:57 EDT 2010


Hi,

On Thu, May 27, 2010 at 11:29:57PM -0500, Camilo Andres Diaz Botia wrote:
> I want to know how the ben's mmc driver reads the four data lines of the SD
> card. I believe they are read in the function jz4740_mmc_read_data, however
> I haven't managed to find where the function "*readl*" is defined (same as
> writel in function jz4740_mmc_read_data).

Those are deep inside the kernel.  They are used to read from and write
(32 bit) to memory-mapped i/o addresses.  There is also writew/readw for
16-bit and writeb/readb for 8 bit.

For these sort of questions, you can use the Linux cross-reference,
http://lxr.linux.no/linux/.  Searching for writel gives some results;
the only one which isn't for non-mips is
http://lxr.linux.no/#linux+v2.6.34/include/asm-generic/io.h#L67
Going from there to __raw_writel sends you to
http://lxr.linux.no/#linux+v2.6.34/include/asm-generic/io.h#L60
which is the definition you were looking for.

Thanks,
Bas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20100528/23539276/attachment.pgp>


More information about the discussion mailing list


interactive