From: Pierre Ossman <drzeus-list@drzeus.cx>
To: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: kernel@avr32linux.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/7] atmel-mci: support multiple mmc slots
Date: Sun, 12 Oct 2008 17:58:53 +0200 [thread overview]
Message-ID: <20081012175853.0d75b78f@mjolnir.drzeus.cx> (raw)
In-Reply-To: <20081012151344.3f81ac75@hskinnemo-gx745.norway.atmel.com>
[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]
On Sun, 12 Oct 2008 15:13:44 +0200
Haavard Skinnemoen <haavard.skinnemoen@atmel.com> wrote:
> Pierre Ossman <drzeus-list@drzeus.cx> wrote:
> > On Sun, 5 Oct 2008 18:21:27 +0200
> > Haavard Skinnemoen <haavard.skinnemoen@atmel.com> wrote:
> >
> > > + /* Calculate clock divider */
> > > + clkdiv = DIV_ROUND_UP(host->bus_hz, 2 * clock_min) - 1;
> > > if (clkdiv > 255) {
> > > dev_warn(&mmc->class_dev,
> > > "clock %u too slow; using %lu\n",
> > > - ios->clock, host->bus_hz / (2 * 256));
> > > + clock_min, host->bus_hz / (2 * 256));
> > > clkdiv = 255;
> > > }
> > >
> >
> > Has this ever happened, or is it just a bit defensive? :)
> >
> > (not that there is something wrong with that)
>
> It can happen if the controller is hooked up to a fast bus and fOD is
> slow for whatever reason. And if it does, clkdiv will wrap around and
> end up at a rate much faster than requested, so saturating it at the
> maximum divider is the safe thing to do.
>
Isn't this calculated for f_min though so that the MMC core will never
request such a frequency?
Rgds
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-10-12 15:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-05 16:21 [PATCH v2 0/7] atmel-mci: updates for 2.6.28 Haavard Skinnemoen
2008-10-05 16:21 ` [PATCH v2 1/7] atmel-mci: Implement tasklet as a state machine Haavard Skinnemoen
2008-10-05 16:21 ` [PATCH v2 2/7] atmel-mci: Don't stop the clock between transfers Haavard Skinnemoen
2008-10-05 16:21 ` [PATCH v2 3/7] atmel-mci: Platform code for supporting multiple mmc slots Haavard Skinnemoen
2008-10-05 16:21 ` [PATCH v2 4/7] atmel-mci: support " Haavard Skinnemoen
2008-10-05 16:21 ` [PATCH v2 5/7] atmel-mci: Add experimental DMA support Haavard Skinnemoen
2008-10-05 16:21 ` [PATCH v2 6/7] atmel-mci: Don't overwrite error bits when NOTBUSY is set Haavard Skinnemoen
2008-10-05 16:21 ` [PATCH v2 7/7] atmel-mci: Add missing flush_dcache_page() in PIO transfer code Haavard Skinnemoen
2008-10-12 8:44 ` [PATCH v2 5/7] atmel-mci: Add experimental DMA support Pierre Ossman
2008-10-12 8:39 ` [PATCH v2 4/7] atmel-mci: support multiple mmc slots Pierre Ossman
2008-10-12 13:13 ` Haavard Skinnemoen
2008-10-12 15:58 ` Pierre Ossman [this message]
2008-10-12 16:07 ` Haavard Skinnemoen
2008-10-05 18:46 ` [PATCH v2 0/7] atmel-mci: updates for 2.6.28 Haavard Skinnemoen
2008-10-12 8:50 ` Pierre Ossman
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=20081012175853.0d75b78f@mjolnir.drzeus.cx \
--to=drzeus-list@drzeus.cx \
--cc=haavard.skinnemoen@atmel.com \
--cc=kernel@avr32linux.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®