void msm_qdss_csr_disable_flush(void) { struct csr_drvdata *drvdata = csrdrvdata; uint32_t usbflshctrl; CSR_UNLOCK(drvdata); usbflshctrl = csr_readl(drvdata, CSR_USBFLSHCTRL); usbflshctrl &= ~0x2; csr_writel(drvdata, usbflshctrl, CSR_USBFLSHCTRL); CSR_LOCK(drvdata); }
void msm_qdss_csr_disable_bam_to_usb(void) { struct csr_drvdata *drvdata = csrdrvdata; uint32_t usbbamctrl; CSR_UNLOCK(drvdata); usbbamctrl = csr_readl(drvdata, CSR_USBBAMCTRL); usbbamctrl &= (~0x4); csr_writel(drvdata, usbbamctrl, CSR_USBBAMCTRL); CSR_LOCK(drvdata); }
void coresight_csr_set_byte_cntr(uint32_t count) { struct csr_drvdata *drvdata = csrdrvdata; CSR_UNLOCK(drvdata); csr_writel(drvdata, count, CSR_BYTECNTVAL); /* make sure byte count value is written */ mb(); CSR_LOCK(drvdata); }
void msm_qdss_csr_enable_bam_to_usb(void) { struct csr_drvdata *drvdata = csrdrvdata; uint32_t usbbamctrl, usbflshctrl; CSR_UNLOCK(drvdata); usbbamctrl = csr_readl(drvdata, CSR_USBBAMCTRL); usbbamctrl = (usbbamctrl & ~0x3) | drvdata->blksize; csr_writel(drvdata, usbbamctrl, CSR_USBBAMCTRL); usbflshctrl = csr_readl(drvdata, CSR_USBFLSHCTRL); usbflshctrl = (usbflshctrl & ~0x3FFFC) | (0x1000 << 2); csr_writel(drvdata, usbflshctrl, CSR_USBFLSHCTRL); usbflshctrl |= 0x2; csr_writel(drvdata, usbflshctrl, CSR_USBFLSHCTRL); usbbamctrl |= 0x4; csr_writel(drvdata, usbbamctrl, CSR_USBBAMCTRL); CSR_LOCK(drvdata); }
int coresight_csr_hwctrl_set(phys_addr_t addr, uint32_t val) { struct csr_drvdata *drvdata = csrdrvdata; int ret = 0; CSR_UNLOCK(drvdata); if (addr == (drvdata->pbase + CSR_STMEXTHWCTRL0)) csr_writel(drvdata, val, CSR_STMEXTHWCTRL0); else if (addr == (drvdata->pbase + CSR_STMEXTHWCTRL1)) csr_writel(drvdata, val, CSR_STMEXTHWCTRL1); else if (addr == (drvdata->pbase + CSR_STMEXTHWCTRL2)) csr_writel(drvdata, val, CSR_STMEXTHWCTRL2); else if (addr == (drvdata->pbase + CSR_STMEXTHWCTRL3)) csr_writel(drvdata, val, CSR_STMEXTHWCTRL3); else ret = -EINVAL; CSR_LOCK(drvdata); return ret; }