core.c (a46a7634017ae5da1adf352c5bd0c66a772f20b5) core.c (08d62f58aa2587132a930afbe8664379b430e2dd)
1/*
2 * Core driver for the Synopsys DesignWare DMA Controller
3 *
4 * Copyright (C) 2007-2008 Atmel Corporation
5 * Copyright (C) 2010-2011 ST Microelectronics
6 * Copyright (C) 2013 Intel Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 1488 unchanged lines hidden (view full) ---

1497 }
1498
1499 /* Calculate all channel mask before DMA setup */
1500 dw->all_chan_mask = (1 << pdata->nr_channels) - 1;
1501
1502 /* Force dma off, just in case */
1503 dw_dma_off(dw);
1504
1/*
2 * Core driver for the Synopsys DesignWare DMA Controller
3 *
4 * Copyright (C) 2007-2008 Atmel Corporation
5 * Copyright (C) 2010-2011 ST Microelectronics
6 * Copyright (C) 2013 Intel Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 1488 unchanged lines hidden (view full) ---

1497 }
1498
1499 /* Calculate all channel mask before DMA setup */
1500 dw->all_chan_mask = (1 << pdata->nr_channels) - 1;
1501
1502 /* Force dma off, just in case */
1503 dw_dma_off(dw);
1504
1505 /* Device and instance ID for IRQ and DMA pool */
1506 snprintf(dw->name, sizeof(dw->name), "dw:dmac%d", chip->id);
1507
1505 /* Create a pool of consistent memory blocks for hardware descriptors */
1508 /* Create a pool of consistent memory blocks for hardware descriptors */
1506 dw->desc_pool = dmam_pool_create("dw_dmac_desc_pool", chip->dev,
1509 dw->desc_pool = dmam_pool_create(dw->name, chip->dev,
1507 sizeof(struct dw_desc), 4, 0);
1508 if (!dw->desc_pool) {
1509 dev_err(chip->dev, "No memory for descriptors dma pool\n");
1510 err = -ENOMEM;
1511 goto err_pdata;
1512 }
1513
1514 tasklet_init(&dw->tasklet, dw_dma_tasklet, (unsigned long)dw);
1515
1516 err = request_irq(chip->irq, dw_dma_interrupt, IRQF_SHARED,
1510 sizeof(struct dw_desc), 4, 0);
1511 if (!dw->desc_pool) {
1512 dev_err(chip->dev, "No memory for descriptors dma pool\n");
1513 err = -ENOMEM;
1514 goto err_pdata;
1515 }
1516
1517 tasklet_init(&dw->tasklet, dw_dma_tasklet, (unsigned long)dw);
1518
1519 err = request_irq(chip->irq, dw_dma_interrupt, IRQF_SHARED,
1517 "dw_dmac", dw);
1520 dw->name, dw);
1518 if (err)
1519 goto err_pdata;
1520
1521 INIT_LIST_HEAD(&dw->dma.channels);
1522 for (i = 0; i < pdata->nr_channels; i++) {
1523 struct dw_dma_chan *dwc = &dw->chan[i];
1524
1525 dwc->chan.device = &dw->dma;

--- 149 unchanged lines hidden ---
1521 if (err)
1522 goto err_pdata;
1523
1524 INIT_LIST_HEAD(&dw->dma.channels);
1525 for (i = 0; i < pdata->nr_channels; i++) {
1526 struct dw_dma_chan *dwc = &dw->chan[i];
1527
1528 dwc->chan.device = &dw->dma;

--- 149 unchanged lines hidden ---