Re: [spi-devel-general] [PATCH] [SPI][POWERPC] spi_mpc83xx: fix prescale modulus?calculation

2007-08-06 Thread Anton Vorontsov
On Mon, Aug 06, 2007 at 08:44:40AM -0700, David Brownell wrote: > On Monday 06 August 2007, Anton Vorontsov wrote: > > + > > +   if (pm) > > +   pm--; > > +   else /* this floods dmesg if using mmc_spi, so dbg > > */ > > +

Re: [spi-devel-general] [PATCH] [SPI][POWERPC] spi_mpc83xx: fix prescale modulus calculation

2007-08-06 Thread David Brownell
On Monday 06 August 2007, Anton Vorontsov wrote: > + > +   if (pm) > +   pm--; > +   else /* this floods dmesg if using mmc_spi, so dbg */ > +   dev_dbg(&spi->dev, "Requested speed is too " > +  

[PATCH] [SPI][POWERPC] spi_mpc83xx: fix prescale modulus calculation

2007-08-06 Thread Anton Vorontsov
Long ago I've noticed (but didn't pay much attention) that spi_mpc83xx using PM calculations that differs from what specs describe. I.e. u8 pm = mpc83xx_spi->spibrg / (spi->max_speed_hz * 4); While specs says: "The SPI baud rate generator clock source (either system clock or system clock divided