public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Re: [U-Boot-CVS] u-boot/drivers omap24xx_i2c.c,NONE,1.1 Makefile,1.29,1.30 ns16550.c,1.6,1.7 serial.c,1.5,1.6
       [not found] <E1CnmIi-0002Mc-2E@sc8-pr-cvs1.sourceforge.net>
@ 2005-01-10 15:26 ` Cory Tusar
  2005-01-10 15:36   ` Jerry Van Baren
  0 siblings, 1 reply; 5+ messages in thread
From: Cory Tusar @ 2005-01-10 15:26 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> Update of /cvsroot/u-boot/u-boot/drivers
> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8979/drivers
> 
> Modified Files:
> 	Makefile ns16550.c serial.c 
> Added Files:
> 	omap24xx_i2c.c 
> Log Message:
> * Patches by Richard Woodruff, 01 Oct 2004:
>   add support for the TI OMAP2420 processor and its H4 reference
>   board
> 
> * Patch by Christian Pellegrin, 24 Sep 2004:
>   Added support for NE2000 compatible (DP8390, DP83902) NICs.

This changeset, notably omap24xx_i2c.c, breaks (ARM-only?) non-omap24xx 
builds.  The attached patch relocates the omap24xx-specific i2c header 
information from asm-arm/arch-arm1136/i2c.h to include/omap24xx_i2c.h.

Patch was generated against current CVS sources.

-Cory


-- 
Cory T. Tusar
Embedded Systems Engineer
Videon Central, Inc.
2171 Sandy Drive
State College, PA 16801
(814) 235-1111 x316
(814) 235-1118 fax

"Debugging is twice as hard as writing the code in the first place.
   Therefore, if you write the code as cleverly as possible, you are,
     by definition, not smart enough to debug it."  --Brian W. Kernighan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: omap24xx_i2c_header_fix.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20050110/73c701a4/attachment.txt 

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

* [U-Boot-Users] Re: [U-Boot-CVS] u-boot/drivers omap24xx_i2c.c,NONE,1.1 Makefile,1.29,1.30 ns16550.c,1.6,1.7 serial.c,1.5,1.6
  2005-01-10 15:26 ` Cory Tusar
@ 2005-01-10 15:36   ` Jerry Van Baren
  0 siblings, 0 replies; 5+ messages in thread
From: Jerry Van Baren @ 2005-01-10 15:36 UTC (permalink / raw)
  To: u-boot

Cory Tusar wrote:
> Wolfgang Denk wrote:
> 
>> Update of /cvsroot/u-boot/u-boot/drivers
>> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8979/drivers
>>
>> Modified Files:
>>     Makefile ns16550.c serial.c Added Files:
>>     omap24xx_i2c.c Log Message:
>> * Patches by Richard Woodruff, 01 Oct 2004:
>>   add support for the TI OMAP2420 processor and its H4 reference
>>   board
>>
>> * Patch by Christian Pellegrin, 24 Sep 2004:
>>   Added support for NE2000 compatible (DP8390, DP83902) NICs.
> 
> 
> This changeset, notably omap24xx_i2c.c, breaks (ARM-only?) non-omap24xx 
> builds.  The attached patch relocates the omap24xx-specific i2c header 
> information from asm-arm/arch-arm1136/i2c.h to include/omap24xx_i2c.h.
> 
> Patch was generated against current CVS sources.
> 
> -Cory

Thanks, Cory.  It currently breaks PowerPC builds too.

gvb

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

* [U-Boot-Users] RE: [U-Boot-CVS] u-boot/drivers omap24xx_i2c.c,NONE,1.1 Makefile,1.29,1.30 ns16550.c,1.6,1.7 serial.c,1.5,1.6
@ 2005-01-10 16:14 Woodruff, Richard
  2005-01-10 16:44 ` [U-Boot-Users] " Cory Tusar
  2005-01-10 17:24 ` Cory Tusar
  0 siblings, 2 replies; 5+ messages in thread
From: Woodruff, Richard @ 2005-01-10 16:14 UTC (permalink / raw)
  To: u-boot

Sorry,

I ran into the build problem long ago and fixed it locally.  I was
preparing to resubmit a patch with a lot of additions and this one
fix....as I was thinking Wolfgang had bypassed it.

I believe the real fix I used was in the driver itself not above.  Its
much simpler and I think the correct one.

Regards,
Richard W.



