All of lore.kernel.org
 help / color / mirror / Atom feed
* Au1200 MMC/SD problem
@ 2006-05-02  5:46 Wolfgang Ocker
  2006-05-02 14:43 ` Jordan Crouse
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Ocker @ 2006-05-02  5:46 UTC (permalink / raw)
  To: linux-mips

Hello,

I'm trying to get a SD card to work on an Db1200 board. I'm using kernel
2.6.16.11 (+ the patch from Jordan Crouse):

http://www.linux-mips.org/archives/linux-mips/2005-12/msg00006.html

The card gets recognized and issues its relative address. Then command 9
(send csd) times out.

MMC: req done (37): 0: 00000120 00000000 00000000 00000000
MMC: starting cmd 29 arg 00018000 flags 00000061
MMC: req done (29): 0: 80ff8000 00000000 00000000 00000000
MMC: starting cmd0 2 arg 00000000 flags 00000067
MMC: req done (02): 0: 01504153 30313642 414a8be0 08004a00
MMC: starting cmd 03 arg 00000000 flags 00000065
MMC: req done (03): 0: e008004a 00000000 00000000 00000000
MMC: starting cmd 02 arg 00000000 flags 00000067
MMC: req done (02): 1: 00000000 00000000 00000000 00000000
MMC: req done (02): 1: 00000000 00000000 00000000 00000000
MMC: req done (02): 1: 00000000 00000000 00000000 00000000
MMC: req done (02): 1: 00000000 00000000 00000000 00000000
au1xx(0): DEBUG: set_ios (power=2, clock=450000Hz, vdd=15, mode=2)
MMC: starting cmd 09 arg e0080000 flags 00000007
MMC: req done (09): 1: 00000000 00000000 00000000 00000000
MMC: req done (09): 1: 00000000 00000000 00000000 00000000
MMC: req done (09): 1: 00000000 00000000 00000000 00000000
MMC: req done (09): 1: 00000000 00000000 00000000 00000000

I'm new to MMC/SD and I have no idea whether this is a problem with the
hardware, the software or the SD card (I tried two different SD cards.
Both work on my laptop with Linux 2.6.16 and a Winbond W83L51xD).

Any hints are highly appreciated.

Thanks,
Wolfgang

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

* Re: Au1200 MMC/SD problem
  2006-05-02  5:46 Au1200 MMC/SD problem Wolfgang Ocker
@ 2006-05-02 14:43 ` Jordan Crouse
  2006-05-02 18:02   ` Wolfgang Ocker
  0 siblings, 1 reply; 5+ messages in thread
From: Jordan Crouse @ 2006-05-02 14:43 UTC (permalink / raw)
  To: Wolfgang Ocker; +Cc: linux-mips

On 02/05/06 07:46 +0200, Wolfgang Ocker wrote:
> Hello,
> 
> I'm trying to get a SD card to work on an Db1200 board. I'm using kernel
> 2.6.16.11 (+ the patch from Jordan Crouse):

Thats not an encouraging sign.

> au1xx(0): DEBUG: set_ios (power=2, clock=450000Hz, vdd=15, mode=2)
> MMC: starting cmd 09 arg e0080000 flags 00000007
> MMC: req done (09): 1: 00000000 00000000 00000000 00000000
> MMC: req done (09): 1: 00000000 00000000 00000000 00000000
> MMC: req done (09): 1: 00000000 00000000 00000000 00000000
> MMC: req done (09): 1: 00000000 00000000 00000000 00000000

Ok - so the reasons for cmd->error to be MMC_ERR_TIMEOUT are:

  * invalid return from dma_map_sg in au1xmmc_prepare_data 
  * general error from the DBDMA engine
  * one of SD_STATUS_RAT sent when the IRQ fires

So to narrow it down - check the return value of au1xmmc_prepare_data
in au1xmmc_request.  Then, see if RAT is ever set in au1xmmc_irq.   This
will help narrow down the problem.  

Also, the usual general questions:
What SD card are you using?  How big is it?  Is it a v1.01 or a v1.1 card?

Jordan

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

* Re: Au1200 MMC/SD problem
  2006-05-02 14:43 ` Jordan Crouse
@ 2006-05-02 18:02   ` Wolfgang Ocker
  2006-05-03 14:59     ` Jordan Crouse
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Ocker @ 2006-05-02 18:02 UTC (permalink / raw)
  To: Jordan Crouse; +Cc: linux-mips

On Tue, 2006-05-02 at 08:43 -0600, Jordan Crouse wrote:
> On 02/05/06 07:46 +0200, Wolfgang Ocker wrote:
> > [ timeout during cmd 9 ]

> Ok - so the reasons for cmd->error to be MMC_ERR_TIMEOUT are:
>   * invalid return from dma_map_sg in au1xmmc_prepare_data 
>   * general error from the DBDMA engine
>   * one of SD_STATUS_RAT sent when the IRQ fires

The last one. In au1xmmc_irq() the status register is read with the
SD_STATUS_RAT bit set.

