diff mbox

[v3,2/9] ARM: OMAP: mcbsp: Enable FIFO use for OMAP2430

Message ID 1345124468-8876-3-git-send-email-peter.ujfalusi@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Ujfalusi Aug. 16, 2012, 1:41 p.m. UTC
On OMAP2430 all McBSP ports have 128 word long buffer, enable the use of
the FIFO for the audio stack.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
---
 arch/arm/mach-omap2/mcbsp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Comments

Tony Lindgren Aug. 17, 2012, 1:07 p.m. UTC | #1
* Peter Ujfalusi <peter.ujfalusi@ti.com> [120816 06:41]:
> On OMAP2430 all McBSP ports have 128 word long buffer, enable the use of
> the FIFO for the audio stack.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
> ---
>  arch/arm/mach-omap2/mcbsp.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
> index ebc801e..6e046e1 100644
> --- a/arch/arm/mach-omap2/mcbsp.c
> +++ b/arch/arm/mach-omap2/mcbsp.c
> @@ -151,7 +151,10 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
>  	if (id == 4 && oh->class->rev == MCBSP_CONFIG_TYPE4)
>  		pdata->mux_signal = omap4_mcbsp4_mux_rx_clk;
>  
> -	if (oh->class->rev == MCBSP_CONFIG_TYPE3) {
> +	if (oh->class->rev == MCBSP_CONFIG_TYPE2) {
> +		/* The FIFO has 128 locations */
> +		pdata->buffer_size = 0x80;
> +	} else if (oh->class->rev == MCBSP_CONFIG_TYPE3) {
>  		if (id == 2)
>  			/* The FIFO has 1024 + 256 locations */
>  			pdata->buffer_size = 0x500;

Is this the case also for 2420? I thought some only had a FIFO at
one port?

Tony
Jarkko Nikula Aug. 17, 2012, 1:14 p.m. UTC | #2
On 08/17/2012 04:07 PM, Tony Lindgren wrote:
> * Peter Ujfalusi <peter.ujfalusi@ti.com> [120816 06:41]:
>> On OMAP2430 all McBSP ports have 128 word long buffer, enable the use of
>> the FIFO for the audio stack.
> Is this the case also for 2420? I thought some only had a FIFO at
> one port?
> 
IRCC (I don't have specs), nope. Only 2430 (as noted by Peter) and
onwards have FIFO.

But that's true that FIFO sizes differ between the ports. E.g. only
ports 2 and 3 have 1024+128 deep FIFOs in OMAP3.
Peter Ujfalusi Aug. 17, 2012, 2:03 p.m. UTC | #3
On 08/17/2012 04:14 PM, Jarkko Nikula wrote:
> On 08/17/2012 04:07 PM, Tony Lindgren wrote:
>> * Peter Ujfalusi <peter.ujfalusi@ti.com> [120816 06:41]:
>>> On OMAP2430 all McBSP ports have 128 word long buffer, enable the use of
>>> the FIFO for the audio stack.
>> Is this the case also for 2420? I thought some only had a FIFO at
>> one port?
>>
> IRCC (I don't have specs), nope. Only 2430 (as noted by Peter) and
> onwards have FIFO.
> 
> But that's true that FIFO sizes differ between the ports. E.g. only
> ports 2 and 3 have 1024+128 deep FIFOs in OMAP3.
> 

OMAP2420 McBSP does not have FIFO (the IP is closer to OMAP1 McBSP).
OMAP2430, OMAP4, OMAP5 has 128 word long FIFO on all McBSP ports.
On OMAP3: McBSP2 have 1024+256 (1280) word FIFO the rest of the ports have 128
long FIFO.
Tony Lindgren Aug. 18, 2012, 6:08 a.m. UTC | #4
* Peter Ujfalusi <peter.ujfalusi@ti.com> [120817 07:03]:
> On 08/17/2012 04:14 PM, Jarkko Nikula wrote:
> > On 08/17/2012 04:07 PM, Tony Lindgren wrote:
> >> * Peter Ujfalusi <peter.ujfalusi@ti.com> [120816 06:41]:
> >>> On OMAP2430 all McBSP ports have 128 word long buffer, enable the use of
> >>> the FIFO for the audio stack.
> >> Is this the case also for 2420? I thought some only had a FIFO at
> >> one port?
> >>
> > IRCC (I don't have specs), nope. Only 2430 (as noted by Peter) and
> > onwards have FIFO.
> > 
> > But that's true that FIFO sizes differ between the ports. E.g. only
> > ports 2 and 3 have 1024+128 deep FIFOs in OMAP3.
> > 
> 
> OMAP2420 McBSP does not have FIFO (the IP is closer to OMAP1 McBSP).
> OMAP2430, OMAP4, OMAP5 has 128 word long FIFO on all McBSP ports.
> On OMAP3: McBSP2 have 1024+256 (1280) word FIFO the rest of the ports have 128
> long FIFO.

Thanks, is this patch still correct so it does not try to enable FIFO
for 2420?

Regards,

Tony
Peter Ujfalusi Aug. 18, 2012, 3:58 p.m. UTC | #5
Hi Tony,

On Sat, Aug 18, 2012 at 8:08 AM, Tony Lindgren <tony@atomide.com> wrote:
> Thanks, is this patch still correct so it does not try to enable FIFO
> for 2420?

Yes it only enables the FIFO for 2430, 2420 is not affected.
Tony Lindgren Aug. 20, 2012, 6:57 a.m. UTC | #6
* Ujfalusi, Peter <peter.ujfalusi@ti.com> [120818 08:58]:
> Hi Tony,
> 
> On Sat, Aug 18, 2012 at 8:08 AM, Tony Lindgren <tony@atomide.com> wrote:
> > Thanks, is this patch still correct so it does not try to enable FIFO
> > for 2420?
> 
> Yes it only enables the FIFO for 2430, 2420 is not affected.

OK thanks for the clarification.

Tony
Mark Brown Aug. 22, 2012, 7:11 p.m. UTC | #7
On Thu, Aug 16, 2012 at 04:41:01PM +0300, Peter Ujfalusi wrote:
> On OMAP2430 all McBSP ports have 128 word long buffer, enable the use of
> the FIFO for the audio stack.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>

I applied this - Tony, from the thread it seemed you were OK even though
you didn't explicitly ack it?
Tony Lindgren Aug. 22, 2012, 9:01 p.m. UTC | #8
* Mark Brown <broonie@opensource.wolfsonmicro.com> [120822 12:12]:
> On Thu, Aug 16, 2012 at 04:41:01PM +0300, Peter Ujfalusi wrote:
> > On OMAP2430 all McBSP ports have 128 word long buffer, enable the use of
> > the FIFO for the audio stack.
> > 
> > Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> > Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
> 
> I applied this - Tony, from the thread it seemed you were OK even though
> you didn't explicitly ack it?

Ah yes sorry, I'm fine with it. Sounds like you already applied it,
so too late to ack. But just in case:

Acked-by: Tony Lindgren <tony@atomide.com>
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index ebc801e..6e046e1 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -151,7 +151,10 @@  static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
 	if (id == 4 && oh->class->rev == MCBSP_CONFIG_TYPE4)
 		pdata->mux_signal = omap4_mcbsp4_mux_rx_clk;
 
-	if (oh->class->rev == MCBSP_CONFIG_TYPE3) {
+	if (oh->class->rev == MCBSP_CONFIG_TYPE2) {
+		/* The FIFO has 128 locations */
+		pdata->buffer_size = 0x80;
+	} else if (oh->class->rev == MCBSP_CONFIG_TYPE3) {
 		if (id == 2)
 			/* The FIFO has 1024 + 256 locations */
 			pdata->buffer_size = 0x500;