The File drivers/omap2420_i2c.c needs to look like this:
-----------------------------------------------------------
#include <common.h>

#ifdef CONFIG_DRIVER_OMAP24XX_I2C

#include <asm/arch/i2c.h>
#include <asm/io.h>

#define inw(a) __raw_readw(a)
#define outw(a,v) __raw_writew(a,v)


-----------------------------------------------------------

previously it WRONGLY looked like:

#include <common.h>
#include <asm/arch/i2c.h>
#include <asm/io.h>

#define inw(a) __raw_readw(a)
#define outw(a,v) __raw_writew(a,v)

#ifdef CONFIG_DRIVER_OMAP24XX_I2C





> -----Original Message-----
> From: Cory Tusar [mailto:ctusar at videon-central.com]
> Sent: Monday, January 10, 2005 9:27 AM
> To: [u-boot] U-Boot users list
> Cc: Woodruff, Richard
> Subject: Re: [U-Boot-CVS] u-boot/drivers omap24xx_i2c.c,NONE,1.1
> Makefile,1.29,1.30 ns16550.c,1.6,1.7 serial.c,1.5,1.6
> 
> Wolfgang Denk wrote:
> > Update of /cvsroot/u-boot/u-boot/drivers
> > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8979/drivers
> >
> > Modified Files:
> > 	Makefile ns16550.c serial.c
> > Added Files:
> > 	omap24xx_i2c.c
> > Log Message:
> > * Patches by Richard Woodruff, 01 Oct 2004:
> >   add support for the TI OMAP2420 processor and its H4 reference
> >   board
> >
> > * Patch by Christian Pellegrin, 24 Sep 2004:
> >   Added support for NE2000 compatible (DP8390, DP83902) NICs.
> 
> This changeset, notably omap24xx_i2c.c, breaks (ARM-only?)
non-omap24xx
> builds.  The attached patch relocates the omap24xx-specific i2c header
> information from asm-arm/arch-arm1136/i2c.h to include/omap24xx_i2c.h.
> 
> Patch was generated against current CVS sources.
> 
> -Cory
> 
> 
> --
> Cory T. Tusar
> Embedded Systems Engineer
> Videon Central, Inc.
> 2171 Sandy Drive
> State College, PA 16801
> (814) 235-1111 x316
> (814) 235-1118 fax
> 
> "Debugging is twice as hard as writing the code in the first place.
>    Therefore, if you write the code as cleverly as possible, you are,
>      by definition, not smart enough to debug it."  --Brian W.
Kernighan

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

* [U-Boot-Users] Re: [U-Boot-CVS] u-boot/drivers omap24xx_i2c.c,NONE,1.1 Makefile,1.29,1.30 ns16550.c,1.6,1.7 serial.c,1.5,1.6
  2005-01-10 16:14 [U-Boot-Users] RE: [U-Boot-CVS] u-boot/drivers omap24xx_i2c.c,NONE,1.1 Makefile,1.29,1.30 ns16550.c,1.6,1.7 serial.c,1.5,1.6 Woodruff, Richard
@ 2005-01-10 16:44 ` Cory Tusar
  2005-01-10 17:24 ` Cory Tusar
  1 sibling, 0 replies; 5+ messages in thread
From: Cory Tusar @ 2005-01-10 16:44 UTC (permalink / raw)
  To: u-boot

Woodruff, Richard wrote:

> Sorry,
> 
> I ran into the build problem long ago and fixed it locally.  I was
> preparing to resubmit a patch with a lot of additions and this one
> fix....as I was thinking Wolfgang had bypassed it.
> 
> I believe the real fix I used was in the driver itself not above.  Its
> much simpler and I think the correct one.
> 
> Regards,
> Richard W.
> 
> 
> 
> The File drivers/omap2420_i2c.c needs to look like this:
> -----------------------------------------------------------
> #include <common.h>
> 
> #ifdef CONFIG_DRIVER_OMAP24XX_I2C
> 
> #include <asm/arch/i2c.h>
> #include <asm/io.h>
> 
> #define inw(a) __raw_readw(a)
> #define outw(a,v) __raw_writew(a,v)
> 
> 
> -----------------------------------------------------------
> 
> previously it WRONGLY looked like:
> 
> #include <common.h>
> #include <asm/arch/i2c.h>
> #include <asm/io.h>
> 
> #define inw(a) __raw_readw(a)
> #define outw(a,v) __raw_writew(a,v)
> 
> #ifdef CONFIG_DRIVER_OMAP24XX_I2C