> So to narrow it down - check the return value of au1xmmc_prepare_data
> in au1xmmc_request.  Then, see if RAT is ever set in au1xmmc_irq.   This
> will help narrow down the problem.  

au1xmmc_prepare_data doesn't return any error.

> Also, the usual general questions:
> What SD card are you using?  How big is it?  Is it a v1.01 or a v1.1 card?

1. Canon, 16 MB, got this one with a Canon camera.
2. Labeled by Hama, 1 GB, but I don't know the real manufacturer.

I can operate the cards on my Linux-Laptop. Is there a way to determine
the manufacturer and version directly from the card?

Thanks,
Wolfgang

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

* Re: Au1200 MMC/SD problem
  2006-05-02 18:02   ` Wolfgang Ocker
@ 2006-05-03 14:59     ` Jordan Crouse
  2006-05-05 10:39       ` Wolfgang Ocker
  0 siblings, 1 reply; 5+ messages in thread
From: Jordan Crouse @ 2006-05-03 14:59 UTC (permalink / raw)
  To: Wolfgang Ocker; +Cc: linux-mips

> The last one. In au1xmmc_irq() the status register is read with the
> SD_STATUS_RAT bit set.

Ok - so the card is timing out.  That could be a series of problems, some
of which could be hardware, some of which could be software.  Since you are
using a db1200, I'll rule out hardware for the moment, unless you have a
modified board.

Do MMC cards work?  Try one - that will give us another data point.

Jordan

-- 
Jordan Crouse
Senior Linux Engineer
AMD - Personal Connectivity Solutions Group
<www.amd.com/embeddedprocessors>

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

* Re: Au1200 MMC/SD problem
  2006-05-03 14:59     ` Jordan Crouse
@ 2006-05-05 10:39       ` Wolfgang Ocker
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Ocker @ 2006-05-05 10:39 UTC (permalink / raw)
  To: Jordan Crouse; +Cc: linux-mips

On Wed, 2006-05-03 at 08:59 -0600, Jordan Crouse wrote:
> > The last one. In au1xmmc_irq() the status register is read with the
> > SD_STATUS_RAT bit set.
> 
> Ok - so the card is timing out.  That could be a series of problems, some
> of which could be hardware, some of which could be software.  Since you are
> using a db1200, I'll rule out hardware for the moment, unless you have a
> modified board.

Today I tested a third SD card from SanDisk, 128MB, same problem and log
output (time out in command 9).

> Do MMC cards work?  Try one - that will give us another data point.

Today I received a SanDisk 64 MB MMC card, it doesn't work either. Here
the log output:

au1xx(0): DEBUG: set_ios (power=0, clock=0Hz, vdd=0, mode=1)
au1xxx-mmc: MMC Controller 0 set up at B0600000 (mode=dma)
au1xx(0): DEBUG: set_ios (power=1, clock=0Hz, vdd=23, mode=1)
au1xx(0): DEBUG: set_ios (power=2, clock=450000Hz, vdd=23, mode=1)
au1xx(0): DEBUG: set_ios (power=2, clock=450000Hz, vdd=23, mode=1)
MMC: starting cmd 00 arg 00000000 flags 00000040
MMC: req done (00): 0: 00000000 00000000 00000000 00000000
au1xx(0): DEBUG: set_ios (power=2, clock=450000Hz, vdd=23, mode=1)
MMC: starting cmd 37 arg 00000000 flags 00000015
au1xx(0): DEBUG: au1xmmc_irq(), SD_STATUS_RAT set
MMC: req done (37): 1: 00000000 00000000 00000000 00000000
MMC: starting cmd 37 arg 00000000 flags 00000015
au1xx(0): DEBUG: au1xmmc_irq(), SD_STATUS_RAT set
MMC: req done (37): 1: 00000000 00000000 00000000 00000000
MMC: starting cmd 37 arg 00000000 flags 00000015
au1xx(0): DEBUG: au1xmmc_irq(), SD_STATUS_RAT set
MMC: req done (37): 1: 00000000 00000000 00000000 00000000
MMC: starting cmd 37 arg 00000000 flags 00000015
au1xx(0): DEBUG: au1xmmc_irq(), SD_STATUS_RAT set
MMC: req done (37): 1: 00000000 00000000 00000000 00000000
MMC: mmc_setup(), send_app_op_cond, ocr = 1000fc00, err = 1
MMC: mmc_setup(), no SD card found (1)
MMC: starting cmd 01 arg 00000000 flags 00000061
au1xx(0): DEBUG: au1xmmc_irq(), SD_STATUS_RAT set
MMC: req done (01): 1: 00000000 00000000 00000000 00000000
MMC: mmc_rescan(): no card found!
au1xx(0): DEBUG: set_ios (power=0, clock=0Hz, vdd=0, mode=1)


Thanks,
Wolfgang

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

end of thread, other threads:[~2006-05-05 10:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-02  5:46 Au1200 MMC/SD problem Wolfgang Ocker
2006-05-02 14:43 ` Jordan Crouse
2006-05-02 18:02   ` Wolfgang Ocker
2006-05-03 14:59     ` Jordan Crouse
2006-05-05 10:39       ` Wolfgang Ocker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.