[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1275394964-26865-1-git-send-email-linus.walleij@stericsson.com>
Date: Tue, 1 Jun 2010 14:22:44 +0200
From: Linus Walleij <linus.walleij@...ricsson.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: <linux-kernel@...r.kernel.org>,
Jonas Aaberg <jonas.aberg@...ricsson.com>,
Linus Walleij <linus.walleij@...ricsson.com>
Subject: [PATCH 17/18] DMAENGINE: ste_dma40: support disabling physical channels
From: Jonas Aaberg <jonas.aberg@...ricsson.com>
This makes it possible to disable physical channels.
Signed-off-by: Jonas Aaberg <jonas.aberg@...ricsson.com>
Signed-off-by: Linus Walleij <linus.walleij@...ricsson.com>
---
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 5cde3c3..0829ddb 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -2236,6 +2236,14 @@ static int __init d40_phy_res_init(struct d40_base *base)
}
spin_lock_init(&base->phy_res[i].lock);
}
+
+ /* Mark disabled channels as occupied */
+ for (i = 0; base->plat_data->disabled_channels[i] != -1; i++) {
+ base->phy_res[i].allocated_src = D40_ALLOC_PHY;
+ base->phy_res[i].allocated_dst = D40_ALLOC_PHY;
+ num_phy_chans_avail--;
+ }
+
dev_info(base->dev, "%d of %d physical DMA channels available\n",
num_phy_chans_avail, base->num_phy_chans);
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists