All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Rob Emanuele <poorarm@shoreis.com>
Cc: Joey Oravec <joravec@drewtech.com>,
	linux-arm-kernel@lists.arm.linux.org.uk,
	linux-kernel@vger.kernel.org,
	Haavard Skinnemoen <hskinnemoen@atmel.com>
Subject: Re: [PATCH] New AT91 MCI Driver that supports both MCI slots used at 	the same time
Date: Wed, 03 Jun 2009 17:10:09 +0200	[thread overview]
Message-ID: <4A269251.8090706@atmel.com> (raw)
In-Reply-To: <c8284b5b0906020953o7c112b4hc264b5520cc3aed1@mail.gmail.com>

Rob Emanuele :
> Greetings Joey,

>>> +       if (host->need_reset) {
>>> +               at91_mci_write(host, AT91_MCI_CR, AT91_MCI_SWRST);
>>> +               at91_mci_write(host, AT91_MCI_CR, AT91_MCI_MCIEN);
>>> +               at91_mci_write(host, AT91_MCI_MR, host->mode_reg);
>>> +               host->need_reset = false;
>>> +       }
>>>
>> In my experience some at91s need a reset after every single command,
>> otherwise bad things happen. I think the need_reset logic is too
>> conservative in this driver.
> 
> I'll try this and probably make it an option to always reset before
> each command.

This systematic reset was remove by Haavard with this comment:
"Also, don't reset the controller between each transfer. That was an
attempt to work around earlier bugs, and it never really worked very
well."

http://lkml.org/lkml/2008/10/5/152

This reset remains in at91_mci and it does improve things on this driver
but I do not know it a better written driver can prevent from doing this...

>>> +               /*
>>> +                * WRPROOF and RDPROOF prevent overruns/underruns by
>>> +                * stopping the clock when the FIFO is full/empty.
>>> +                * This state is not expected to last for long.
>>> +                */
>>> +               host->mode_reg = (AT91_MCI_CLKDIV & clkdiv) |
>>> AT91_MCI_WRPROOF
>>> +                                       | AT91_MCI_RDPROOF;
>>>
>> These registers are not in all at91 chips especially the at91sam9261.
> 
> I'll look into this but will not be able to test every case.

Only at91rm9200 & at91sam9261/9261s are unable to setup these
functionalities.

Best regards,
-- 
Nicolas Ferre


  reply	other threads:[~2009-06-03 15:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-28 21:40 [PATCH] New AT91 MCI Driver that supports both MCI slots used at the same time Rob Emanuele
2009-05-29 15:27 ` Joey Oravec
2009-06-02 16:53   ` Rob Emanuele
2009-06-03 15:10     ` Nicolas Ferre [this message]
2009-06-03 15:45       ` Joey Oravec
2009-06-03 19:02         ` [PATCH][Updated] " Rob Emanuele
2009-06-08 10:47           ` Haavard Skinnemoen
2009-06-08 16:58             ` Rob Emanuele
2009-06-08 18:59               ` Rob Emanuele
2009-06-02  8:49 ` [PATCH] " Nicolas Ferre
2009-06-02 16:31   ` Rob Emanuele

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A269251.8090706@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=hskinnemoen@atmel.com \
    --cc=joravec@drewtech.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=poorarm@shoreis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.