public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* OMAP AIC23
@ 2008-08-11 19:21 Yuri Jaeger Monti
  2008-08-12  5:33 ` shekhar, chandra
  0 siblings, 1 reply; 5+ messages in thread
From: Yuri Jaeger Monti @ 2008-08-11 19:21 UTC (permalink / raw)
  To: linux-omap

Dear fellows,

I'm having some errors trying to compile the current kernel version
for OMAP5912 on AIC23:

...
  CC      drivers/i2c/i2c-core.o
  CC      drivers/i2c/i2c-dev.o
  LD      drivers/i2c/algos/built-in.o
  CC      drivers/i2c/busses/i2c-omap.o
  LD      drivers/i2c/busses/built-in.o
  CC      drivers/i2c/chips/tps65010.o
  CC      drivers/i2c/chips/tlv320aic23.o
drivers/i2c/chips/tlv320aic23.c: In function 'omap_mcbsp3_aic23_clock_init':
drivers/i2c/chips/tlv320aic23.c:113: error: implicit declaration of
function 'OMAP_MCBSP_WRITE'
drivers/i2c/chips/tlv320aic23.c:113: error: 'SPCR1' undeclared (first
use in this function)
drivers/i2c/chips/tlv320aic23.c:113: error: (Each undeclared
identifier is reported only once
drivers/i2c/chips/tlv320aic23.c:113: error: for each function it appears in.)
drivers/i2c/chips/tlv320aic23.c:114: error: 'SPCR2' undeclared (first
use in this function)
drivers/i2c/chips/tlv320aic23.c:117: error: 'PCR0' undeclared (first
use in this function)
drivers/i2c/chips/tlv320aic23.c:120: error: 'SRGR1' undeclared (first
use in this function)
drivers/i2c/chips/tlv320aic23.c:121: error: 'SRGR2' undeclared (first
use in this function)
drivers/i2c/chips/tlv320aic23.c:124: error: implicit declaration of
function 'OMAP_MCBSP_READ'
make[3]: *** [drivers/i2c/chips/tlv320aic23.o] Error 1
make[2]: *** [drivers/i2c/chips] Error 2
make[1]: *** [drivers/i2c] Error 2
make: *** [drivers] Error 2

Anyone know what could this be?

Thanks!

--
Yuri Jaeger Monti

The Catholic University at Porto Alegre - PUCRS
(51) 3320.3500 Ramal #7696

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

* Re: OMAP AIC23
  2008-08-11 19:21 OMAP AIC23 Yuri Jaeger Monti
@ 2008-08-12  5:33 ` shekhar, chandra
  2008-08-13  2:50   ` Hunter, Jon
  0 siblings, 1 reply; 5+ messages in thread
From: shekhar, chandra @ 2008-08-12  5:33 UTC (permalink / raw)
  To: Yuri Jaeger Monti, linux-omap

Hi,
answers below.

----- Original Message ----- 
From: "Yuri Jaeger Monti" <yurijm@gmail.com>
To: <linux-omap@vger.kernel.org>
Sent: Tuesday, August 12, 2008 12:51 AM
Subject: OMAP AIC23


> Dear fellows,
>
> I'm having some errors trying to compile the current kernel version
> for OMAP5912 on AIC23:
>
> ...
>  CC      drivers/i2c/i2c-core.o
>  CC      drivers/i2c/i2c-dev.o
>  LD      drivers/i2c/algos/built-in.o
>  CC      drivers/i2c/busses/i2c-omap.o
>  LD      drivers/i2c/busses/built-in.o
>  CC      drivers/i2c/chips/tps65010.o
>  CC      drivers/i2c/chips/tlv320aic23.o
> drivers/i2c/chips/tlv320aic23.c: In function 'omap_mcbsp3_aic23_clock_init':
> drivers/i2c/chips/tlv320aic23.c:113: error: implicit declaration of
> function 'OMAP_MCBSP_WRITE'

Recently there wre some changes in McBSP driver for multi-omap support. Earlier 
read/write calls used to be
defined as a macro and now it has been converted to a function, hence the 
compilation error (implicit declaration of
function 'OMAP_MCBSP_WRITE') .  you can look for recent patches for
arch/arm/plat-omap/mcbsp.c file.

i have a question, why a client is modifying mcbsp registers. There is a mcbsp 
config function (omap_mcbsp_config) exported which you can use to
configure mcbsp registers.
if its an absolute necessity you can use omap_mcbsp_read and omap_mcbsp_write 
function. which are defined in arch/arm/plat-omap/mcbsp.c.
but you need to pass full register name, like OMAP_MCBSP_REG_SPCR1 instead of 
just SPCR1 ( 'SPCR1' undeclared  error).


> drivers/i2c/chips/tlv320aic23.c:113: error: 'SPCR1' undeclared (first
> use in this function)
> drivers/i2c/chips/tlv320aic23.c:113: error: (Each undeclared
> identifier is reported only once
> drivers/i2c/chips/tlv320aic23.c:113: error: for each function it appears in.)
> drivers/i2c/chips/tlv320aic23.c:114: error: 'SPCR2' undeclared (first
> use in this function)
> drivers/i2c/chips/tlv320aic23.c:117: error: 'PCR0' undeclared (first
> use in this function)
> drivers/i2c/chips/tlv320aic23.c:120: error: 'SRGR1' undeclared (first
> use in this function)
> drivers/i2c/chips/tlv320aic23.c:121: error: 'SRGR2' undeclared (first
> use in this function)
> drivers/i2c/chips/tlv320aic23.c:124: error: implicit declaration of
> function 'OMAP_MCBSP_READ'
> make[3]: *** [drivers/i2c/chips/tlv320aic23.o] Error 1
> make[2]: *** [drivers/i2c/chips] Error 2
> make[1]: *** [drivers/i2c] Error 2
> make: *** [drivers] Error 2
>
> Anyone know what could this be?
>
> Thanks!
>
> --
> Yuri Jaeger Monti
>
> The Catholic University at Porto Alegre - PUCRS
> (51) 3320.3500 Ramal #7696
> --
> 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] 5+ messages in thread

* RE: OMAP AIC23
  2008-08-12  5:33 ` shekhar, chandra
