On 06/22/2011 08:55 PM, Grant Likely wrote: > On Wed, Jun 22, 2011 at 8:00 PM,<[email protected]> wrote: >> From: Dirk Brandewie<[email protected]> >> >> Bug on fifo_len not being set. The fifo sizing routine does not work >> since the txfltr register can not be written while the controller is >> enabled. The max value of txfltr can be larger than the fifo. The >> register allows values upto 0x3f (63) the fifo depth on the Intel >> SOC's if 40 >> >> Signed-off-by: Dirk Brandewie<[email protected]> >> --- >> drivers/spi/spi-dw.c | 18 ++---------------- >> 1 files changed, 2 insertions(+), 16 deletions(-) >> >> diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c >> index ad92826..cc38aa0 100644 >> --- a/drivers/spi/spi-dw.c >> +++ b/drivers/spi/spi-dw.c >> @@ -776,25 +776,11 @@ static int destroy_queue(struct spi_dw *dws) >> /* Restart the controller, disable all interrupts, clean rx fifo */ >> static void spi_dw_hw_init(struct spi_dw *dws) >> { >> + BUG_ON(!dws->fifo_len); >> + > > Ditto here. BUG is too big a reaction. Fail to initialize the > device, sure, and print a warning, but don't BUG.
Ack, I was trying to make sure the bug got caught while I was working towards getting the rest of my changes in. --Dirk ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ spi-devel-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spi-devel-general
