aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>2010-06-03 07:39:34 +0300
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-06-03 16:12:40 +0100
commitf10b8ad15f9531b6d58edabccf05e9eb738c4409 (patch)
tree537e517c064b92edde9670e0abd05c34adbfe373
parent451fd82dc148bd5ac9ed5b19b6915a1afe32b9cb (diff)
downloadkernel_samsung_tuna-f10b8ad15f9531b6d58edabccf05e9eb738c4409.zip
kernel_samsung_tuna-f10b8ad15f9531b6d58edabccf05e9eb738c4409.tar.gz
kernel_samsung_tuna-f10b8ad15f9531b6d58edabccf05e9eb738c4409.tar.bz2
OMAP3: McBSP: Use the port's buffer_size when calculating tx delay
Sicne the platform data's buffer_size now holds the full size of the FIFO, there is no longer need to handle the ports differently. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolsfonmicro.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r--arch/arm/plat-omap/mcbsp.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 4ef4604..e31496e 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -576,8 +576,6 @@ u16 omap_mcbsp_get_fifo_size(unsigned int id)
}
EXPORT_SYMBOL(omap_mcbsp_get_fifo_size);
-#define MCBSP2_FIFO_SIZE 0x500 /* 1024 + 256 locations */
-#define MCBSP1345_FIFO_SIZE 0x80 /* 128 locations */
/*
* omap_mcbsp_get_tx_delay returns the number of used slots in the McBSP FIFO
*/
@@ -596,10 +594,7 @@ u16 omap_mcbsp_get_tx_delay(unsigned int id)
buffstat = MCBSP_READ(mcbsp, XBUFFSTAT);
/* Number of slots are different in McBSP ports */
- if (mcbsp->id == 2)
- return MCBSP2_FIFO_SIZE - buffstat;
- else
- return MCBSP1345_FIFO_SIZE - buffstat;
+ return mcbsp->pdata->buffer_size - buffstat;
}
EXPORT_SYMBOL(omap_mcbsp_get_tx_delay);