@ 2008-08-13  2:50   ` Hunter, Jon
  2008-08-13  6:37     ` shekhar, chandra
  0 siblings, 1 reply; 5+ messages in thread
From: Hunter, Jon @ 2008-08-13  2:50 UTC (permalink / raw)
  To: Shekhar, Chandra, Yuri Jaeger Monti, linux-omap@vger.kernel.org

Hi Chandra,

> i have a question, why a client is modifying mcbsp registers. There is a
> mcbsp
> config function (omap_mcbsp_config) exported which you can use to
> configure mcbsp registers.
> if its an absolute necessity you can use omap_mcbsp_read and
> omap_mcbsp_write
> function. which are defined in arch/arm/plat-omap/mcbsp.c.
> but you need to pass full register name, like OMAP_MCBSP_REG_SPCR1 instead
> of
> just SPCR1 ( 'SPCR1' undeclared  error).


Looking at the source file "drivers/i2c/chips/tlv320aic23.c" the function "omap_mcbsp3_aic23_clock_init()" is enabling the McBSP sample rate generator in order to generate the 12MHz system clock to the aic23. I believe that this needs to be done in order to configure the aic23.

The good news is that there appears to be a simple fix. All we need to do is move the definitions of the macros OMAP_MCBSP_READ and OMAP_MCBSP_WRITE from mcbsp.c to the header "include/asm-arm/arch-omap/mcbsp.h"

Doing this and making a couple other minor changes I am now able to build the alsa driver successfully for the omap5912 osk. I will submit a patch to the list. Let me know what you think.

Cheers
Jon

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

* Re: OMAP AIC23
  2008-08-13  2:50   ` Hunter, Jon
@ 2008-08-13  6:37     ` shekhar, chandra
  2008-08-13 13:41       ` Hunter, Jon
  0 siblings, 1 reply; 5+ messages in thread
From: shekhar, chandra @ 2008-08-13  6:37 UTC (permalink / raw)
  To: Hunter, Jon, Yuri Jaeger Monti, linux-omap


----- Original Message ----- 
From: "Hunter, Jon" <jon-hunter@ti.com>
To: "Shekhar, Chandra" <x0044955@ti.com>; "Yuri Jaeger Monti" 
<yurijm@gmail.com>; <linux-omap@vger.kernel.org>
Sent: Wednesday, August 13, 2008 8:20 AM
Subject: RE: OMAP AIC23


Hi Chandra,

> i have a question, why a client is modifying mcbsp registers. There is a
> mcbsp
> config function (omap_mcbsp_config) exported which you can use to
> configure mcbsp registers.
> if its an absolute necessity you can use omap_mcbsp_read and
> omap_mcbsp_write
> function. which are defined in arch/arm/plat-omap/mcbsp.c.
> but you need to pass full register name, like OMAP_MCBSP_REG_SPCR1 instead
> of
> just SPCR1 ( 'SPCR1' undeclared  error).


>Looking at the source file "drivers/i2c/chips/tlv320aic23.c" the function 
>"omap_mcbsp3_aic23_clock_init()" is enabling the McBSP sample rate generator in 
>order >to generate the 12MHz system clock to the aic23. I believe that this 
>needs to be done in order to configure the aic23.

>The good news is that there appears to be a simple fix. All we need to do is 
>move the definitions of the macros OMAP_MCBSP_READ and >OMAP_MCBSP_WRITE from 
>mcbsp.c to the header "include/asm-arm/arch-omap/mcbsp.h"

Look like this should be doable.
but we will have two read/write defs in header. one will be Macro and other will 
be function, both mapping to same code.



Doing this and making a couple other minor changes I am now able to build the 
alsa driver successfully for the omap5912 osk. I will submit a patch to the 
list. Let me know what you think.

Cheers
Jon 


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

* RE: OMAP AIC23
  2008-08-13  6:37     ` shekhar, chandra
@ 2008-08-13 13:41       ` Hunter, Jon
  0 siblings, 0 replies; 5+ messages in thread
From: Hunter, Jon @ 2008-08-13 13:41 UTC (permalink / raw)
  To: Shekhar, Chandra, Yuri Jaeger Monti, linux-omap@vger.kernel.org

> Look like this should be doable.
> but we will have two read/write defs in header. one will be Macro and
> other will
> be function, both mapping to same code.


Correct. As well as moving the macro definition, I did add a prototype for the read and write function to the header too. Check out the patch I submitted. Compiling fine now for me.

Cheers
Jon

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

end of thread, other threads:[~2008-08-13 13:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-11 19:21 OMAP AIC23 Yuri Jaeger Monti
2008-08-12  5:33 ` shekhar, chandra
2008-08-13  2:50   ` Hunter, Jon
2008-08-13  6:37     ` shekhar, chandra
2008-08-13 13:41       ` Hunter, Jon

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