pdcs              427 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs;
pdcs              437 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs = filp->private_data;
pdcs              440 drivers/mailbox/bcm-pdc-mailbox.c 			       "SPU %u stats:\n", pdcs->pdc_idx);
pdcs              443 drivers/mailbox/bcm-pdc-mailbox.c 			       pdcs->pdc_requests);
pdcs              446 drivers/mailbox/bcm-pdc-mailbox.c 			       pdcs->pdc_replies);
pdcs              449 drivers/mailbox/bcm-pdc-mailbox.c 			       pdcs->last_tx_not_done);
pdcs              452 drivers/mailbox/bcm-pdc-mailbox.c 			       pdcs->tx_ring_full);
pdcs              455 drivers/mailbox/bcm-pdc-mailbox.c 			       pdcs->rx_ring_full);
pdcs              458 drivers/mailbox/bcm-pdc-mailbox.c 			       pdcs->txnobuf);
pdcs              461 drivers/mailbox/bcm-pdc-mailbox.c 			       pdcs->rxnobuf);
pdcs              464 drivers/mailbox/bcm-pdc-mailbox.c 			       pdcs->rx_oflow);
pdcs              467 drivers/mailbox/bcm-pdc-mailbox.c 			       NRXDACTIVE(pdcs->rxin, pdcs->last_rx_curr,
pdcs              468 drivers/mailbox/bcm-pdc-mailbox.c 					  pdcs->nrxpost));
pdcs              490 drivers/mailbox/bcm-pdc-mailbox.c static void pdc_setup_debugfs(struct pdc_state *pdcs)
pdcs              497 drivers/mailbox/bcm-pdc-mailbox.c 	snprintf(spu_stats_name, 16, "pdc%d_stats", pdcs->pdc_idx);
pdcs              502 drivers/mailbox/bcm-pdc-mailbox.c 	debugfs_create_file(spu_stats_name, 0400, debugfs_dir, pdcs,
pdcs              520 drivers/mailbox/bcm-pdc-mailbox.c pdc_build_rxd(struct pdc_state *pdcs, dma_addr_t dma_addr,
pdcs              523 drivers/mailbox/bcm-pdc-mailbox.c 	struct device *dev = &pdcs->pdev->dev;
pdcs              524 drivers/mailbox/bcm-pdc-mailbox.c 	struct dma64dd *rxd = &pdcs->rxd_64[pdcs->rxout];
pdcs              528 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->pdc_idx, pdcs->rxout, buf_len, flags);
pdcs              536 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rxout = NEXTRXD(pdcs->rxout, pdcs->nrxpost);
pdcs              548 drivers/mailbox/bcm-pdc-mailbox.c pdc_build_txd(struct pdc_state *pdcs, dma_addr_t dma_addr, u32 buf_len,
pdcs              551 drivers/mailbox/bcm-pdc-mailbox.c 	struct device *dev = &pdcs->pdev->dev;
pdcs              552 drivers/mailbox/bcm-pdc-mailbox.c 	struct dma64dd *txd = &pdcs->txd_64[pdcs->txout];
pdcs              556 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->pdc_idx, pdcs->txout, buf_len, flags);
pdcs              564 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->txout = NEXTTXD(pdcs->txout, pdcs->ntxpost);
pdcs              579 drivers/mailbox/bcm-pdc-mailbox.c pdc_receive_one(struct pdc_state *pdcs)
pdcs              581 drivers/mailbox/bcm-pdc-mailbox.c 	struct device *dev = &pdcs->pdev->dev;
pdcs              593 drivers/mailbox/bcm-pdc-mailbox.c 	mbc = &pdcs->mbc;
pdcs              602 drivers/mailbox/bcm-pdc-mailbox.c 	frags_rdy = NRXDACTIVE(pdcs->rxin, pdcs->last_rx_curr, pdcs->nrxpost);
pdcs              604 drivers/mailbox/bcm-pdc-mailbox.c 	    (frags_rdy < pdcs->rx_ctx[pdcs->rxin].rxin_numd))
pdcs              608 drivers/mailbox/bcm-pdc-mailbox.c 	num_frags = pdcs->txin_numd[pdcs->txin];
pdcs              611 drivers/mailbox/bcm-pdc-mailbox.c 	dma_unmap_sg(dev, pdcs->src_sg[pdcs->txin],
pdcs              612 drivers/mailbox/bcm-pdc-mailbox.c 		     sg_nents(pdcs->src_sg[pdcs->txin]), DMA_TO_DEVICE);
pdcs              614 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->txin = (pdcs->txin + num_frags) & pdcs->ntxpost;
pdcs              617 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->pdc_idx, num_frags);
pdcs              619 drivers/mailbox/bcm-pdc-mailbox.c 	rx_idx = pdcs->rxin;
pdcs              620 drivers/mailbox/bcm-pdc-mailbox.c 	rx_ctx = &pdcs->rx_ctx[rx_idx];
pdcs              630 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rxin = (pdcs->rxin + num_frags) & pdcs->nrxpost;
pdcs              633 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->pdc_idx, num_frags);
pdcs              637 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->pdc_idx, pdcs->txin, pdcs->txout, pdcs->rxin,
pdcs              638 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->rxout, pdcs->last_rx_curr);
pdcs              640 drivers/mailbox/bcm-pdc-mailbox.c 	if (pdcs->pdc_resp_hdr_len == PDC_SPUM_RESP_HDR_LEN) {
pdcs              652 drivers/mailbox/bcm-pdc-mailbox.c 				pdcs->rx_oflow++;
pdcs              660 drivers/mailbox/bcm-pdc-mailbox.c 	dma_pool_free(pdcs->rx_buf_pool, resp_hdr, resp_hdr_daddr);
pdcs              664 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->pdc_replies++;
pdcs              676 drivers/mailbox/bcm-pdc-mailbox.c pdc_receive(struct pdc_state *pdcs)
pdcs              681 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->last_rx_curr =
pdcs              682 drivers/mailbox/bcm-pdc-mailbox.c 	    (ioread32(&pdcs->rxregs_64->status0) &
pdcs              687 drivers/mailbox/bcm-pdc-mailbox.c 		rx_status = pdc_receive_one(pdcs);
pdcs              706 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_tx_list_sg_add(struct pdc_state *pdcs, struct scatterlist *sg)
pdcs              724 drivers/mailbox/bcm-pdc-mailbox.c 	tx_avail = pdcs->ntxpost - NTXDACTIVE(pdcs->txin, pdcs->txout,
pdcs              725 drivers/mailbox/bcm-pdc-mailbox.c 					      pdcs->ntxpost);
pdcs              727 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->txnobuf++;
pdcs              732 drivers/mailbox/bcm-pdc-mailbox.c 	if (pdcs->tx_msg_start == pdcs->txout) {
pdcs              734 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->txin_numd[pdcs->tx_msg_start] = 0;
pdcs              735 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->src_sg[pdcs->txout] = sg;
pdcs              740 drivers/mailbox/bcm-pdc-mailbox.c 		if (unlikely(pdcs->txout == (pdcs->ntxd - 1)))
pdcs              752 drivers/mailbox/bcm-pdc-mailbox.c 			pdc_build_txd(pdcs, databufptr, PDC_DMA_BUF_MAX,
pdcs              757 drivers/mailbox/bcm-pdc-mailbox.c 			if (unlikely(pdcs->txout == (pdcs->ntxd - 1)))
pdcs              766 drivers/mailbox/bcm-pdc-mailbox.c 		pdc_build_txd(pdcs, databufptr, bufcnt, flags | eot);
pdcs              771 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->txin_numd[pdcs->tx_msg_start] += desc_w;
pdcs              785 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_tx_list_final(struct pdc_state *pdcs)
pdcs              792 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(pdcs->rxout << 4, &pdcs->rxregs_64->ptr);
pdcs              793 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(pdcs->txout << 4, &pdcs->txregs_64->ptr);
pdcs              794 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->pdc_requests++;
pdcs              814 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_rx_list_init(struct pdc_state *pdcs, struct scatterlist *dst_sg,
pdcs              824 drivers/mailbox/bcm-pdc-mailbox.c 	rx_avail = pdcs->nrxpost - NRXDACTIVE(pdcs->rxin, pdcs->rxout,
pdcs              825 drivers/mailbox/bcm-pdc-mailbox.c 					      pdcs->nrxpost);
pdcs              827 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->rxnobuf++;
pdcs              832 drivers/mailbox/bcm-pdc-mailbox.c 	vaddr = dma_pool_zalloc(pdcs->rx_buf_pool, GFP_ATOMIC, &daddr);
pdcs              841 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rx_msg_start = pdcs->rxout;
pdcs              842 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->tx_msg_start = pdcs->txout;
pdcs              846 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rx_ctx[pdcs->rx_msg_start].rxin_numd = 1;
pdcs              848 drivers/mailbox/bcm-pdc-mailbox.c 	if (unlikely(pdcs->rxout == (pdcs->nrxd - 1)))
pdcs              851 drivers/mailbox/bcm-pdc-mailbox.c 	rx_ctx = &pdcs->rx_ctx[pdcs->rxout];
pdcs              856 drivers/mailbox/bcm-pdc-mailbox.c 	pdc_build_rxd(pdcs, daddr, pdcs->pdc_resp_hdr_len, flags);
pdcs              874 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_rx_list_sg_add(struct pdc_state *pdcs, struct scatterlist *sg)
pdcs              890 drivers/mailbox/bcm-pdc-mailbox.c 	rx_avail = pdcs->nrxpost - NRXDACTIVE(pdcs->rxin, pdcs->rxout,
pdcs              891 drivers/mailbox/bcm-pdc-mailbox.c 					      pdcs->nrxpost);
pdcs              893 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->rxnobuf++;
pdcs              898 drivers/mailbox/bcm-pdc-mailbox.c 		if (unlikely(pdcs->rxout == (pdcs->nrxd - 1)))
pdcs              910 drivers/mailbox/bcm-pdc-mailbox.c 			pdc_build_rxd(pdcs, databufptr, PDC_DMA_BUF_MAX, flags);
pdcs              914 drivers/mailbox/bcm-pdc-mailbox.c 			if (unlikely(pdcs->rxout == (pdcs->nrxd - 1)))
pdcs              919 drivers/mailbox/bcm-pdc-mailbox.c 		pdc_build_rxd(pdcs, databufptr, bufcnt, flags);
pdcs              923 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rx_ctx[pdcs->rx_msg_start].rxin_numd += desc_w;
pdcs              943 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs = dev_get_drvdata(dev);
pdcs              944 drivers/mailbox/bcm-pdc-mailbox.c 	u32 intstatus = ioread32(pdcs->pdc_reg_vbase + PDC_INTSTATUS_OFFSET);
pdcs              950 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(0, pdcs->pdc_reg_vbase + PDC_INTMASK_OFFSET);
pdcs              953 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(intstatus, pdcs->pdc_reg_vbase + PDC_INTSTATUS_OFFSET);
pdcs              956 drivers/mailbox/bcm-pdc-mailbox.c 	tasklet_schedule(&pdcs->rx_tasklet);
pdcs              967 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs = (struct pdc_state *)data;
pdcs              969 drivers/mailbox/bcm-pdc-mailbox.c 	pdc_receive(pdcs);
pdcs              972 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(PDC_INTMASK, pdcs->pdc_reg_vbase + PDC_INTMASK_OFFSET);
pdcs              984 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_ring_init(struct pdc_state *pdcs, int ringset)
pdcs              989 drivers/mailbox/bcm-pdc-mailbox.c 	struct device *dev = &pdcs->pdev->dev;
pdcs              994 drivers/mailbox/bcm-pdc-mailbox.c 	tx.vbase = dma_pool_zalloc(pdcs->ring_pool, GFP_KERNEL, &tx.dmabase);
pdcs             1001 drivers/mailbox/bcm-pdc-mailbox.c 	rx.vbase = dma_pool_zalloc(pdcs->ring_pool, GFP_KERNEL, &rx.dmabase);
pdcs             1012 drivers/mailbox/bcm-pdc-mailbox.c 	memcpy(&pdcs->tx_ring_alloc, &tx, sizeof(tx));
pdcs             1013 drivers/mailbox/bcm-pdc-mailbox.c 	memcpy(&pdcs->rx_ring_alloc, &rx, sizeof(rx));
pdcs             1015 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rxin = 0;
pdcs             1016 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rx_msg_start = 0;
pdcs             1017 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->last_rx_curr = 0;
pdcs             1018 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rxout = 0;
pdcs             1019 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->txin = 0;
pdcs             1020 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->tx_msg_start = 0;
pdcs             1021 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->txout = 0;
pdcs             1024 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->txd_64 = (struct dma64dd *)pdcs->tx_ring_alloc.vbase;
pdcs             1025 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rxd_64 = (struct dma64dd *)pdcs->rx_ring_alloc.vbase;
pdcs             1028 drivers/mailbox/bcm-pdc-mailbox.c 	dma_reg = &pdcs->regs->dmaregs[ringset];
pdcs             1032 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32((PDC_RX_CTL + (pdcs->rx_status_len << 1)),
pdcs             1038 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(lower_32_bits(pdcs->tx_ring_alloc.dmabase),
pdcs             1040 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(upper_32_bits(pdcs->tx_ring_alloc.dmabase),
pdcs             1043 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(lower_32_bits(pdcs->rx_ring_alloc.dmabase),
pdcs             1045 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(upper_32_bits(pdcs->rx_ring_alloc.dmabase),
pdcs             1050 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32((PDC_RX_CTL | PDC_RX_ENABLE | (pdcs->rx_status_len << 1)),
pdcs             1056 drivers/mailbox/bcm-pdc-mailbox.c 		if (i != pdcs->ntxpost) {
pdcs             1058 drivers/mailbox/bcm-pdc-mailbox.c 				  &pdcs->txd_64[i].ctrl1);
pdcs             1062 drivers/mailbox/bcm-pdc-mailbox.c 				  D64_CTRL1_EOT, &pdcs->txd_64[i].ctrl1);
pdcs             1066 drivers/mailbox/bcm-pdc-mailbox.c 		if (i != pdcs->nrxpost) {
pdcs             1068 drivers/mailbox/bcm-pdc-mailbox.c 				  &pdcs->rxd_64[i].ctrl1);
pdcs             1072 drivers/mailbox/bcm-pdc-mailbox.c 				  &pdcs->rxd_64[i].ctrl1);
pdcs             1078 drivers/mailbox/bcm-pdc-mailbox.c 	dma_pool_free(pdcs->ring_pool, tx.vbase, tx.dmabase);
pdcs             1083 drivers/mailbox/bcm-pdc-mailbox.c static void pdc_ring_free(struct pdc_state *pdcs)
pdcs             1085 drivers/mailbox/bcm-pdc-mailbox.c 	if (pdcs->tx_ring_alloc.vbase) {
pdcs             1086 drivers/mailbox/bcm-pdc-mailbox.c 		dma_pool_free(pdcs->ring_pool, pdcs->tx_ring_alloc.vbase,
pdcs             1087 drivers/mailbox/bcm-pdc-mailbox.c 			      pdcs->tx_ring_alloc.dmabase);
pdcs             1088 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->tx_ring_alloc.vbase = NULL;
pdcs             1091 drivers/mailbox/bcm-pdc-mailbox.c 	if (pdcs->rx_ring_alloc.vbase) {
pdcs             1092 drivers/mailbox/bcm-pdc-mailbox.c 		dma_pool_free(pdcs->ring_pool, pdcs->rx_ring_alloc.vbase,
pdcs             1093 drivers/mailbox/bcm-pdc-mailbox.c 			      pdcs->rx_ring_alloc.dmabase);
pdcs             1094 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->rx_ring_alloc.vbase = NULL;
pdcs             1125 drivers/mailbox/bcm-pdc-mailbox.c static bool pdc_rings_full(struct pdc_state *pdcs, int tx_cnt, int rx_cnt)
pdcs             1132 drivers/mailbox/bcm-pdc-mailbox.c 	rx_avail = pdcs->nrxpost - NRXDACTIVE(pdcs->rxin, pdcs->rxout,
pdcs             1133 drivers/mailbox/bcm-pdc-mailbox.c 					      pdcs->nrxpost);
pdcs             1135 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->rx_ring_full++;
pdcs             1140 drivers/mailbox/bcm-pdc-mailbox.c 		tx_avail = pdcs->ntxpost - NTXDACTIVE(pdcs->txin, pdcs->txout,
pdcs             1141 drivers/mailbox/bcm-pdc-mailbox.c 						      pdcs->ntxpost);
pdcs             1143 drivers/mailbox/bcm-pdc-mailbox.c 			pdcs->tx_ring_full++;
pdcs             1159 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs = chan->con_priv;
pdcs             1162 drivers/mailbox/bcm-pdc-mailbox.c 	if (unlikely(pdc_rings_full(pdcs, PDC_RING_SPACE_MIN,
pdcs             1164 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->last_tx_not_done++;
pdcs             1196 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs = chan->con_priv;
pdcs             1197 drivers/mailbox/bcm-pdc-mailbox.c 	struct device *dev = &pdcs->pdev->dev;
pdcs             1238 drivers/mailbox/bcm-pdc-mailbox.c 	if (unlikely(pdc_rings_full(pdcs, tx_desc_req, rx_desc_req + 1)))
pdcs             1242 drivers/mailbox/bcm-pdc-mailbox.c 	err = pdc_rx_list_init(pdcs, mssg->spu.dst, mssg->ctx);
pdcs             1243 drivers/mailbox/bcm-pdc-mailbox.c 	err |= pdc_rx_list_sg_add(pdcs, mssg->spu.dst);
pdcs             1246 drivers/mailbox/bcm-pdc-mailbox.c 	err |= pdc_tx_list_sg_add(pdcs, mssg->spu.src);
pdcs             1247 drivers/mailbox/bcm-pdc-mailbox.c 	err |= pdc_tx_list_final(pdcs);	/* initiate transfer */
pdcs             1250 drivers/mailbox/bcm-pdc-mailbox.c 		dev_err(&pdcs->pdev->dev,
pdcs             1263 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs = chan->con_priv;
pdcs             1265 drivers/mailbox/bcm-pdc-mailbox.c 	if (!pdcs)
pdcs             1268 drivers/mailbox/bcm-pdc-mailbox.c 	dev_dbg(&pdcs->pdev->dev,
pdcs             1269 drivers/mailbox/bcm-pdc-mailbox.c 		"Shutdown mailbox channel for PDC %u", pdcs->pdc_idx);
pdcs             1270 drivers/mailbox/bcm-pdc-mailbox.c 	pdc_ring_free(pdcs);
pdcs             1279 drivers/mailbox/bcm-pdc-mailbox.c void pdc_hw_init(struct pdc_state *pdcs)
pdcs             1286 drivers/mailbox/bcm-pdc-mailbox.c 	pdev = pdcs->pdev;
pdcs             1289 drivers/mailbox/bcm-pdc-mailbox.c 	dev_dbg(dev, "PDC %u initial values:", pdcs->pdc_idx);
pdcs             1291 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs);
pdcs             1293 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->pdc_reg_vbase);
pdcs             1296 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->regs = (struct pdc_regs *)pdcs->pdc_reg_vbase;
pdcs             1297 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->txregs_64 = (struct dma64_regs *)
pdcs             1298 drivers/mailbox/bcm-pdc-mailbox.c 	    (((u8 *)pdcs->pdc_reg_vbase) +
pdcs             1300 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rxregs_64 = (struct dma64_regs *)
pdcs             1301 drivers/mailbox/bcm-pdc-mailbox.c 	    (((u8 *)pdcs->pdc_reg_vbase) +
pdcs             1304 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->ntxd = PDC_RING_ENTRIES;
pdcs             1305 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->nrxd = PDC_RING_ENTRIES;
pdcs             1306 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->ntxpost = PDC_RING_ENTRIES - 1;
pdcs             1307 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->nrxpost = PDC_RING_ENTRIES - 1;
pdcs             1308 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(0, &pdcs->regs->intmask);
pdcs             1310 drivers/mailbox/bcm-pdc-mailbox.c 	dma_reg = &pdcs->regs->dmaregs[ringset];
pdcs             1315 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(PDC_RX_CTL + (pdcs->rx_status_len << 1),
pdcs             1322 drivers/mailbox/bcm-pdc-mailbox.c 	if (pdcs->pdc_resp_hdr_len == PDC_SPU2_RESP_HDR_LEN)
pdcs             1324 drivers/mailbox/bcm-pdc-mailbox.c 			  pdcs->pdc_reg_vbase + PDC_CKSUM_CTRL_OFFSET);
pdcs             1332 drivers/mailbox/bcm-pdc-mailbox.c static void pdc_hw_disable(struct pdc_state *pdcs)
pdcs             1336 drivers/mailbox/bcm-pdc-mailbox.c 	dma_reg = &pdcs->regs->dmaregs[PDC_RINGSET];
pdcs             1338 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(PDC_RX_CTL + (pdcs->rx_status_len << 1),
pdcs             1353 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_rx_buf_pool_create(struct pdc_state *pdcs)
pdcs             1358 drivers/mailbox/bcm-pdc-mailbox.c 	pdev = pdcs->pdev;
pdcs             1361 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->pdc_resp_hdr_len = pdcs->rx_status_len;
pdcs             1362 drivers/mailbox/bcm-pdc-mailbox.c 	if (pdcs->use_bcm_hdr)
pdcs             1363 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->pdc_resp_hdr_len += BCM_HDR_LEN;
pdcs             1365 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->rx_buf_pool = dma_pool_create("pdc rx bufs", dev,
pdcs             1366 drivers/mailbox/bcm-pdc-mailbox.c 					    pdcs->pdc_resp_hdr_len,
pdcs             1368 drivers/mailbox/bcm-pdc-mailbox.c 	if (!pdcs->rx_buf_pool)
pdcs             1386 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_interrupts_init(struct pdc_state *pdcs)
pdcs             1388 drivers/mailbox/bcm-pdc-mailbox.c 	struct platform_device *pdev = pdcs->pdev;
pdcs             1394 drivers/mailbox/bcm-pdc-mailbox.c 	iowrite32(PDC_INTMASK, pdcs->pdc_reg_vbase + PDC_INTMASK_OFFSET);
pdcs             1396 drivers/mailbox/bcm-pdc-mailbox.c 	if (pdcs->hw_type == FA_HW)
pdcs             1397 drivers/mailbox/bcm-pdc-mailbox.c 		iowrite32(PDC_LAZY_INT, pdcs->pdc_reg_vbase +
pdcs             1400 drivers/mailbox/bcm-pdc-mailbox.c 		iowrite32(PDC_LAZY_INT, pdcs->pdc_reg_vbase +
pdcs             1404 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->pdc_irq = irq_of_parse_and_map(dn, 0);
pdcs             1406 drivers/mailbox/bcm-pdc-mailbox.c 		dev_name(dev), pdcs->pdc_irq, pdcs);
pdcs             1408 drivers/mailbox/bcm-pdc-mailbox.c 	err = devm_request_irq(dev, pdcs->pdc_irq, pdc_irq_handler, 0,
pdcs             1412 drivers/mailbox/bcm-pdc-mailbox.c 			pdcs->pdc_irq, err);
pdcs             1437 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_mb_init(struct pdc_state *pdcs)
pdcs             1439 drivers/mailbox/bcm-pdc-mailbox.c 	struct device *dev = &pdcs->pdev->dev;
pdcs             1444 drivers/mailbox/bcm-pdc-mailbox.c 	mbc = &pdcs->mbc;
pdcs             1457 drivers/mailbox/bcm-pdc-mailbox.c 		mbc->chans[chan_index].con_priv = pdcs;
pdcs             1493 drivers/mailbox/bcm-pdc-mailbox.c static int pdc_dt_read(struct platform_device *pdev, struct pdc_state *pdcs)
pdcs             1502 drivers/mailbox/bcm-pdc-mailbox.c 				   &pdcs->rx_status_len);
pdcs             1508 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->use_bcm_hdr = of_property_read_bool(dn, "brcm,use-bcm-hdr");
pdcs             1510 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->hw_type = PDC_HW;
pdcs             1515 drivers/mailbox/bcm-pdc-mailbox.c 		pdcs->hw_type = *hw_type;
pdcs             1537 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs;
pdcs             1540 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs = devm_kzalloc(dev, sizeof(*pdcs), GFP_KERNEL);
pdcs             1541 drivers/mailbox/bcm-pdc-mailbox.c 	if (!pdcs) {
pdcs             1546 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->pdev = pdev;
pdcs             1547 drivers/mailbox/bcm-pdc-mailbox.c 	platform_set_drvdata(pdev, pdcs);
pdcs             1548 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->pdc_idx = pdcg.num_spu;
pdcs             1558 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->ring_pool = dma_pool_create("pdc rings", dev, PDC_RING_SIZE,
pdcs             1560 drivers/mailbox/bcm-pdc-mailbox.c 	if (!pdcs->ring_pool) {
pdcs             1565 drivers/mailbox/bcm-pdc-mailbox.c 	err = pdc_dt_read(pdev, pdcs);
pdcs             1577 drivers/mailbox/bcm-pdc-mailbox.c 	pdcs->pdc_reg_vbase = devm_ioremap_resource(&pdev->dev, pdc_regs);
pdcs             1578 drivers/mailbox/bcm-pdc-mailbox.c 	if (IS_ERR(pdcs->pdc_reg_vbase)) {
pdcs             1579 drivers/mailbox/bcm-pdc-mailbox.c 		err = PTR_ERR(pdcs->pdc_reg_vbase);
pdcs             1585 drivers/mailbox/bcm-pdc-mailbox.c 	err = pdc_rx_buf_pool_create(pdcs);
pdcs             1589 drivers/mailbox/bcm-pdc-mailbox.c 	pdc_hw_init(pdcs);
pdcs             1592 drivers/mailbox/bcm-pdc-mailbox.c 	tasklet_init(&pdcs->rx_tasklet, pdc_tasklet_cb, (unsigned long)pdcs);
pdcs             1594 drivers/mailbox/bcm-pdc-mailbox.c 	err = pdc_interrupts_init(pdcs);
pdcs             1599 drivers/mailbox/bcm-pdc-mailbox.c 	err = pdc_mb_init(pdcs);
pdcs             1603 drivers/mailbox/bcm-pdc-mailbox.c 	pdc_setup_debugfs(pdcs);
pdcs             1609 drivers/mailbox/bcm-pdc-mailbox.c 	tasklet_kill(&pdcs->rx_tasklet);
pdcs             1610 drivers/mailbox/bcm-pdc-mailbox.c 	dma_pool_destroy(pdcs->rx_buf_pool);
pdcs             1613 drivers/mailbox/bcm-pdc-mailbox.c 	dma_pool_destroy(pdcs->ring_pool);
pdcs             1621 drivers/mailbox/bcm-pdc-mailbox.c 	struct pdc_state *pdcs = platform_get_drvdata(pdev);
pdcs             1625 drivers/mailbox/bcm-pdc-mailbox.c 	tasklet_kill(&pdcs->rx_tasklet);
pdcs             1627 drivers/mailbox/bcm-pdc-mailbox.c 	pdc_hw_disable(pdcs);
pdcs             1629 drivers/mailbox/bcm-pdc-mailbox.c 	dma_pool_destroy(pdcs->rx_buf_pool);
pdcs             1630 drivers/mailbox/bcm-pdc-mailbox.c 	dma_pool_destroy(pdcs->ring_pool);