From: Chris Ball <cjb@laptop.org>
To: Manoj Iyer <manoj.iyer@canonical.com>
Cc: linux-kernel@vger.kernel.org, jbarnes@virtuousgeek.org,
matsumur@nts.ricoh.co.jp, linux-pci@vger.kernel.org,
linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: Added quirks for Ricoh 1180:e823 lower base clock frequency
Date: Mon, 11 Jul 2011 17:53:15 -0400 [thread overview]
Message-ID: <m2wrfofpro.fsf@bob.laptop.org> (raw)
In-Reply-To: <1310419715-13254-2-git-send-email-manoj.iyer@canonical.com> (Manoj Iyer's message of "Mon, 11 Jul 2011 16:28:35 -0500")
Hi Manoj, adding linux-mmc@,
On Mon, Jul 11 2011, Manoj Iyer wrote:
> Ricoh 1180:e823 does not recognize certain types of SD/MMC cards.
> Lowering the SD base clock frequency from 200Mhz to 50Mhz fixes
> this issue. This solution was suggest by Koji Matsumuro, Ricoh
> Company,Ltd.
>
> BugLink: http://launchpad.net/bugs/773524
> Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
> Tested-by: Daniel Manrique <daniel.manrique@canonical.com>
> Cc: Koji Matsumuro <matsumur@nts.ricoh.co.jp>
> ---
> drivers/pci/quirks.c | 24 ++++++++++++++++++++++++
> 1 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 02145e9..fe5bffa 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -2758,6 +2758,30 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
>
> dev_notice(&dev->dev, "proprietary Ricoh MMC controller disabled (via firewire function)\n");
> dev_notice(&dev->dev, "MMC cards are now supported by standard SDHCI controller\n");
> +
> + /*
> + * RICOH 0xe823 SD/MMC card reader fails to recognize
> + * certain types of SD/MMC cards. Lowering the SD base
> + * clock frequency from 200Mhz to 50Mhz fixes this issue.
> + *
> + * 0x150 - SD2.0 mode enable for changing base clock
> + * frequency to 50Mhz
> + * 0xe1 - Base clock frequency
> + * 0x32 - 50Mhz new clock frequency
> + * 0xf9 - Key register for 0x150
> + * 0xfc - key register for 0xe1
> + */
> + if (dev->device == PCI_DEVICE_ID_RICOH_R5CE823) {
> + pci_write_config_byte(dev, 0xf9, 0xfc);
> + pci_write_config_byte(dev, 0x150, 0x10);
> + pci_write_config_byte(dev, 0xf9, 0x00);
> + pci_write_config_byte(dev, 0xfc, 0x01);
> + pci_write_config_byte(dev, 0xe1, 0x32);
> + pci_write_config_byte(dev, 0xfc, 0x00);
> +
> + dev_notice(&dev->dev, "Controller base frequency changed to 50Mhz)\n");
There's an erroneous ")" in this string; I'll replace it with a "." if
this patch goes in via my tree. Also, let's make it "MMC controller"
instead of just "Controller".
> + }
> +
> }
> DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
> DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
Have you checked to see how SD I/O performance differs after this change?
(If this is significant, perhaps we want to try lowering the frequency
only after a card starts returning errors, since some cards work fine
at the higher frequency.)
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next parent reply other threads:[~2011-07-11 21:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1310419715-13254-1-git-send-email-manoj.iyer@canonical.com>
[not found] ` <1310419715-13254-2-git-send-email-manoj.iyer@canonical.com>
2011-07-11 21:53 ` Chris Ball [this message]
2011-07-11 22:55 ` [PATCH] mmc: Added quirks for Ricoh 1180:e823 lower base clock frequency Manoj Iyer
2011-07-12 16:01 ` Manoj Iyer
2011-07-12 16:20 ` Chris Ball
2011-07-12 17:09 ` Manoj Iyer
2011-07-12 17:30 ` Chris Ball
2011-07-12 18:00 ` Arnd Bergmann
2011-07-13 14:45 ` Chris Ball
2011-07-13 15:42 ` Manoj Iyer
2011-07-13 16:35 ` Arnd Bergmann
2011-07-13 16:46 ` Manoj Iyer
2011-07-13 16:55 ` Chris Ball
2011-07-13 17:02 ` Manoj Iyer
2011-07-13 17:08 ` Chris Ball
2011-07-18 20:36 ` Manoj Iyer
2011-07-18 20:40 ` Chris Ball
2011-07-18 20:47 ` Manoj Iyer
2011-07-18 21:05 ` Chris Ball
2011-07-18 21:12 ` Manoj Iyer
2011-07-19 19:43 ` Manoj Iyer
2012-11-22 0:29 ` Chris Ball
2012-11-26 16:42 ` Manoj Iyer
2012-11-26 16:57 ` Chris Ball
2011-07-13 16:50 ` Chris Ball
2011-07-13 16:54 ` Manoj Iyer
2011-07-18 23:27 ` Jesse Barnes
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=m2wrfofpro.fsf@bob.laptop.org \
--to=cjb@laptop.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=manoj.iyer@canonical.com \
--cc=matsumur@nts.ricoh.co.jp \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).