summaryrefslogtreecommitdiffstats
path: root/drivers/atm/he.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-08 08:20:32 -0500
committerTakashi Iwai <tiwai@suse.de>2019-02-08 08:20:32 -0500
commitd02cac152c97dffcb0cdd91e09b54fd6e2cca63d (patch)
tree68e4c6bd842703009f3edbf8f0e0e9326e4b2fad /drivers/atm/he.c
parent36e4617c01153757cde9e5fcd375a75a8f8425c3 (diff)
parenta50e32694fbcdbf55875095258b9398e2eabd71f (diff)
Merge tag 'asoc-v5.1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v5.1 Lots and lots of new drivers so far, a highlight being the MediaTek BTCVSD which is a driver for a Bluetooth radio chip - the first such driver we've had upstream. Hopefully we will soon also see a baseband with an upstream driver! - Support for only powering up channels that are actively being used. - Quite a few improvements to simplify the generic card drivers, especially the merge of the SCU cards into the main generic drivers. - Lots of fixes for probing on Intel systems, trying to rationalize things to look more standard from a framework point of view. - New drivers for Asahi Kasei Microdevices AK4497, Cirrus Logic CS4341, Google ChromeOS embedded controllers, Ingenic JZ4725B, MediaTek BTCVSD, MT8183 and MT6358, NXP MICFIL, Rockchip RK3328, Spreadtrum DMA controllers, Qualcomm WCD9335, Xilinx S/PDIF and PCM formatters.
Diffstat (limited to 'drivers/atm/he.c')
-rw-r--r--drivers/atm/he.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index 29f102dcfec4..211607986134 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -533,9 +533,10 @@ static void he_init_tx_lbfp(struct he_dev *he_dev)
533 533
534static int he_init_tpdrq(struct he_dev *he_dev) 534static int he_init_tpdrq(struct he_dev *he_dev)
535{ 535{
536 he_dev->tpdrq_base = dma_zalloc_coherent(&he_dev->pci_dev->dev, 536 he_dev->tpdrq_base = dma_alloc_coherent(&he_dev->pci_dev->dev,
537 CONFIG_TPDRQ_SIZE * sizeof(struct he_tpdrq), 537 CONFIG_TPDRQ_SIZE * sizeof(struct he_tpdrq),
538 &he_dev->tpdrq_phys, GFP_KERNEL); 538 &he_dev->tpdrq_phys,
539 GFP_KERNEL);
539 if (he_dev->tpdrq_base == NULL) { 540 if (he_dev->tpdrq_base == NULL) {
540 hprintk("failed to alloc tpdrq\n"); 541 hprintk("failed to alloc tpdrq\n");
541 return -ENOMEM; 542 return -ENOMEM;
@@ -717,7 +718,7 @@ static int he_init_cs_block_rcm(struct he_dev *he_dev)
717 instead of '/ 512', use '>> 9' to prevent a call 718 instead of '/ 512', use '>> 9' to prevent a call
718 to divdu3 on x86 platforms 719 to divdu3 on x86 platforms
719 */ 720 */
720 rate_cps = (unsigned long long) (1 << exp) * (man + 512) >> 9; 721 rate_cps = (unsigned long long) (1UL << exp) * (man + 512) >> 9;
721 722
722 if (rate_cps < 10) 723 if (rate_cps < 10)
723 rate_cps = 10; /* 2.2.1 minimum payload rate is 10 cps */ 724 rate_cps = 10; /* 2.2.1 minimum payload rate is 10 cps */
@@ -805,9 +806,9 @@ static int he_init_group(struct he_dev *he_dev, int group)
805 goto out_free_rbpl_virt; 806 goto out_free_rbpl_virt;
806 } 807 }
807 808
808 he_dev->rbpl_base = dma_zalloc_coherent(&he_dev->pci_dev->dev, 809 he_dev->rbpl_base = dma_alloc_coherent(&he_dev->pci_dev->dev,
809 CONFIG_RBPL_SIZE * sizeof(struct he_rbp), 810 CONFIG_RBPL_SIZE * sizeof(struct he_rbp),
810 &he_dev->rbpl_phys, GFP_KERNEL); 811 &he_dev->rbpl_phys, GFP_KERNEL);
811 if (he_dev->rbpl_base == NULL) { 812 if (he_dev->rbpl_base == NULL) {
812 hprintk("failed to alloc rbpl_base\n"); 813 hprintk("failed to alloc rbpl_base\n");
813 goto out_destroy_rbpl_pool; 814 goto out_destroy_rbpl_pool;
@@ -844,9 +845,9 @@ static int he_init_group(struct he_dev *he_dev, int group)
844 845
845 /* rx buffer ready queue */ 846 /* rx buffer ready queue */
846 847
847 he_dev->rbrq_base = dma_zalloc_coherent(&he_dev->pci_dev->dev, 848 he_dev->rbrq_base = dma_alloc_coherent(&he_dev->pci_dev->dev,
848 CONFIG_RBRQ_SIZE * sizeof(struct he_rbrq), 849 CONFIG_RBRQ_SIZE * sizeof(struct he_rbrq),
849 &he_dev->rbrq_phys, GFP_KERNEL); 850 &he_dev->rbrq_phys, GFP_KERNEL);
850 if (he_dev->rbrq_base == NULL) { 851 if (he_dev->rbrq_base == NULL) {
851 hprintk("failed to allocate rbrq\n"); 852 hprintk("failed to allocate rbrq\n");
852 goto out_free_rbpl; 853 goto out_free_rbpl;
@@ -868,9 +869,9 @@ static int he_init_group(struct he_dev *he_dev, int group)
868 869
869 /* tx buffer ready queue */ 870 /* tx buffer ready queue */
870 871
871 he_dev->tbrq_base = dma_zalloc_coherent(&he_dev->pci_dev->dev, 872 he_dev->tbrq_base = dma_alloc_coherent(&he_dev->pci_dev->dev,
872 CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq), 873 CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq),
873 &he_dev->tbrq_phys, GFP_KERNEL); 874 &he_dev->tbrq_phys, GFP_KERNEL);
874 if (he_dev->tbrq_base == NULL) { 875 if (he_dev->tbrq_base == NULL) {
875 hprintk("failed to allocate tbrq\n"); 876 hprintk("failed to allocate tbrq\n");
876 goto out_free_rbpq_base; 877 goto out_free_rbpq_base;
@@ -913,11 +914,9 @@ static int he_init_irq(struct he_dev *he_dev)
913 /* 2.9.3.5 tail offset for each interrupt queue is located after the 914 /* 2.9.3.5 tail offset for each interrupt queue is located after the
914 end of the interrupt queue */ 915 end of the interrupt queue */
915 916
916 he_dev->irq_base = dma_zalloc_coherent(&he_dev->pci_dev->dev, 917 he_dev->irq_base = dma_alloc_coherent(&he_dev->pci_dev->dev,
917 (CONFIG_IRQ_SIZE + 1) 918 (CONFIG_IRQ_SIZE + 1) * sizeof(struct he_irq),
918 * sizeof(struct he_irq), 919 &he_dev->irq_phys, GFP_KERNEL);
919 &he_dev->irq_phys,
920 GFP_KERNEL);
921 if (he_dev->irq_base == NULL) { 920 if (he_dev->irq_base == NULL) {
922 hprintk("failed to allocate irq\n"); 921 hprintk("failed to allocate irq\n");
923 return -ENOMEM; 922 return -ENOMEM;
@@ -1464,9 +1463,9 @@ static int he_start(struct atm_dev *dev)
1464 1463
1465 /* host status page */ 1464 /* host status page */
1466 1465
1467 he_dev->hsp = dma_zalloc_coherent(&he_dev->pci_dev->dev, 1466 he_dev->hsp = dma_alloc_coherent(&he_dev->pci_dev->dev,
1468 sizeof(struct he_hsp), 1467 sizeof(struct he_hsp),
1469 &he_dev->hsp_phys, GFP_KERNEL); 1468 &he_dev->hsp_phys, GFP_KERNEL);
1470 if (he_dev->hsp == NULL) { 1469 if (he_dev->hsp == NULL) {
1471 hprintk("failed to allocate host status page\n"); 1470 hprintk("failed to allocate host status page\n");
1472 return -ENOMEM; 1471 return -ENOMEM;