diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /drivers/amba/bus.c | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'drivers/amba/bus.c')
-rw-r--r-- | drivers/amba/bus.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index c4876ac..c670727 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -552,6 +552,7 @@ amba_aphb_device_add(struct device *parent, const char *name, if (!dev) return ERR_PTR(-ENOMEM); + dev->dma_mask = dma_mask; dev->dev.coherent_dma_mask = dma_mask; dev->irq[0] = irq1; dev->irq[1] = irq2; @@ -618,7 +619,7 @@ static void amba_device_initialize(struct amba_device *dev, const char *name) dev_set_name(&dev->dev, "%s", name); dev->dev.release = amba_device_release; dev->dev.bus = &amba_bustype; - dev->dev.dma_mask = &dev->dev.coherent_dma_mask; + dev->dev.dma_mask = &dev->dma_mask; dev->res.name = dev_name(&dev->dev); } @@ -662,6 +663,9 @@ int amba_device_register(struct amba_device *dev, struct resource *parent) amba_device_initialize(dev, dev->dev.init_name); dev->dev.init_name = NULL; + if (!dev->dev.coherent_dma_mask && dev->dma_mask) + dev_warn(&dev->dev, "coherent dma mask is unset\n"); + return amba_device_add(dev, parent); } |