RE: OMAP AIC23

2008-08-13 Thread Hunter, Jon
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: OMAP AIC23

2008-08-12 Thread shekhar, chandra


- Original Message - 
From: "Hunter, Jon" <[EMAIL PROTECTED]>
To: "Shekhar, Chandra" <[EMAIL PROTECTED]>; "Yuri Jaeger Monti" 
<[EMAIL PROTECTED]>; 

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 


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: OMAP AIC23

2008-08-12 Thread Hunter, Jon
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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html



Re: OMAP AIC23

2008-08-11 Thread shekhar, chandra

Hi,
answers below.

- Original Message - 
From: "Yuri Jaeger Monti" <[EMAIL PROTECTED]>

To: 
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html



--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html