Agreed.  After a bit more testing, I found that there were preprocessor 
warnings generated due to symbols being defined multiple times between 
your i2c.h and the omap1510.h (notably inb(), outb() and the like).  I 
came up with pretty much the same solution as you, and am running a 
MAKEALL test now just to be sure there are no issues this time. 
Assuming not, I'll re-send just the above changes as a patch to resolve 
this.

Thanks.

-Cory

-- 
Cory T. Tusar
Embedded Systems Engineer
Videon Central, Inc.
2171 Sandy Drive
State College, PA 16801
(814) 235-1111 x316
(814) 235-1118 fax

"Debugging is twice as hard as writing the code in the first place.
   Therefore, if you write the code as cleverly as possible, you are,
     by definition, not smart enough to debug it."  --Brian W. Kernighan

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

* [U-Boot-Users] Re: [U-Boot-CVS] u-boot/drivers omap24xx_i2c.c,NONE,1.1 Makefile,1.29,1.30 ns16550.c,1.6,1.7 serial.c,1.5,1.6
  2005-01-10 16:14 [U-Boot-Users] RE: [U-Boot-CVS] u-boot/drivers omap24xx_i2c.c,NONE,1.1 Makefile,1.29,1.30 ns16550.c,1.6,1.7 serial.c,1.5,1.6 Woodruff, Richard
  2005-01-10 16:44 ` [U-Boot-Users] " Cory Tusar
@ 2005-01-10 17:24 ` Cory Tusar
  1 sibling, 0 replies; 5+ messages in thread
From: Cory Tusar @ 2005-01-10 17:24 UTC (permalink / raw)
  To: u-boot

Woodruff, Richard wrote:

> Sorry,
> 
> I ran into the build problem long ago and fixed it locally.  I was
> preparing to resubmit a patch with a lot of additions and this one
> fix....as I was thinking Wolfgang had bypassed it.
> 
> I believe the real fix I used was in the driver itself not above.  Its
> much simpler and I think the correct one.
> 
> Regards,
> Richard W.
> 
> 
> 
> The File drivers/omap2420_i2c.c needs to look like this:
> -----------------------------------------------------------
> #include <common.h>
> 
> #ifdef CONFIG_DRIVER_OMAP24XX_I2C
> 
> #include <asm/arch/i2c.h>
> #include <asm/io.h>
> 
> #define inw(a) __raw_readw(a)
> #define outw(a,v) __raw_writew(a,v)
> 
> 
> -----------------------------------------------------------
> 
> previously it WRONGLY looked like:
> 
> #include <common.h>
> #include <asm/arch/i2c.h>
> #include <asm/io.h>
> 
> #define inw(a) __raw_readw(a)
> #define outw(a,v) __raw_writew(a,v)
> 
> #ifdef CONFIG_DRIVER_OMAP24XX_I2C

Attached is a patch which simply includes the above fix.  This time, 
there were no other issues raised during a "MAKEALL arm" test.

Wolfgang, please apply this in lieu of the previous patch, as it's the 
simpler fix.

Thanks.

-Cory


-- 
Cory T. Tusar
Embedded Systems Engineer
Videon Central, Inc.
2171 Sandy Drive
State College, PA 16801
(814) 235-1111 x316
(814) 235-1118 fax

"Debugging is twice as hard as writing the code in the first place.
   Therefore, if you write the code as cleverly as possible, you are,
     by definition, not smart enough to debug it."  --Brian W. Kernighan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: omap24xx_i2c_header_fix.Mk-II.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20050110/caf0b80d/attachment.txt 

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

end of thread, other threads:[~2005-01-10 17:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-10 16:14 [U-Boot-Users] RE: [U-Boot-CVS] u-boot/drivers omap24xx_i2c.c,NONE,1.1 Makefile,1.29,1.30 ns16550.c,1.6,1.7 serial.c,1.5,1.6 Woodruff, Richard
2005-01-10 16:44 ` [U-Boot-Users] " Cory Tusar
2005-01-10 17:24 ` Cory Tusar
     [not found] <E1CnmIi-0002Mc-2E@sc8-pr-cvs1.sourceforge.net>
2005-01-10 15:26 ` Cory Tusar
2005-01-10 15:36   ` Jerry Van Baren

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