diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-14 06:29:07 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-14 06:29:07 +0900 |
commit | f499cae1e59d75d5eb24c23d47cf8986e6032c6d (patch) | |
tree | 1af6235c18391212c40116eb90b01eae8938efee /drivers/spi/spi_imx.c | |
parent | fc3f55e672e1ed917dd9e215af81939cd3d717da (diff) | |
parent | 80a04d3f2f94fb68b5df05e3ac6697130bc3467a (diff) | |
download | linux-f499cae1e59d75d5eb24c23d47cf8986e6032c6d.tar.bz2 |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/spi/spi_imx.c')
-rw-r--r-- | drivers/spi/spi_imx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 0480d8bb19d3..0671aeef5792 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -186,6 +186,7 @@ #define QUEUE_STOPPED (1) #define IS_DMA_ALIGNED(x) (((u32)(x) & 0x03) == 0) +#define DMA_ALIGNMENT 4 /*-------------------------------------------------------------------------*/ @@ -779,7 +780,8 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data) /* Read trailing bytes */ limit = loops_per_jiffy << 1; - while ((read(drv_data) == 0) && limit--); + while ((read(drv_data) == 0) && --limit) + cpu_relax(); if (limit == 0) dev_err(&drv_data->pdev->dev, @@ -1481,6 +1483,7 @@ static int __init spi_imx_probe(struct platform_device *pdev) master->bus_num = pdev->id; master->num_chipselect = platform_info->num_chipselect; + master->dma_alignment = DMA_ALIGNMENT; master->cleanup = cleanup; master->setup = setup; master->transfer = transfer; |