Commit 238eed66 authored by Vinod Koul's avatar Vinod Koul

Merge branch 'topic/edma' into for-linus

parents 62065132 f31b3236
...@@ -1876,6 +1876,11 @@ static void edma_dma_init(struct edma_cc *ecc, bool legacy_mode) ...@@ -1876,6 +1876,11 @@ static void edma_dma_init(struct edma_cc *ecc, bool legacy_mode)
if (memcpy_channels) { if (memcpy_channels) {
m_ddev = devm_kzalloc(ecc->dev, sizeof(*m_ddev), GFP_KERNEL); m_ddev = devm_kzalloc(ecc->dev, sizeof(*m_ddev), GFP_KERNEL);
if (!m_ddev) {
dev_warn(ecc->dev, "memcpy is disabled due to OoM\n");
memcpy_channels = NULL;
goto ch_setup;
}
ecc->dma_memcpy = m_ddev; ecc->dma_memcpy = m_ddev;
dma_cap_zero(m_ddev->cap_mask); dma_cap_zero(m_ddev->cap_mask);
...@@ -1903,6 +1908,7 @@ static void edma_dma_init(struct edma_cc *ecc, bool legacy_mode) ...@@ -1903,6 +1908,7 @@ static void edma_dma_init(struct edma_cc *ecc, bool legacy_mode)
dev_info(ecc->dev, "memcpy is disabled\n"); dev_info(ecc->dev, "memcpy is disabled\n");
} }
ch_setup:
for (i = 0; i < ecc->num_channels; i++) { for (i = 0; i < ecc->num_channels; i++) {
struct edma_chan *echan = &ecc->slave_chans[i]; struct edma_chan *echan = &ecc->slave_chans[i];
echan->ch_num = EDMA_CTLR_CHAN(ecc->id, i); echan->ch_num = EDMA_CTLR_CHAN(ecc->id, i);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment