public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Reset unused clocks during boot causing problem on 5912 OSK
@ 2008-09-03 14:02 Arun KS
  2008-09-03 14:09 ` Felipe Balbi
  2008-09-03 19:00 ` Russell King - ARM Linux
  0 siblings, 2 replies; 6+ messages in thread
From: Arun KS @ 2008-09-03 14:02 UTC (permalink / raw)
  To: linux-omap

Hi all,

I am trying to write an ASOC driver for tlv320aic23 on 5912osk.
When i do an aplay, the system is hanging.
Later i found that it is hanging when mcbsp1 is requested in funcion
omap_mcbsp_dai_startup in file sound/soc/omap/omap-mcbsp.c

The reason is that the unused clocks are switched off during booting.

So i decided to disable the option (reset unused clocks during boot) from
system type -> TI OMAP Implementations in menuconfig.

But still its not working.

When i give omap_mcbsp_request(0) in init function of my machine
driver, i m able
to get the requested mcbsp.

Best Regards,
Arun KS

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Reset unused clocks during boot causing problem on 5912 OSK
  2008-09-03 14:02 Reset unused clocks during boot causing problem on 5912 OSK Arun KS
@ 2008-09-03 14:09 ` Felipe Balbi
  2008-09-03 17:27   ` Arun KS
  2008-09-03 19:00 ` Russell King - ARM Linux
  1 sibling, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2008-09-03 14:09 UTC (permalink / raw)
  To: ext Arun KS; +Cc: linux-omap

On Wed, Sep 03, 2008 at 07:32:51PM +0530, ext Arun KS wrote:
> Hi all,
> 
> I am trying to write an ASOC driver for tlv320aic23 on 5912osk.
> When i do an aplay, the system is hanging.
> Later i found that it is hanging when mcbsp1 is requested in funcion
> omap_mcbsp_dai_startup in file sound/soc/omap/omap-mcbsp.c
> 
> The reason is that the unused clocks are switched off during booting.
> 
> So i decided to disable the option (reset unused clocks during boot) from
> system type -> TI OMAP Implementations in menuconfig.
> 
> But still its not working.
> 
> When i give omap_mcbsp_request(0) in init function of my machine
> driver, i m able
> to get the requested mcbsp.

Take a look at sound/soc/omap/n810.c, under n810_startup() it calls
clk_enable().

Maybe you should do the same. But since tlv320aic23 is used by more than
one machine you could make the clk_enable be board specific.

But one step at a time, take a look here:

 71 static int n810_startup(struct snd_pcm_substream *substream)
 72 {
 73         struct snd_soc_pcm_runtime *rtd = substream->private_data;
 74         struct snd_soc_codec *codec = rtd->socdev->codec;
 75 
 76         n810_ext_control(codec);
 77         return clk_enable(sys_clkout2);
 78 }

-- 
balbi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Reset unused clocks during boot causing problem on 5912 OSK
  2008-09-03 14:09 ` Felipe Balbi
@ 2008-09-03 17:27   ` Arun KS
  2008-09-03 17:35     ` Yuri Jaeger Monti
  0 siblings, 1 reply; 6+ messages in thread
From: Arun KS @ 2008-09-03 17:27 UTC (permalink / raw)
  To: felipe.balbi; +Cc: linux-omap

Hi Balbi,

That clk_enable() is for sys_clkout, which is the MCLK for the CODEC.

I am following n810.c file itself.

But I m talking about omap_mcbsp_request(0), which will only be called when
we do an aplay, by the platform driver of the omap(sound/soc/omap/ompa-mcbsp.c).
But before this the unused clocks are switched off by clock.c in
arch/arm/mach-omap1/clocks.c.
And when i call the omap_mcbsp_request(), the entire system hangs...

Arun

On Wed, Sep 3, 2008 at 7:39 PM, Felipe Balbi <felipe.balbi@nokia.com> wrote:
> On Wed, Sep 03, 2008 at 07:32:51PM +0530, ext Arun KS wrote:
>> Hi all,
>>
>> I am trying to write an ASOC driver for tlv320aic23 on 5912osk.
>> When i do an aplay, the system is hanging.
>> Later i found that it is hanging when mcbsp1 is requested in funcion
>> omap_mcbsp_dai_startup in file sound/soc/omap/omap-mcbsp.c
>>
>> The reason is that the unused clocks are switched off during booting.
>>
>> So i decided to disable the option (reset unused clocks during boot) from
>> system type -> TI OMAP Implementations in menuconfig.
>>
>> But still its not working.
>>
>> When i give omap_mcbsp_request(0) in init function of my machine
>> driver, i m able
>> to get the requested mcbsp.
>
> Take a look at sound/soc/omap/n810.c, under n810_startup() it calls
> clk_enable().
>
> Maybe you should do the same. But since tlv320aic23 is used by more than
> one machine you could make the clk_enable be board specific.
>
> But one step at a time, take a look here:
>
>  71 static int n810_startup(struct snd_pcm_substream *substream)
>  72 {
>  73         struct snd_soc_pcm_runtime *rtd = substream->private_data;
>  74         struct snd_soc_codec *codec = rtd->socdev->codec;
>  75
>  76         n810_ext_control(codec);
>  77         return clk_enable(sys_clkout2);
>  78 }
>
> --
> balbi
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Reset unused clocks during boot causing problem on 5912 OSK
  2008-09-03 17:27   ` Arun KS
@ 2008-09-03 17:35     ` Yuri Jaeger Monti
  0 siblings, 0 replies; 6+ messages in thread
From: Yuri Jaeger Monti @ 2008-09-03 17:35 UTC (permalink / raw)
  To: Arun KS; +Cc: linux-omap

My system hangs too when loading the old AIC23 codec module on the
OSK5912, don' t know why.


---
Yuri Jaeger Monti


On Wed, Sep 3, 2008 at 2:27 PM, Arun KS <getarunks@gmail.com> wrote:
>
> Hi Balbi,
>
> That clk_enable() is for sys_clkout, which is the MCLK for the CODEC.
>
> I am following n810.c file itself.
>
> But I m talking about omap_mcbsp_request(0), which will only be called when
> we do an aplay, by the platform driver of the omap(sound/soc/omap/ompa-mcbsp.c).
> But before this the unused clocks are switched off by clock.c in
> arch/arm/mach-omap1/clocks.c.
> And when i call the omap_mcbsp_request(), the entire system hangs...
>
> Arun
>
> On Wed, Sep 3, 2008 at 7:39 PM, Felipe Balbi <felipe.balbi@nokia.com> wrote:
> > On Wed, Sep 03, 2008 at 07:32:51PM +0530, ext Arun KS wrote:
> >> Hi all,
> >>
> >> I am trying to write an ASOC driver for tlv320aic23 on 5912osk.
> >> When i do an aplay, the system is hanging.
> >> Later i found that it is hanging when mcbsp1 is requested in funcion
> >> omap_mcbsp_dai_startup in file sound/soc/omap/omap-mcbsp.c
> >>
> >> The reason is that the unused clocks are switched off during booting.
> >>
> >> So i decided to disable the option (reset unused clocks during boot) from
> >> system type -> TI OMAP Implementations in menuconfig.
> >>
> >> But still its not working.
> >>
> >> When i give omap_mcbsp_request(0) in init function of my machine
> >> driver, i m able
> >> to get the requested mcbsp.
> >
> > Take a look at sound/soc/omap/n810.c, under n810_startup() it calls
> > clk_enable().
> >
> > Maybe you should do the same. But since tlv320aic23 is used by more than
> > one machine you could make the clk_enable be board specific.
> >
> > But one step at a time, take a look here:
> >
> >  71 static int n810_startup(struct snd_pcm_substream *substream)
> >  72 {
> >  73         struct snd_soc_pcm_runtime *rtd = substream->private_data;
> >  74         struct snd_soc_codec *codec = rtd->socdev->codec;
> >  75
> >  76         n810_ext_control(codec);
> >  77         return clk_enable(sys_clkout2);
> >  78 }
> >
> > --
> > balbi
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Reset unused clocks during boot causing problem on 5912 OSK
  2008-09-03 14:02 Reset unused clocks during boot causing problem on 5912 OSK Arun KS
  2008-09-03 14:09 ` Felipe Balbi
@ 2008-09-03 19:00 ` Russell King - ARM Linux
  2008-09-04 15:29   ` Arun KS
  1 sibling, 1 reply; 6+ messages in thread
From: Russell King - ARM Linux @ 2008-09-03 19:00 UTC (permalink / raw)
  To: Arun KS; +Cc: linux-omap

On Wed, Sep 03, 2008 at 07:32:51PM +0530, Arun KS wrote:
> I am trying to write an ASOC driver for tlv320aic23 on 5912osk.

5912osk is OMAP1, yes ?  Uses arch/arm/mach-omap1/mcbsp.c ?

Which is the file I pointed out passing physical addresses for mcbsp1
and mcbsp3 instead of virtual addresses, resulting in code hitting
something else rather than the right registers ?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Reset unused clocks during boot causing problem on 5912 OSK
  2008-09-03 19:00 ` Russell King - ARM Linux
@ 2008-09-04 15:29   ` Arun KS
  0 siblings, 0 replies; 6+ messages in thread
From: Arun KS @ 2008-09-04 15:29 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-omap

On 9/4/08, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Wed, Sep 03, 2008 at 07:32:51PM +0530, Arun KS wrote:
> > I am trying to write an ASOC driver for tlv320aic23 on 5912osk.
>
> 5912osk is OMAP1, yes ?  Uses arch/arm/mach-omap1/mcbsp.c ?
>
> Which is the file I pointed out passing physical addresses for mcbsp1
> and mcbsp3 instead of virtual addresses, resulting in code hitting
> something else rather than the right registers ?
>

But when i am requesting the mcbsp(omap_mcbsp_request(0)) in my init function,
I am able to get the requested mcbsp. What could be the reason for that?

Arun

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-04 15:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-03 14:02 Reset unused clocks during boot causing problem on 5912 OSK Arun KS
2008-09-03 14:09 ` Felipe Balbi
2008-09-03 17:27   ` Arun KS
2008-09-03 17:35     ` Yuri Jaeger Monti
2008-09-03 19:00 ` Russell King - ARM Linux
2008-09-04 15:29   ` Arun KS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox