diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2010-06-20 17:26:59 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-06-22 21:01:57 -0400 |
commit | 6b7acd84426235c63a3c0f0b230a95064f97b0d4 (patch) | |
tree | e3b6e605493c387b3d522f05eb7cac0e6f5fda9d /drivers/dma | |
parent | 595167253a20167efae704ff2a8f6e2ee66cf25f (diff) |
DMAENGINE: ste_dma40: support disabling physical channels
This makes it possible to disable physical channels.
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/ste_dma40.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index e14c39526255..1d21fbd419d1 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -2230,6 +2230,14 @@ static int __init d40_phy_res_init(struct d40_base *base) | |||
2230 | } | 2230 | } |
2231 | spin_lock_init(&base->phy_res[i].lock); | 2231 | spin_lock_init(&base->phy_res[i].lock); |
2232 | } | 2232 | } |
2233 | |||
2234 | /* Mark disabled channels as occupied */ | ||
2235 | for (i = 0; base->plat_data->disabled_channels[i] != -1; i++) { | ||
2236 | base->phy_res[i].allocated_src = D40_ALLOC_PHY; | ||
2237 | base->phy_res[i].allocated_dst = D40_ALLOC_PHY; | ||
2238 | num_phy_chans_avail--; | ||
2239 | } | ||
2240 | |||
2233 | dev_info(base->dev, "%d of %d physical DMA channels available\n", | 2241 | dev_info(base->dev, "%d of %d physical DMA channels available\n", |
2234 | num_phy_chans_avail, base->num_phy_chans); | 2242 | num_phy_chans_avail, base->num_phy_chans); |
2235 | 2243 | ||