mcbsp             282 sound/soc/ti/omap-mcbsp-priv.h static inline void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
mcbsp             284 sound/soc/ti/omap-mcbsp-priv.h 	void __iomem *addr = mcbsp->io_base + reg * mcbsp->pdata->reg_step;
mcbsp             286 sound/soc/ti/omap-mcbsp-priv.h 	if (mcbsp->pdata->reg_size == 2) {
mcbsp             287 sound/soc/ti/omap-mcbsp-priv.h 		((u16 *)mcbsp->reg_cache)[reg] = (u16)val;
mcbsp             290 sound/soc/ti/omap-mcbsp-priv.h 		((u32 *)mcbsp->reg_cache)[reg] = val;
mcbsp             295 sound/soc/ti/omap-mcbsp-priv.h static inline int omap_mcbsp_read(struct omap_mcbsp *mcbsp, u16 reg,
mcbsp             298 sound/soc/ti/omap-mcbsp-priv.h 	void __iomem *addr = mcbsp->io_base + reg * mcbsp->pdata->reg_step;
mcbsp             300 sound/soc/ti/omap-mcbsp-priv.h 	if (mcbsp->pdata->reg_size == 2) {
mcbsp             302 sound/soc/ti/omap-mcbsp-priv.h 				     ((u16 *)mcbsp->reg_cache)[reg];
mcbsp             305 sound/soc/ti/omap-mcbsp-priv.h 				     ((u32 *)mcbsp->reg_cache)[reg];
mcbsp             309 sound/soc/ti/omap-mcbsp-priv.h #define MCBSP_READ(mcbsp, reg) \
mcbsp             310 sound/soc/ti/omap-mcbsp-priv.h 		omap_mcbsp_read(mcbsp, OMAP_MCBSP_REG_##reg, 0)
mcbsp             311 sound/soc/ti/omap-mcbsp-priv.h #define MCBSP_WRITE(mcbsp, reg, val) \
mcbsp             312 sound/soc/ti/omap-mcbsp-priv.h 		omap_mcbsp_write(mcbsp, OMAP_MCBSP_REG_##reg, val)
mcbsp             313 sound/soc/ti/omap-mcbsp-priv.h #define MCBSP_READ_CACHE(mcbsp, reg) \
mcbsp             314 sound/soc/ti/omap-mcbsp-priv.h 		omap_mcbsp_read(mcbsp, OMAP_MCBSP_REG_##reg, 1)
mcbsp             321 sound/soc/ti/omap-mcbsp-priv.h int omap_mcbsp_st_start(struct omap_mcbsp *mcbsp);
mcbsp             322 sound/soc/ti/omap-mcbsp-priv.h int omap_mcbsp_st_stop(struct omap_mcbsp *mcbsp);
mcbsp              65 sound/soc/ti/omap-mcbsp-st.c static void omap_mcbsp_st_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
mcbsp              67 sound/soc/ti/omap-mcbsp-st.c 	writel_relaxed(val, mcbsp->st_data->io_base_st + reg);
mcbsp              70 sound/soc/ti/omap-mcbsp-st.c static int omap_mcbsp_st_read(struct omap_mcbsp *mcbsp, u16 reg)
mcbsp              72 sound/soc/ti/omap-mcbsp-st.c 	return readl_relaxed(mcbsp->st_data->io_base_st + reg);
mcbsp              75 sound/soc/ti/omap-mcbsp-st.c #define MCBSP_ST_READ(mcbsp, reg) omap_mcbsp_st_read(mcbsp, OMAP_ST_REG_##reg)
mcbsp              76 sound/soc/ti/omap-mcbsp-st.c #define MCBSP_ST_WRITE(mcbsp, reg, val) \
mcbsp              77 sound/soc/ti/omap-mcbsp-st.c 			omap_mcbsp_st_write(mcbsp, OMAP_ST_REG_##reg, val)
mcbsp              79 sound/soc/ti/omap-mcbsp-st.c static void omap_mcbsp_st_on(struct omap_mcbsp *mcbsp)
mcbsp              83 sound/soc/ti/omap-mcbsp-st.c 	if (mcbsp->pdata->force_ick_on)
mcbsp              84 sound/soc/ti/omap-mcbsp-st.c 		mcbsp->pdata->force_ick_on(mcbsp->st_data->mcbsp_iclk, true);
mcbsp              87 sound/soc/ti/omap-mcbsp-st.c 	w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
mcbsp              88 sound/soc/ti/omap-mcbsp-st.c 	MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w & ~(ST_AUTOIDLE));
mcbsp              91 sound/soc/ti/omap-mcbsp-st.c 	w = MCBSP_READ(mcbsp, SSELCR);
mcbsp              92 sound/soc/ti/omap-mcbsp-st.c 	MCBSP_WRITE(mcbsp, SSELCR, w | SIDETONEEN);
mcbsp              95 sound/soc/ti/omap-mcbsp-st.c 	w = MCBSP_ST_READ(mcbsp, SSELCR);
mcbsp              96 sound/soc/ti/omap-mcbsp-st.c 	MCBSP_ST_WRITE(mcbsp, SSELCR, w | ST_SIDETONEEN);
mcbsp              99 sound/soc/ti/omap-mcbsp-st.c static void omap_mcbsp_st_off(struct omap_mcbsp *mcbsp)
mcbsp             103 sound/soc/ti/omap-mcbsp-st.c 	w = MCBSP_ST_READ(mcbsp, SSELCR);
mcbsp             104 sound/soc/ti/omap-mcbsp-st.c 	MCBSP_ST_WRITE(mcbsp, SSELCR, w & ~(ST_SIDETONEEN));
mcbsp             106 sound/soc/ti/omap-mcbsp-st.c 	w = MCBSP_READ(mcbsp, SSELCR);
mcbsp             107 sound/soc/ti/omap-mcbsp-st.c 	MCBSP_WRITE(mcbsp, SSELCR, w & ~(SIDETONEEN));
mcbsp             110 sound/soc/ti/omap-mcbsp-st.c 	w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
mcbsp             111 sound/soc/ti/omap-mcbsp-st.c 	MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w | ST_AUTOIDLE);
mcbsp             113 sound/soc/ti/omap-mcbsp-st.c 	if (mcbsp->pdata->force_ick_on)
mcbsp             114 sound/soc/ti/omap-mcbsp-st.c 		mcbsp->pdata->force_ick_on(mcbsp->st_data->mcbsp_iclk, false);
mcbsp             117 sound/soc/ti/omap-mcbsp-st.c static void omap_mcbsp_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir)
mcbsp             121 sound/soc/ti/omap-mcbsp-st.c 	val = MCBSP_ST_READ(mcbsp, SSELCR);
mcbsp             124 sound/soc/ti/omap-mcbsp-st.c 		MCBSP_ST_WRITE(mcbsp, SSELCR, val & ~(ST_COEFFWREN));
mcbsp             126 sound/soc/ti/omap-mcbsp-st.c 	MCBSP_ST_WRITE(mcbsp, SSELCR, val | ST_COEFFWREN);
mcbsp             129 sound/soc/ti/omap-mcbsp-st.c 		MCBSP_ST_WRITE(mcbsp, SFIRCR, fir[i]);
mcbsp             133 sound/soc/ti/omap-mcbsp-st.c 	val = MCBSP_ST_READ(mcbsp, SSELCR);
mcbsp             135 sound/soc/ti/omap-mcbsp-st.c 		val = MCBSP_ST_READ(mcbsp, SSELCR);
mcbsp             137 sound/soc/ti/omap-mcbsp-st.c 	MCBSP_ST_WRITE(mcbsp, SSELCR, val & ~(ST_COEFFWREN));
mcbsp             140 sound/soc/ti/omap-mcbsp-st.c 		dev_err(mcbsp->dev, "McBSP FIR load error!\n");
mcbsp             143 sound/soc/ti/omap-mcbsp-st.c static void omap_mcbsp_st_chgain(struct omap_mcbsp *mcbsp)
mcbsp             146 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
mcbsp             148 sound/soc/ti/omap-mcbsp-st.c 	w = MCBSP_ST_READ(mcbsp, SSELCR);
mcbsp             150 sound/soc/ti/omap-mcbsp-st.c 	MCBSP_ST_WRITE(mcbsp, SGAINCR, ST_CH0GAIN(st_data->ch0gain) |
mcbsp             154 sound/soc/ti/omap-mcbsp-st.c static int omap_mcbsp_st_set_chgain(struct omap_mcbsp *mcbsp, int channel,
mcbsp             157 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
mcbsp             163 sound/soc/ti/omap-mcbsp-st.c 	spin_lock_irq(&mcbsp->lock);
mcbsp             172 sound/soc/ti/omap-mcbsp-st.c 		omap_mcbsp_st_chgain(mcbsp);
mcbsp             173 sound/soc/ti/omap-mcbsp-st.c 	spin_unlock_irq(&mcbsp->lock);
mcbsp             178 sound/soc/ti/omap-mcbsp-st.c static int omap_mcbsp_st_get_chgain(struct omap_mcbsp *mcbsp, int channel,
mcbsp             181 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
mcbsp             187 sound/soc/ti/omap-mcbsp-st.c 	spin_lock_irq(&mcbsp->lock);
mcbsp             194 sound/soc/ti/omap-mcbsp-st.c 	spin_unlock_irq(&mcbsp->lock);
mcbsp             199 sound/soc/ti/omap-mcbsp-st.c static int omap_mcbsp_st_enable(struct omap_mcbsp *mcbsp)
mcbsp             201 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
mcbsp             206 sound/soc/ti/omap-mcbsp-st.c 	spin_lock_irq(&mcbsp->lock);
mcbsp             208 sound/soc/ti/omap-mcbsp-st.c 	omap_mcbsp_st_start(mcbsp);
mcbsp             209 sound/soc/ti/omap-mcbsp-st.c 	spin_unlock_irq(&mcbsp->lock);
mcbsp             214 sound/soc/ti/omap-mcbsp-st.c static int omap_mcbsp_st_disable(struct omap_mcbsp *mcbsp)
mcbsp             216 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
mcbsp             222 sound/soc/ti/omap-mcbsp-st.c 	spin_lock_irq(&mcbsp->lock);
mcbsp             223 sound/soc/ti/omap-mcbsp-st.c 	omap_mcbsp_st_stop(mcbsp);
mcbsp             225 sound/soc/ti/omap-mcbsp-st.c 	spin_unlock_irq(&mcbsp->lock);
mcbsp             230 sound/soc/ti/omap-mcbsp-st.c static int omap_mcbsp_st_is_enabled(struct omap_mcbsp *mcbsp)
mcbsp             232 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
mcbsp             243 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp *mcbsp = dev_get_drvdata(dev);
mcbsp             244 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
mcbsp             248 sound/soc/ti/omap-mcbsp-st.c 	spin_lock_irq(&mcbsp->lock);
mcbsp             254 sound/soc/ti/omap-mcbsp-st.c 	spin_unlock_irq(&mcbsp->lock);
mcbsp             263 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp *mcbsp = dev_get_drvdata(dev);
mcbsp             264 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
mcbsp             267 sound/soc/ti/omap-mcbsp-st.c 	spin_lock_irq(&mcbsp->lock);
mcbsp             291 sound/soc/ti/omap-mcbsp-st.c 	spin_unlock_irq(&mcbsp->lock);
mcbsp             307 sound/soc/ti/omap-mcbsp-st.c int omap_mcbsp_st_start(struct omap_mcbsp *mcbsp)
mcbsp             309 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
mcbsp             312 sound/soc/ti/omap-mcbsp-st.c 		omap_mcbsp_st_fir_write(mcbsp, st_data->taps);
mcbsp             313 sound/soc/ti/omap-mcbsp-st.c 		omap_mcbsp_st_chgain(mcbsp);
mcbsp             315 sound/soc/ti/omap-mcbsp-st.c 		if (!mcbsp->free) {
mcbsp             316 sound/soc/ti/omap-mcbsp-st.c 			omap_mcbsp_st_on(mcbsp);
mcbsp             324 sound/soc/ti/omap-mcbsp-st.c int omap_mcbsp_st_stop(struct omap_mcbsp *mcbsp)
mcbsp             326 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
mcbsp             329 sound/soc/ti/omap-mcbsp-st.c 		if (!mcbsp->free) {
mcbsp             330 sound/soc/ti/omap-mcbsp-st.c 			omap_mcbsp_st_off(mcbsp);
mcbsp             340 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
mcbsp             349 sound/soc/ti/omap-mcbsp-st.c 	st_data = devm_kzalloc(mcbsp->dev, sizeof(*mcbsp->st_data), GFP_KERNEL);
mcbsp             353 sound/soc/ti/omap-mcbsp-st.c 	st_data->mcbsp_iclk = clk_get(mcbsp->dev, "ick");
mcbsp             355 sound/soc/ti/omap-mcbsp-st.c 		dev_warn(mcbsp->dev,
mcbsp             360 sound/soc/ti/omap-mcbsp-st.c 	st_data->io_base_st = devm_ioremap(mcbsp->dev, res->start,
mcbsp             365 sound/soc/ti/omap-mcbsp-st.c 	ret = sysfs_create_group(&mcbsp->dev->kobj, &sidetone_attr_group);
mcbsp             369 sound/soc/ti/omap-mcbsp-st.c 	mcbsp->st_data = st_data;
mcbsp             376 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
mcbsp             378 sound/soc/ti/omap-mcbsp-st.c 	if (mcbsp->st_data) {
mcbsp             379 sound/soc/ti/omap-mcbsp-st.c 		sysfs_remove_group(&mcbsp->dev->kobj, &sidetone_attr_group);
mcbsp             380 sound/soc/ti/omap-mcbsp-st.c 		clk_put(mcbsp->st_data->mcbsp_iclk);
mcbsp             405 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);	\
mcbsp             416 sound/soc/ti/omap-mcbsp-st.c 	return omap_mcbsp_st_set_chgain(mcbsp, channel, val);		\
mcbsp             424 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);	\
mcbsp             427 sound/soc/ti/omap-mcbsp-st.c 	if (omap_mcbsp_st_get_chgain(mcbsp, channel, &chgain))		\
mcbsp             441 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp             444 sound/soc/ti/omap-mcbsp-st.c 	if (value == omap_mcbsp_st_is_enabled(mcbsp))
mcbsp             448 sound/soc/ti/omap-mcbsp-st.c 		omap_mcbsp_st_enable(mcbsp);
mcbsp             450 sound/soc/ti/omap-mcbsp-st.c 		omap_mcbsp_st_disable(mcbsp);
mcbsp             459 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp             461 sound/soc/ti/omap-mcbsp-st.c 	ucontrol->value.integer.value[0] = omap_mcbsp_st_is_enabled(mcbsp);
mcbsp             493 sound/soc/ti/omap-mcbsp-st.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp             495 sound/soc/ti/omap-mcbsp-st.c 	if (!mcbsp->st_data) {
mcbsp             496 sound/soc/ti/omap-mcbsp-st.c 		dev_warn(mcbsp->dev, "No sidetone data for port\n");
mcbsp             510 sound/soc/ti/omap-mcbsp-st.c 		dev_err(mcbsp->dev, "Port %d not supported\n", port_id);
mcbsp              39 sound/soc/ti/omap-mcbsp.c static void omap_mcbsp_dump_reg(struct omap_mcbsp *mcbsp)
mcbsp              41 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "**** McBSP%d regs ****\n", mcbsp->id);
mcbsp              42 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "DRR2:  0x%04x\n", MCBSP_READ(mcbsp, DRR2));
mcbsp              43 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "DRR1:  0x%04x\n", MCBSP_READ(mcbsp, DRR1));
mcbsp              44 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "DXR2:  0x%04x\n", MCBSP_READ(mcbsp, DXR2));
mcbsp              45 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "DXR1:  0x%04x\n", MCBSP_READ(mcbsp, DXR1));
mcbsp              46 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "SPCR2: 0x%04x\n", MCBSP_READ(mcbsp, SPCR2));
mcbsp              47 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "SPCR1: 0x%04x\n", MCBSP_READ(mcbsp, SPCR1));
mcbsp              48 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "RCR2:  0x%04x\n", MCBSP_READ(mcbsp, RCR2));
mcbsp              49 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "RCR1:  0x%04x\n", MCBSP_READ(mcbsp, RCR1));
mcbsp              50 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "XCR2:  0x%04x\n", MCBSP_READ(mcbsp, XCR2));
mcbsp              51 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "XCR1:  0x%04x\n", MCBSP_READ(mcbsp, XCR1));
mcbsp              52 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "SRGR2: 0x%04x\n", MCBSP_READ(mcbsp, SRGR2));
mcbsp              53 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "SRGR1: 0x%04x\n", MCBSP_READ(mcbsp, SRGR1));
mcbsp              54 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "PCR0:  0x%04x\n", MCBSP_READ(mcbsp, PCR0));
mcbsp              55 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "***********************\n");
mcbsp              58 sound/soc/ti/omap-mcbsp.c static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id)
mcbsp              71 sound/soc/ti/omap-mcbsp.c 	fck_src = clk_get(mcbsp->dev, src);
mcbsp              73 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "CLKS: could not clk_get() %s\n", src);
mcbsp              77 sound/soc/ti/omap-mcbsp.c 	pm_runtime_put_sync(mcbsp->dev);
mcbsp              79 sound/soc/ti/omap-mcbsp.c 	r = clk_set_parent(mcbsp->fclk, fck_src);
mcbsp              81 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "CLKS: could not clk_set_parent() to %s\n",
mcbsp              87 sound/soc/ti/omap-mcbsp.c 	pm_runtime_get_sync(mcbsp->dev);
mcbsp              96 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = data;
mcbsp              99 sound/soc/ti/omap-mcbsp.c 	irqst = MCBSP_READ(mcbsp, IRQST);
mcbsp             100 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "IRQ callback : 0x%x\n", irqst);
mcbsp             103 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "RX Frame Sync Error!\n");
mcbsp             105 sound/soc/ti/omap-mcbsp.c 		dev_dbg(mcbsp->dev, "RX Frame Sync\n");
mcbsp             107 sound/soc/ti/omap-mcbsp.c 		dev_dbg(mcbsp->dev, "RX End Of Frame\n");
mcbsp             109 sound/soc/ti/omap-mcbsp.c 		dev_dbg(mcbsp->dev, "RX Buffer Threshold Reached\n");
mcbsp             111 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "RX Buffer Underflow!\n");
mcbsp             113 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "RX Buffer Overflow!\n");
mcbsp             116 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "TX Frame Sync Error!\n");
mcbsp             118 sound/soc/ti/omap-mcbsp.c 		dev_dbg(mcbsp->dev, "TX Frame Sync\n");
mcbsp             120 sound/soc/ti/omap-mcbsp.c 		dev_dbg(mcbsp->dev, "TX End Of Frame\n");
mcbsp             122 sound/soc/ti/omap-mcbsp.c 		dev_dbg(mcbsp->dev, "TX Buffer threshold Reached\n");
mcbsp             124 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "TX Buffer Underflow!\n");
mcbsp             126 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "TX Buffer Overflow!\n");
mcbsp             128 sound/soc/ti/omap-mcbsp.c 		dev_dbg(mcbsp->dev, "TX Buffer empty at end of frame\n");
mcbsp             130 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, IRQST, irqst);
mcbsp             137 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = data;
mcbsp             140 sound/soc/ti/omap-mcbsp.c 	irqst_spcr2 = MCBSP_READ(mcbsp, SPCR2);
mcbsp             141 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "TX IRQ callback : 0x%x\n", irqst_spcr2);
mcbsp             144 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "TX Frame Sync Error! : 0x%x\n",
mcbsp             147 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, SPCR2, MCBSP_READ_CACHE(mcbsp, SPCR2));
mcbsp             155 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = data;
mcbsp             158 sound/soc/ti/omap-mcbsp.c 	irqst_spcr1 = MCBSP_READ(mcbsp, SPCR1);
mcbsp             159 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "RX IRQ callback : 0x%x\n", irqst_spcr1);
mcbsp             162 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "RX Frame Sync Error! : 0x%x\n",
mcbsp             165 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, SPCR1, MCBSP_READ_CACHE(mcbsp, SPCR1));
mcbsp             177 sound/soc/ti/omap-mcbsp.c static void omap_mcbsp_config(struct omap_mcbsp *mcbsp,
mcbsp             180 sound/soc/ti/omap-mcbsp.c 	dev_dbg(mcbsp->dev, "Configuring McBSP%d  phys_base: 0x%08lx\n",
mcbsp             181 sound/soc/ti/omap-mcbsp.c 		mcbsp->id, mcbsp->phys_base);
mcbsp             184 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, SPCR2, config->spcr2);
mcbsp             185 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, SPCR1, config->spcr1);
mcbsp             186 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, RCR2, config->rcr2);
mcbsp             187 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, RCR1, config->rcr1);
mcbsp             188 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, XCR2, config->xcr2);
mcbsp             189 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, XCR1, config->xcr1);
mcbsp             190 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, SRGR2, config->srgr2);
mcbsp             191 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, SRGR1, config->srgr1);
mcbsp             192 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, MCR2, config->mcr2);
mcbsp             193 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, MCR1, config->mcr1);
mcbsp             194 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, PCR0, config->pcr0);
mcbsp             195 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->has_ccr) {
mcbsp             196 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, XCCR, config->xccr);
mcbsp             197 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, RCCR, config->rccr);
mcbsp             200 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->has_wakeup)
mcbsp             201 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, WAKEUPEN, XRDYEN | RRDYEN);
mcbsp             204 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->irq)
mcbsp             205 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, IRQEN, RSYNCERREN | XSYNCERREN |
mcbsp             217 sound/soc/ti/omap-mcbsp.c static int omap_mcbsp_dma_reg_params(struct omap_mcbsp *mcbsp,
mcbsp             223 sound/soc/ti/omap-mcbsp.c 		if (mcbsp->pdata->reg_size == 2)
mcbsp             228 sound/soc/ti/omap-mcbsp.c 		if (mcbsp->pdata->reg_size == 2)
mcbsp             234 sound/soc/ti/omap-mcbsp.c 	return mcbsp->phys_dma_base + data_reg * mcbsp->pdata->reg_step;
mcbsp             242 sound/soc/ti/omap-mcbsp.c static void omap_mcbsp_set_tx_threshold(struct omap_mcbsp *mcbsp, u16 threshold)
mcbsp             244 sound/soc/ti/omap-mcbsp.c 	if (threshold && threshold <= mcbsp->max_tx_thres)
mcbsp             245 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, THRSH2, threshold - 1);
mcbsp             253 sound/soc/ti/omap-mcbsp.c static void omap_mcbsp_set_rx_threshold(struct omap_mcbsp *mcbsp, u16 threshold)
mcbsp             255 sound/soc/ti/omap-mcbsp.c 	if (threshold && threshold <= mcbsp->max_rx_thres)
mcbsp             256 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, THRSH1, threshold - 1);
mcbsp             262 sound/soc/ti/omap-mcbsp.c static u16 omap_mcbsp_get_tx_delay(struct omap_mcbsp *mcbsp)
mcbsp             267 sound/soc/ti/omap-mcbsp.c 	buffstat = MCBSP_READ(mcbsp, XBUFFSTAT);
mcbsp             270 sound/soc/ti/omap-mcbsp.c 	return mcbsp->pdata->buffer_size - buffstat;
mcbsp             277 sound/soc/ti/omap-mcbsp.c static u16 omap_mcbsp_get_rx_delay(struct omap_mcbsp *mcbsp)
mcbsp             282 sound/soc/ti/omap-mcbsp.c 	buffstat = MCBSP_READ(mcbsp, RBUFFSTAT);
mcbsp             284 sound/soc/ti/omap-mcbsp.c 	threshold = MCBSP_READ(mcbsp, THRSH1);
mcbsp             293 sound/soc/ti/omap-mcbsp.c static int omap_mcbsp_request(struct omap_mcbsp *mcbsp)
mcbsp             298 sound/soc/ti/omap-mcbsp.c 	reg_cache = kzalloc(mcbsp->reg_cache_size, GFP_KERNEL);
mcbsp             302 sound/soc/ti/omap-mcbsp.c 	spin_lock(&mcbsp->lock);
mcbsp             303 sound/soc/ti/omap-mcbsp.c 	if (!mcbsp->free) {
mcbsp             304 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "McBSP%d is currently in use\n", mcbsp->id);
mcbsp             309 sound/soc/ti/omap-mcbsp.c 	mcbsp->free = false;
mcbsp             310 sound/soc/ti/omap-mcbsp.c 	mcbsp->reg_cache = reg_cache;
mcbsp             311 sound/soc/ti/omap-mcbsp.c 	spin_unlock(&mcbsp->lock);
mcbsp             313 sound/soc/ti/omap-mcbsp.c 	if(mcbsp->pdata->ops && mcbsp->pdata->ops->request)
mcbsp             314 sound/soc/ti/omap-mcbsp.c 		mcbsp->pdata->ops->request(mcbsp->id - 1);
mcbsp             320 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, SPCR1, 0);
mcbsp             321 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, SPCR2, 0);
mcbsp             323 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->irq) {
mcbsp             324 sound/soc/ti/omap-mcbsp.c 		err = request_irq(mcbsp->irq, omap_mcbsp_irq_handler, 0,
mcbsp             325 sound/soc/ti/omap-mcbsp.c 				  "McBSP", (void *)mcbsp);
mcbsp             327 sound/soc/ti/omap-mcbsp.c 			dev_err(mcbsp->dev, "Unable to request IRQ\n");
mcbsp             331 sound/soc/ti/omap-mcbsp.c 		err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler, 0,
mcbsp             332 sound/soc/ti/omap-mcbsp.c 				  "McBSP TX", (void *)mcbsp);
mcbsp             334 sound/soc/ti/omap-mcbsp.c 			dev_err(mcbsp->dev, "Unable to request TX IRQ\n");
mcbsp             338 sound/soc/ti/omap-mcbsp.c 		err = request_irq(mcbsp->rx_irq, omap_mcbsp_rx_irq_handler, 0,
mcbsp             339 sound/soc/ti/omap-mcbsp.c 				  "McBSP RX", (void *)mcbsp);
mcbsp             341 sound/soc/ti/omap-mcbsp.c 			dev_err(mcbsp->dev, "Unable to request RX IRQ\n");
mcbsp             348 sound/soc/ti/omap-mcbsp.c 	free_irq(mcbsp->tx_irq, (void *)mcbsp);
mcbsp             350 sound/soc/ti/omap-mcbsp.c 	if(mcbsp->pdata->ops && mcbsp->pdata->ops->free)
mcbsp             351 sound/soc/ti/omap-mcbsp.c 		mcbsp->pdata->ops->free(mcbsp->id - 1);
mcbsp             354 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->has_wakeup)
mcbsp             355 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, WAKEUPEN, 0);
mcbsp             357 sound/soc/ti/omap-mcbsp.c 	spin_lock(&mcbsp->lock);
mcbsp             358 sound/soc/ti/omap-mcbsp.c 	mcbsp->free = true;
mcbsp             359 sound/soc/ti/omap-mcbsp.c 	mcbsp->reg_cache = NULL;
mcbsp             361 sound/soc/ti/omap-mcbsp.c 	spin_unlock(&mcbsp->lock);
mcbsp             367 sound/soc/ti/omap-mcbsp.c static void omap_mcbsp_free(struct omap_mcbsp *mcbsp)
mcbsp             371 sound/soc/ti/omap-mcbsp.c 	if(mcbsp->pdata->ops && mcbsp->pdata->ops->free)
mcbsp             372 sound/soc/ti/omap-mcbsp.c 		mcbsp->pdata->ops->free(mcbsp->id - 1);
mcbsp             375 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->has_wakeup)
mcbsp             376 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, WAKEUPEN, 0);
mcbsp             379 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->irq)
mcbsp             380 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, IRQEN, 0);
mcbsp             382 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->irq) {
mcbsp             383 sound/soc/ti/omap-mcbsp.c 		free_irq(mcbsp->irq, (void *)mcbsp);
mcbsp             385 sound/soc/ti/omap-mcbsp.c 		free_irq(mcbsp->rx_irq, (void *)mcbsp);
mcbsp             386 sound/soc/ti/omap-mcbsp.c 		free_irq(mcbsp->tx_irq, (void *)mcbsp);
mcbsp             389 sound/soc/ti/omap-mcbsp.c 	reg_cache = mcbsp->reg_cache;
mcbsp             399 sound/soc/ti/omap-mcbsp.c 		omap2_mcbsp_set_clks_src(mcbsp, MCBSP_CLKS_PRCM_SRC);
mcbsp             401 sound/soc/ti/omap-mcbsp.c 	spin_lock(&mcbsp->lock);
mcbsp             402 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->free)
mcbsp             403 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "McBSP%d was not reserved\n", mcbsp->id);
mcbsp             405 sound/soc/ti/omap-mcbsp.c 		mcbsp->free = true;
mcbsp             406 sound/soc/ti/omap-mcbsp.c 	mcbsp->reg_cache = NULL;
mcbsp             407 sound/soc/ti/omap-mcbsp.c 	spin_unlock(&mcbsp->lock);
mcbsp             417 sound/soc/ti/omap-mcbsp.c static void omap_mcbsp_start(struct omap_mcbsp *mcbsp, int stream)
mcbsp             424 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->st_data)
mcbsp             425 sound/soc/ti/omap-mcbsp.c 		omap_mcbsp_st_start(mcbsp);
mcbsp             428 sound/soc/ti/omap-mcbsp.c 	w = MCBSP_READ_CACHE(mcbsp, PCR0);
mcbsp             430 sound/soc/ti/omap-mcbsp.c 		enable_srg = !((MCBSP_READ_CACHE(mcbsp, SPCR2) |
mcbsp             431 sound/soc/ti/omap-mcbsp.c 				MCBSP_READ_CACHE(mcbsp, SPCR1)) & 1);
mcbsp             435 sound/soc/ti/omap-mcbsp.c 		w = MCBSP_READ_CACHE(mcbsp, SPCR2);
mcbsp             436 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 6));
mcbsp             441 sound/soc/ti/omap-mcbsp.c 	w = MCBSP_READ_CACHE(mcbsp, SPCR2);
mcbsp             442 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, SPCR2, w | tx);
mcbsp             445 sound/soc/ti/omap-mcbsp.c 	w = MCBSP_READ_CACHE(mcbsp, SPCR1);
mcbsp             446 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, SPCR1, w | rx);
mcbsp             458 sound/soc/ti/omap-mcbsp.c 		w = MCBSP_READ_CACHE(mcbsp, SPCR2);
mcbsp             459 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, SPCR2, w | (1 << 7));
mcbsp             462 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->has_ccr) {
mcbsp             464 sound/soc/ti/omap-mcbsp.c 		w = MCBSP_READ_CACHE(mcbsp, XCCR);
mcbsp             466 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, XCCR, w);
mcbsp             467 sound/soc/ti/omap-mcbsp.c 		w = MCBSP_READ_CACHE(mcbsp, RCCR);
mcbsp             469 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, RCCR, w);
mcbsp             473 sound/soc/ti/omap-mcbsp.c 	omap_mcbsp_dump_reg(mcbsp);
mcbsp             476 sound/soc/ti/omap-mcbsp.c static void omap_mcbsp_stop(struct omap_mcbsp *mcbsp, int stream)
mcbsp             485 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->has_ccr) {
mcbsp             486 sound/soc/ti/omap-mcbsp.c 		w = MCBSP_READ_CACHE(mcbsp, XCCR);
mcbsp             488 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, XCCR, w);
mcbsp             490 sound/soc/ti/omap-mcbsp.c 	w = MCBSP_READ_CACHE(mcbsp, SPCR2);
mcbsp             491 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, SPCR2, w & ~tx);
mcbsp             495 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->has_ccr) {
mcbsp             496 sound/soc/ti/omap-mcbsp.c 		w = MCBSP_READ_CACHE(mcbsp, RCCR);
mcbsp             498 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, RCCR, w);
mcbsp             500 sound/soc/ti/omap-mcbsp.c 	w = MCBSP_READ_CACHE(mcbsp, SPCR1);
mcbsp             501 sound/soc/ti/omap-mcbsp.c 	MCBSP_WRITE(mcbsp, SPCR1, w & ~rx);
mcbsp             503 sound/soc/ti/omap-mcbsp.c 	idle = !((MCBSP_READ_CACHE(mcbsp, SPCR2) |
mcbsp             504 sound/soc/ti/omap-mcbsp.c 			MCBSP_READ_CACHE(mcbsp, SPCR1)) & 1);
mcbsp             508 sound/soc/ti/omap-mcbsp.c 		w = MCBSP_READ_CACHE(mcbsp, SPCR2);
mcbsp             509 sound/soc/ti/omap-mcbsp.c 		MCBSP_WRITE(mcbsp, SPCR2, w & ~(1 << 6));
mcbsp             512 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->st_data)
mcbsp             513 sound/soc/ti/omap-mcbsp.c 		omap_mcbsp_st_stop(mcbsp);
mcbsp             516 sound/soc/ti/omap-mcbsp.c #define max_thres(m)			(mcbsp->pdata->buffer_size)
mcbsp             522 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = dev_get_drvdata(dev);		\
mcbsp             524 sound/soc/ti/omap-mcbsp.c 	return sprintf(buf, "%u\n", mcbsp->prop);			\
mcbsp             531 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = dev_get_drvdata(dev);		\
mcbsp             539 sound/soc/ti/omap-mcbsp.c 	if (!valid_threshold(mcbsp, val))				\
mcbsp             542 sound/soc/ti/omap-mcbsp.c 	mcbsp->prop = val;						\
mcbsp             558 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = dev_get_drvdata(dev);
mcbsp             563 sound/soc/ti/omap-mcbsp.c 	dma_op_mode = mcbsp->dma_op_mode;
mcbsp             580 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = dev_get_drvdata(dev);
mcbsp             587 sound/soc/ti/omap-mcbsp.c 	spin_lock_irq(&mcbsp->lock);
mcbsp             588 sound/soc/ti/omap-mcbsp.c 	if (!mcbsp->free) {
mcbsp             592 sound/soc/ti/omap-mcbsp.c 	mcbsp->dma_op_mode = i;
mcbsp             595 sound/soc/ti/omap-mcbsp.c 	spin_unlock_irq(&mcbsp->lock);
mcbsp             619 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
mcbsp             623 sound/soc/ti/omap-mcbsp.c 	spin_lock_init(&mcbsp->lock);
mcbsp             624 sound/soc/ti/omap-mcbsp.c 	mcbsp->free = true;
mcbsp             630 sound/soc/ti/omap-mcbsp.c 	mcbsp->io_base = devm_ioremap_resource(&pdev->dev, res);
mcbsp             631 sound/soc/ti/omap-mcbsp.c 	if (IS_ERR(mcbsp->io_base))
mcbsp             632 sound/soc/ti/omap-mcbsp.c 		return PTR_ERR(mcbsp->io_base);
mcbsp             634 sound/soc/ti/omap-mcbsp.c 	mcbsp->phys_base = res->start;
mcbsp             635 sound/soc/ti/omap-mcbsp.c 	mcbsp->reg_cache_size = resource_size(res);
mcbsp             639 sound/soc/ti/omap-mcbsp.c 		mcbsp->phys_dma_base = mcbsp->phys_base;
mcbsp             641 sound/soc/ti/omap-mcbsp.c 		mcbsp->phys_dma_base = res->start;
mcbsp             650 sound/soc/ti/omap-mcbsp.c 	mcbsp->irq = platform_get_irq_byname(pdev, "common");
mcbsp             651 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->irq == -ENXIO) {
mcbsp             652 sound/soc/ti/omap-mcbsp.c 		mcbsp->tx_irq = platform_get_irq_byname(pdev, "tx");
mcbsp             654 sound/soc/ti/omap-mcbsp.c 		if (mcbsp->tx_irq == -ENXIO) {
mcbsp             655 sound/soc/ti/omap-mcbsp.c 			mcbsp->irq = platform_get_irq(pdev, 0);
mcbsp             656 sound/soc/ti/omap-mcbsp.c 			mcbsp->tx_irq = 0;
mcbsp             658 sound/soc/ti/omap-mcbsp.c 			mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx");
mcbsp             659 sound/soc/ti/omap-mcbsp.c 			mcbsp->irq = 0;
mcbsp             669 sound/soc/ti/omap-mcbsp.c 		mcbsp->dma_req[0] = res->start;
mcbsp             670 sound/soc/ti/omap-mcbsp.c 		mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0];
mcbsp             677 sound/soc/ti/omap-mcbsp.c 		mcbsp->dma_req[1] = res->start;
mcbsp             678 sound/soc/ti/omap-mcbsp.c 		mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1];
mcbsp             680 sound/soc/ti/omap-mcbsp.c 		mcbsp->dma_data[0].filter_data = "tx";
mcbsp             681 sound/soc/ti/omap-mcbsp.c 		mcbsp->dma_data[1].filter_data = "rx";
mcbsp             684 sound/soc/ti/omap-mcbsp.c 	mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp,
mcbsp             686 sound/soc/ti/omap-mcbsp.c 	mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp,
mcbsp             689 sound/soc/ti/omap-mcbsp.c 	mcbsp->fclk = clk_get(&pdev->dev, "fck");
mcbsp             690 sound/soc/ti/omap-mcbsp.c 	if (IS_ERR(mcbsp->fclk)) {
mcbsp             691 sound/soc/ti/omap-mcbsp.c 		ret = PTR_ERR(mcbsp->fclk);
mcbsp             692 sound/soc/ti/omap-mcbsp.c 		dev_err(mcbsp->dev, "unable to get fck: %d\n", ret);
mcbsp             696 sound/soc/ti/omap-mcbsp.c 	mcbsp->dma_op_mode = MCBSP_DMA_MODE_ELEMENT;
mcbsp             697 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->buffer_size) {
mcbsp             706 sound/soc/ti/omap-mcbsp.c 		mcbsp->max_tx_thres = max_thres(mcbsp) - 0x10;
mcbsp             707 sound/soc/ti/omap-mcbsp.c 		mcbsp->max_rx_thres = max_thres(mcbsp) - 0x10;
mcbsp             709 sound/soc/ti/omap-mcbsp.c 		ret = sysfs_create_group(&mcbsp->dev->kobj,
mcbsp             712 sound/soc/ti/omap-mcbsp.c 			dev_err(mcbsp->dev,
mcbsp             725 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->buffer_size)
mcbsp             726 sound/soc/ti/omap-mcbsp.c 		sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group);
mcbsp             728 sound/soc/ti/omap-mcbsp.c 	clk_put(mcbsp->fclk);
mcbsp             741 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp             745 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->buffer_size == 0)
mcbsp             761 sound/soc/ti/omap-mcbsp.c 		omap_mcbsp_set_tx_threshold(mcbsp, words);
mcbsp             763 sound/soc/ti/omap-mcbsp.c 		omap_mcbsp_set_rx_threshold(mcbsp, words);
mcbsp             773 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = rule->private;
mcbsp             778 sound/soc/ti/omap-mcbsp.c 	size = mcbsp->pdata->buffer_size;
mcbsp             788 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp             792 sound/soc/ti/omap-mcbsp.c 		err = omap_mcbsp_request(mcbsp);
mcbsp             809 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->buffer_size) {
mcbsp             819 sound/soc/ti/omap-mcbsp.c 					    mcbsp,
mcbsp             833 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp             838 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->latency[stream2])
mcbsp             839 sound/soc/ti/omap-mcbsp.c 		pm_qos_update_request(&mcbsp->pm_qos_req,
mcbsp             840 sound/soc/ti/omap-mcbsp.c 				      mcbsp->latency[stream2]);
mcbsp             841 sound/soc/ti/omap-mcbsp.c 	else if (mcbsp->latency[stream1])
mcbsp             842 sound/soc/ti/omap-mcbsp.c 		pm_qos_remove_request(&mcbsp->pm_qos_req);
mcbsp             844 sound/soc/ti/omap-mcbsp.c 	mcbsp->latency[stream1] = 0;
mcbsp             847 sound/soc/ti/omap-mcbsp.c 		omap_mcbsp_free(mcbsp);
mcbsp             848 sound/soc/ti/omap-mcbsp.c 		mcbsp->configured = 0;
mcbsp             855 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp             856 sound/soc/ti/omap-mcbsp.c 	struct pm_qos_request *pm_qos_req = &mcbsp->pm_qos_req;
mcbsp             860 sound/soc/ti/omap-mcbsp.c 	int latency = mcbsp->latency[stream2];
mcbsp             863 sound/soc/ti/omap-mcbsp.c 	if (!latency || mcbsp->latency[stream1] < latency)
mcbsp             864 sound/soc/ti/omap-mcbsp.c 		latency = mcbsp->latency[stream1];
mcbsp             877 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp             883 sound/soc/ti/omap-mcbsp.c 		mcbsp->active++;
mcbsp             884 sound/soc/ti/omap-mcbsp.c 		omap_mcbsp_start(mcbsp, substream->stream);
mcbsp             890 sound/soc/ti/omap-mcbsp.c 		omap_mcbsp_stop(mcbsp, substream->stream);
mcbsp             891 sound/soc/ti/omap-mcbsp.c 		mcbsp->active--;
mcbsp             906 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp             911 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->buffer_size == 0)
mcbsp             915 sound/soc/ti/omap-mcbsp.c 		fifo_use = omap_mcbsp_get_tx_delay(mcbsp);
mcbsp             917 sound/soc/ti/omap-mcbsp.c 		fifo_use = omap_mcbsp_get_rx_delay(mcbsp);
mcbsp             933 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp             934 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp_reg_cfg *regs = &mcbsp->cfg_regs;
mcbsp             939 sound/soc/ti/omap-mcbsp.c 	unsigned int buffer_size = mcbsp->pdata->buffer_size;
mcbsp             957 sound/soc/ti/omap-mcbsp.c 		if (mcbsp->dma_op_mode == MCBSP_DMA_MODE_THRESHOLD) {
mcbsp             963 sound/soc/ti/omap-mcbsp.c 				max_thrsh = mcbsp->max_tx_thres;
mcbsp             965 sound/soc/ti/omap-mcbsp.c 				max_thrsh = mcbsp->max_rx_thres;
mcbsp             991 sound/soc/ti/omap-mcbsp.c 		mcbsp->latency[substream->stream] = latency;
mcbsp             998 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->configured) {
mcbsp            1007 sound/soc/ti/omap-mcbsp.c 	format = mcbsp->fmt & SND_SOC_DAIFMT_FORMAT_MASK;
mcbsp            1045 sound/soc/ti/omap-mcbsp.c 	master = mcbsp->fmt & SND_SOC_DAIFMT_MASTER_MASK;
mcbsp            1047 sound/soc/ti/omap-mcbsp.c 		div = mcbsp->clk_div ? mcbsp->clk_div : 1;
mcbsp            1048 sound/soc/ti/omap-mcbsp.c 		framesize = (mcbsp->in_freq / div) / params_rate(params);
mcbsp            1074 sound/soc/ti/omap-mcbsp.c 	omap_mcbsp_config(mcbsp, &mcbsp->cfg_regs);
mcbsp            1075 sound/soc/ti/omap-mcbsp.c 	mcbsp->wlen = wlen;
mcbsp            1076 sound/soc/ti/omap-mcbsp.c 	mcbsp->configured = 1;
mcbsp            1088 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp            1089 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp_reg_cfg *regs = &mcbsp->cfg_regs;
mcbsp            1092 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->configured)
mcbsp            1095 sound/soc/ti/omap-mcbsp.c 	mcbsp->fmt = fmt;
mcbsp            1101 sound/soc/ti/omap-mcbsp.c 	if (!mcbsp->pdata->has_ccr) {
mcbsp            1107 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->has_ccr) {
mcbsp            1197 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp            1198 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp_reg_cfg *regs = &mcbsp->cfg_regs;
mcbsp            1203 sound/soc/ti/omap-mcbsp.c 	mcbsp->clk_div = div;
mcbsp            1214 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
mcbsp            1215 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp_reg_cfg *regs = &mcbsp->cfg_regs;
mcbsp            1218 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->active) {
mcbsp            1219 sound/soc/ti/omap-mcbsp.c 		if (freq == mcbsp->in_freq)
mcbsp            1225 sound/soc/ti/omap-mcbsp.c 	mcbsp->in_freq = freq;
mcbsp            1238 sound/soc/ti/omap-mcbsp.c 		err = omap2_mcbsp_set_clks_src(mcbsp,
mcbsp            1246 sound/soc/ti/omap-mcbsp.c 		err = omap2_mcbsp_set_clks_src(mcbsp,
mcbsp            1287 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(dai);
mcbsp            1289 sound/soc/ti/omap-mcbsp.c 	pm_runtime_enable(mcbsp->dev);
mcbsp            1292 sound/soc/ti/omap-mcbsp.c 				  &mcbsp->dma_data[SNDRV_PCM_STREAM_PLAYBACK],
mcbsp            1293 sound/soc/ti/omap-mcbsp.c 				  &mcbsp->dma_data[SNDRV_PCM_STREAM_CAPTURE]);
mcbsp            1300 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(dai);
mcbsp            1302 sound/soc/ti/omap-mcbsp.c 	pm_runtime_disable(mcbsp->dev);
mcbsp            1378 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp;
mcbsp            1403 sound/soc/ti/omap-mcbsp.c 	mcbsp = devm_kzalloc(&pdev->dev, sizeof(struct omap_mcbsp), GFP_KERNEL);
mcbsp            1404 sound/soc/ti/omap-mcbsp.c 	if (!mcbsp)
mcbsp            1407 sound/soc/ti/omap-mcbsp.c 	mcbsp->id = pdev->id;
mcbsp            1408 sound/soc/ti/omap-mcbsp.c 	mcbsp->pdata = pdata;
mcbsp            1409 sound/soc/ti/omap-mcbsp.c 	mcbsp->dev = &pdev->dev;
mcbsp            1410 sound/soc/ti/omap-mcbsp.c 	platform_set_drvdata(pdev, mcbsp);
mcbsp            1416 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->reg_size == 2) {
mcbsp            1432 sound/soc/ti/omap-mcbsp.c 	struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
mcbsp            1434 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->ops && mcbsp->pdata->ops->free)
mcbsp            1435 sound/soc/ti/omap-mcbsp.c 		mcbsp->pdata->ops->free(mcbsp->id);
mcbsp            1437 sound/soc/ti/omap-mcbsp.c 	if (pm_qos_request_active(&mcbsp->pm_qos_req))
mcbsp            1438 sound/soc/ti/omap-mcbsp.c 		pm_qos_remove_request(&mcbsp->pm_qos_req);
mcbsp            1440 sound/soc/ti/omap-mcbsp.c 	if (mcbsp->pdata->buffer_size)
mcbsp            1441 sound/soc/ti/omap-mcbsp.c 		sysfs_remove_group(&mcbsp->dev->kobj, &additional_attr_group);
mcbsp            1445 sound/soc/ti/omap-mcbsp.c 	clk_put(mcbsp->fclk);