lkml.org 
[lkml]   [2008]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/7] atmel-mci: support multiple mmc slots
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-10-12 18:01    [W:0.032 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site