LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* SD Card over SPI, not working for MPC8313
@ 2013-01-16 13:30 R.Patil
  2013-01-25  4:41 ` [Solved] " R.Patil
  0 siblings, 1 reply; 2+ messages in thread
From: R.Patil @ 2013-01-16 13:30 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

 Hello,

We are working on board based on Freescale MPC8313ERDB. We have ported linux 3.0.46 kernel on it. We have to use SD card over SPI. We are trying to use 'mmc_spi' driver for the same. We are able to detect SD card insertion by the interrupt (gpio interrupt is used to detect card insertion). But we are not able to initialise the card. Is the 'mmc_spi' support for MPC8313ERDB broken? 

If no, what could be the reason we are getting timeout error by function 'mmc_spi_response_get()'?  

If anybody could just give a hint to solve or debug the problem.  

Thanks and Regards,
Rahul Patil
Email Disclaimer:
  ---------------------------

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and  privileged information. Computer viruses can be transmitted via email.The recipient should check this email and any  attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

[-- Attachment #2: Type: text/html, Size: 1246 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Solved] SD Card over SPI, not working for MPC8313
  2013-01-16 13:30 SD Card over SPI, not working for MPC8313 R.Patil
@ 2013-01-25  4:41 ` R.Patil
  0 siblings, 0 replies; 2+ messages in thread
From: R.Patil @ 2013-01-25  4:41 UTC (permalink / raw)
  To: linuxppc-dev

Hello All,

The problem has been resolved.

After some debugging, we observed that problem was in initialisation of 'fs=
l=5Fspi' driver. The 'fsl=5Fspi' driver extracts platform data from device =
tree. This platform data contains gpio number for chip-select control (cs=
=5Fcontrol). Since, MPC8313E platform doesn't support 'gpiolib', 'fsl=5Fspi=
' was unable to extract gpio number for chip-select control. This was forci=
ng it to work without chip-select line. So we did (dirty) work around to in=
itialise 'cs=5Fcontrol' field explicitly (in function 'of=5Ffsl=5Fspi=5Fget=
=5Fchipselects' defined in spi=5Ffsl=5Fspi.c) with our customised handler w=
hich toggles gpio controlling chip-select. This did the job and SD card is =
working fine now.

Still we have some questions just for understanding purpose. We alternately=
 tried to initialise spi platform data by old method i.e specifying it in '=
mpc831x=5Frdb.c' as it is done in 'mpc832x=5Frdb.c' but that didn't work. S=
o our first question is, does it work for MPC8323ERDB? And one more questio=
n is, does 'MPC8313ERDB' platform support 'gpiolib' driver available in mai=
nline kernel?
The answers might help us to clean our code and also to improve our underst=
anding.

Thanks and Regards,
Rahul Patil
=20
-----R Patil/SW HW Dev/Pune EL2/R N D/Messung wrote: -----

To: linuxppc-dev@lists.ozlabs.org
From: R Patil/SW HW Dev/Pune EL2/R N D/Messung
Date: 01/16/2013 07:00PM
Subject: SD Card over SPI, not working for MPC8313=20

 Hello,

We are working on board based on Freescale MPC8313ERDB. We have ported linu=
x 3.0.46 kernel on it. We have to use SD card over SPI. We are trying to us=
e 'mmc=5Fspi' driver for the same. We are able to detect SD card insertion =
by the interrupt (gpio interrupt is used to detect card insertion). But we =
are not able to initialise the card. Is the 'mmc=5Fspi' support for MPC8313=
ERDB broken?=20

If no, what could be the reason we are getting timeout error by function 'm=
mc=5Fspi=5Fresponse=5Fget()'? =20

If anybody could just give a hint to solve or debug the problem. =20

Thanks and Regards,
Rahul Patil



Email Disclaimer:
  ---------------------------

This e-mail and any files transmitted with it are for the sole use of the i=
ntended recipient(s) and may contain confidential and  privileged informati=
on. Computer viruses can be transmitted via email.The recipient should chec=
k this email and any  attachments for the presence of viruses. The company =
accepts no liability for any damage caused by any virus transmitted by this=
 email.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-25  4:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16 13:30 SD Card over SPI, not working for MPC8313 R.Patil
2013-01-25  4:41 ` [Solved] " R.Patil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox