diff options
author | Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 2013-10-30 12:01:43 -0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2013-11-14 11:04:42 -0800 |
commit | 82a1402eaee5dab1f3ab2d5aa4c316451374c5af (patch) | |
tree | 8883754be71579d718b12d1819f0cb43345bdb13 /drivers/dma/mv_xor.c | |
parent | a911ddc9a0ecbf77a8b2e78dc5c40e5b7bb40d24 (diff) | |
download | lwn-82a1402eaee5dab1f3ab2d5aa4c316451374c5af.tar.gz lwn-82a1402eaee5dab1f3ab2d5aa4c316451374c5af.zip |
dma: mv_xor: Fix mis-usage of mmio 'base' and 'high_base' registers
Despite requesting two memory resources, called 'base' and 'high_base', the
driver uses explicitly only the former. The latter is being used implicitly
by addressing at offset +0x200, which in practice accesses high_base.
In other words, the current driver breaks if the second memory resource
is ever place at an offset different from +0x200.
This patch fixes the above by defining the registers with the offset from
high_base, and use high_base explicitly where appropriate.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/mv_xor.c')
-rw-r--r-- | drivers/dma/mv_xor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 8ff21b15ad1c..1b846d5d8408 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -1035,6 +1035,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev, } mv_chan->mmr_base = xordev->xor_base; + mv_chan->mmr_high_base = xordev->xor_high_base; tasklet_init(&mv_chan->irq_tasklet, mv_xor_tasklet, (unsigned long) mv_chan); @@ -1093,7 +1094,7 @@ static void mv_xor_conf_mbus_windows(struct mv_xor_device *xordev, const struct mbus_dram_target_info *dram) { - void __iomem *base = xordev->xor_base; + void __iomem *base = xordev->xor_high_base; u32 win_enable = 0; int i; |