All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] u-boot.h/bd_t missing fields needed by Linux IBM IIC I2C Interface Driver
@ 2004-02-03  1:21 listmember at orkun.us
  2004-02-03 13:07 ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: listmember at orkun.us @ 2004-02-03  1:21 UTC (permalink / raw)
  To: u-boot

(sorry for multiple post, it got sent prematurely before I was finished.
Please reply to this one)

I have a port of u-boot for csb272 (based on PPC405GP) and I got linux
booting on it :)

For linux, I used "linuxppc-2.4" cvs tree (2.4.24-pre4) but I had to
change csb272.h to include <asm/ppcboot.h> instead of the bd_t definition
that was in csb272.h. I think the default csb272.h bt_t was setup to boot
Linux from Micromonitor which is default monitor program as shipped from
Cogent.

According to u-boot documentation u-boot.h board info structure is
backwards compatible with ppcboot one so it made sense for me to include
ppcboot.h (which was already there as checked out) instead of manually
copying the structure.

Now, I am trying to get I2C working on Linux. The following is from Linux
.config file:

#
# I2C support
#
CONFIG_I2C=y
# CONFIG_I2C_ALGOBIT is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_ALGOPCF is not set
CONFIG_I2C_IBM_IIC=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_PROC=y

However while compiling i2c_ibm_iic.c, the compiler gives error on some
fields missing from bt_t. Namely,

bi_iic_fast
bi_opb_busfreq

How, should I proceed? Should I add these to u-boot.ini and copy updated
u-boot.h to include/asm/ppc directory (where ppcboot.h resides) and
include u-boot.h in csb272.h instead of ppcboot.h?

Should I look into another I2C driver that does not use these fields?

Best regards,
Tolunay

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

* [U-Boot-Users] u-boot.h/bd_t missing fields needed by Linux IBM IIC I2C Interface Driver
  2004-02-03  1:21 [U-Boot-Users] u-boot.h/bd_t missing fields needed by Linux IBM IIC I2C Interface Driver listmember at orkun.us
@ 2004-02-03 13:07 ` Wolfgang Denk
  2004-02-03 17:28   ` listmember at orkun.us
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2004-02-03 13:07 UTC (permalink / raw)
  To: u-boot

In message <6261.216.110.51.8.1075771318.squirrel@www.orkun.us> you wrote:
> 
> How, should I proceed? Should I add these to u-boot.ini and copy updated

I have no idea what u-boot.ini is.

> u-boot.h to include/asm/ppc directory (where ppcboot.h resides) and
> include u-boot.h in csb272.h instead of ppcboot.h?

Also, I don't know where you got the "linuxppc-2.4" cvs tree from?

> Should I look into another I2C driver that does not use these fields?

No, the  fields  are  useful  and  needed.  We  added  these  to  our
"linuxppc_2_4_devel" tree some time ago:

---------------------
PatchSet 116 
Date: 2003/11/11 16:28:43
Author: wd
Branch: HEAD
Tag: (none) 
Log:
Fix I2C for 'PPChameleon' board

Members: 
	arch/ppc/platforms/ibm405ep.c:1.2->1.3 
	drivers/net/ibm_emac/ibm_ocp_enet.c:1.1->1.2 
	include/asm-ppc/ppcboot.h:1.3->1.4 

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

Best regards,

Wolfgang Denk

-- 
See us @ Embedded World, Nuremberg, Feb 17 - 19,  Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Earth -- mother of the most beautiful women in the universe.
	-- Apollo, "Who Mourns for Adonais?" stardate 3468.1

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

* [U-Boot-Users] u-boot.h/bd_t missing fields needed by Linux  IBM IIC I2C Interface Driver
  2004-02-03 13:07 ` Wolfgang Denk
@ 2004-02-03 17:28   ` listmember at orkun.us
  2004-02-03 22:33     ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: listmember at orkun.us @ 2004-02-03 17:28 UTC (permalink / raw)
  To: u-boot

>> How, should I proceed? Should I add these to u-boot.ini and copy updated
>
> I have no idea what u-boot.ini is.

Oops, sorry! I meant "u-boot.h". Silly mistake...

>> u-boot.h to include/asm/ppc directory (where ppcboot.h resides) and
>> include u-boot.h in csb272.h instead of ppcboot.h?
>
> Also, I don't know where you got the "linuxppc-2.4" cvs tree from?

I got linuxppc-2.4 from ppclinux bitkeeper trees (actually via rsync from
montavista which gets the top of the tree) because it had support for
csb272 board.

http://www.penguinppc.org/dev/kernel.shtml

>> Should I look into another I2C driver that does not use these fields?
>
> No, the  fields  are  useful  and  needed.  We  added  these  to  our
> "linuxppc_2_4_devel" tree some time ago:

linuxppc_2_4_devel did not have csb272 support. According to Dan Kegel who
did the porting linuxppc_2_4_devel tree is dead and and not maintained and
changes should go to linuxppc-2.4 instead. Also the above URL indicates
linux_2_4_devel is old.

I actually started from this originally and integrated csb272 support
(earlier version of Dan's work from another source) manually. At that time
I did not check if I2C was working. All my worry was to get the kernel up
and running.

> ---------------------
> PatchSet 116
> Date: 2003/11/11 16:28:43
> Author: wd
> Branch: HEAD
> Tag: (none)
> Log:
> Fix I2C for 'PPChameleon' board
>
> Members:
> 	arch/ppc/platforms/ibm405ep.c:1.2->1.3
> 	drivers/net/ibm_emac/ibm_ocp_enet.c:1.1->1.2
> 	include/asm-ppc/ppcboot.h:1.3->1.4
>
> ---------------------

Where can I get these changes? Is this your copy of linuxppc_2_4_devel or
(so-called) official tree?

Best regards,
Tolunay

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

* [U-Boot-Users] u-boot.h/bd_t missing fields needed by Linux IBM IIC I2C Interface Driver
  2004-02-03 17:28   ` listmember at orkun.us
@ 2004-02-03 22:33     ` Wolfgang Denk
  2004-02-04  2:12       ` listmember at orkun.us
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2004-02-03 22:33 UTC (permalink / raw)
  To: u-boot

In message <13382.24.206.119.24.1075829319.squirrel@www.orkun.us> you wrote:
> 
> > Also, I don't know where you got the "linuxppc-2.4" cvs tree from?
> 
> I got linuxppc-2.4 from ppclinux bitkeeper trees (actually via rsync from
> montavista which gets the top of the tree) because it had support for
> csb272 board.

I see.

> > No, the  fields  are  useful  and  needed.  We  added  these  to  our
> > "linuxppc_2_4_devel" tree some time ago:
> 
> linuxppc_2_4_devel did not have csb272 support. According to Dan Kegel who
> did the porting linuxppc_2_4_devel tree is dead and and not maintained and
> changes should go to linuxppc-2.4 instead. Also the above URL indicates
> linux_2_4_devel is old.

Well, feel free to ignore it, then. All I was trying to do is showing
you where you can find a  (tested  and  working)  solution  for  your
problem. Feel free to use the "new" and "living" linuxppc-2.4 source tree
which does not contain the fixes you need.


> Where can I get these changes? Is this your copy of linuxppc_2_4_devel or
> (so-called) official tree?

As I wrote before: this is in the "linuxppc_2_4_devel" module on  our
CVS server.

Best regards,

Wolfgang Denk

-- 
See us @ Embedded World, Nuremberg, Feb 17 - 19,  Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
You are only young once, but you can stay immature indefinitely.

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

* [U-Boot-Users] u-boot.h/bd_t missing fields needed by Linux  IBM IIC I2C Interface Driver
  2004-02-03 22:33     ` Wolfgang Denk
@ 2004-02-04  2:12       ` listmember at orkun.us
  2004-02-04 11:49         ` Brian Waite
  0 siblings, 1 reply; 7+ messages in thread
From: listmember at orkun.us @ 2004-02-04  2:12 UTC (permalink / raw)
  To: u-boot

> In message <13382.24.206.119.24.1075829319.squirrel@www.orkun.us> you
> wrote:
>>
>> > No, the  fields  are  useful  and  needed.  We  added  these  to  our
>> > "linuxppc_2_4_devel" tree some time ago:
>>
>> linuxppc_2_4_devel did not have csb272 support. According to Dan Kegel
>> who
>> did the porting linuxppc_2_4_devel tree is dead and and not maintained
>> and
>> changes should go to linuxppc-2.4 instead. Also the above URL indicates
>> linux_2_4_devel is old.
>
> Well, feel free to ignore it, then. All I was trying to do is showing
> you where you can find a  (tested  and  working)  solution  for  your
> problem. Feel free to use the "new" and "living" linuxppc-2.4 source tree
> which does not contain the fixes you need.

No, I was not implying anything or trying to be rude. I just reported what
I was told and initially though I should use linuxppc_2_4_devel from
linuxppc trees. It is a pity that all this stuff is scattered all around
each having bits and pieces I need but none is complete (to build CSB272
kernel) :(

>> Where can I get these changes? Is this your copy of linuxppc_2_4_devel
>> or
>> (so-called) official tree?
>
> As I wrote before: this is in the "linuxppc_2_4_devel" module on  our
> CVS server.

Sorry, it was not clear to me. Anyway, I copied ppcboot.h and
i2c-ibm_iic.c (due to different field name - one line change) from your
tree to the linuxppc tree and it worked. However, the new fields were not
intialized properly so driver somehow defaulted to sane values :) I am
using u-boot 1.0 . I guess I need to checkout u-boot from CVS and apply my
csb272 board changes to have them initialized properly. right?

Best regards,
Tolunay

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

* [U-Boot-Users] u-boot.h/bd_t missing fields needed by Linux  IBM IIC I2C Interface Driver
  2004-02-04  2:12       ` listmember at orkun.us
@ 2004-02-04 11:49         ` Brian Waite
  2004-02-04 17:53           ` listmember at orkun.us
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Waite @ 2004-02-04 11:49 UTC (permalink / raw)
  To: u-boot

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tolunay,
	May I suggest that after you are done testing the kernel changes that you 
post a patch for inclusion to the linuxppc-2.4 tree onto the ppc dev mailing 
list. I agree the number of PPC trees, and their, relevance on a given day is 
hard to follow, but hopefully the linuxppc-2.4 tree can stay for a while. The 
only way to get changes into this tree though is for someone to test and 
incorporate them. It is tough, I know. I am still trying to get things into 
the 2.4 kernel, but that is the way of the kernel. If no one puts a little 
sweat to get it included, then it will never get included. Just my 2 cents
Thanks
Brian
On Tuesday 03 February 2004 09:12 pm, listmember at orkun.us wrote:
> > In message <13382.24.206.119.24.1075829319.squirrel@www.orkun.us> you
> >
> > wrote:
> >> > No, the  fields  are  useful  and  needed.  We  added  these  to  our
> >> > "linuxppc_2_4_devel" tree some time ago:
> >>
> >> linuxppc_2_4_devel did not have csb272 support. According to Dan Kegel
> >> who
> >> did the porting linuxppc_2_4_devel tree is dead and and not maintained
> >> and
> >> changes should go to linuxppc-2.4 instead. Also the above URL indicates
> >> linux_2_4_devel is old.
> >
> > Well, feel free to ignore it, then. All I was trying to do is showing
> > you where you can find a  (tested  and  working)  solution  for  your
> > problem. Feel free to use the "new" and "living" linuxppc-2.4 source tree
> > which does not contain the fixes you need.
>
> No, I was not implying anything or trying to be rude. I just reported what
> I was told and initially though I should use linuxppc_2_4_devel from
> linuxppc trees. It is a pity that all this stuff is scattered all around
> each having bits and pieces I need but none is complete (to build CSB272
> kernel) :(
>
> >> Where can I get these changes? Is this your copy of linuxppc_2_4_devel
> >> or
> >> (so-called) official tree?
> >
> > As I wrote before: this is in the "linuxppc_2_4_devel" module on  our
> > CVS server.
>
> Sorry, it was not clear to me. Anyway, I copied ppcboot.h and
> i2c-ibm_iic.c (due to different field name - one line change) from your
> tree to the linuxppc tree and it worked. However, the new fields were not
> intialized properly so driver somehow defaulted to sane values :) I am
> using u-boot 1.0 . I guess I need to checkout u-boot from CVS and apply my
> csb272 board changes to have them initialized properly. right?
>
> Best regards,
> Tolunay
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQFAINw0mxLCz0u+Ko8RAiHGAJ4qaDYryRe3KwKQhPAlfiHsjjRwNgCfQ8TO
Q+tmx2/lPU82LKYWpWXIibU=
=/8y1
-----END PGP SIGNATURE-----

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

* [U-Boot-Users] u-boot.h/bd_t missing fields needed by Linux   IBM IIC I2C Interface Driver
  2004-02-04 11:49         ` Brian Waite
@ 2004-02-04 17:53           ` listmember at orkun.us
  0 siblings, 0 replies; 7+ messages in thread
From: listmember at orkun.us @ 2004-02-04 17:53 UTC (permalink / raw)
  To: u-boot

Brian,

I would like to submit the changes but now there is a conflict because one
field in board info structure that is named different.

The one in linuxppc tree uses bi_opb_busfreq while DENX tree uses
bi_opbfreq. This affects one line in linuxppc tree's i2c-ibm_iic.c.

If I were to patch the i2c-ibm_iic.c on linuxppc tree I would break others
that had the field other way (thus I would need to patch all other
platforms as well). If I just patch the ppcboot.h in linuxppc tree than I
would create inconsistency between DENX and linuxppc trees as well as the
u-boot.h.

So, I am not sure what is the best way to handle it. I do not know why the
field name diverged between the two trees. I am looking for a solution
that is acceptable for everyone and also consistent of u-boot.h

I believe Wolfgang is most qualified to advise on this situation...

Best regards,
Tolunay

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Tolunay,
> 	May I suggest that after you are done testing the kernel changes that you
> post a patch for inclusion to the linuxppc-2.4 tree onto the ppc dev
> mailing
> list. I agree the number of PPC trees, and their, relevance on a given day
> is
> hard to follow, but hopefully the linuxppc-2.4 tree can stay for a while.
> The
> only way to get changes into this tree though is for someone to test and
> incorporate them. It is tough, I know. I am still trying to get things
> into
> the 2.4 kernel, but that is the way of the kernel. If no one puts a little
> sweat to get it included, then it will never get included. Just my 2 cents
> Thanks
> Brian
> On Tuesday 03 February 2004 09:12 pm, listmember at orkun.us wrote:
>> > In message <13382.24.206.119.24.1075829319.squirrel@www.orkun.us> you
>> >
>> > wrote:
>> >> > No, the  fields  are  useful  and  needed.  We  added  these  to
>> our
>> >> > "linuxppc_2_4_devel" tree some time ago:
>> >>
>> >> linuxppc_2_4_devel did not have csb272 support. According to Dan
>> Kegel
>> >> who
>> >> did the porting linuxppc_2_4_devel tree is dead and and not
>> maintained
>> >> and
>> >> changes should go to linuxppc-2.4 instead. Also the above URL
>> indicates
>> >> linux_2_4_devel is old.
>> >
>> > Well, feel free to ignore it, then. All I was trying to do is showing
>> > you where you can find a  (tested  and  working)  solution  for  your
>> > problem. Feel free to use the "new" and "living" linuxppc-2.4 source
>> tree
>> > which does not contain the fixes you need.
>>
>> No, I was not implying anything or trying to be rude. I just reported
>> what
>> I was told and initially though I should use linuxppc_2_4_devel from
>> linuxppc trees. It is a pity that all this stuff is scattered all around
>> each having bits and pieces I need but none is complete (to build CSB272
>> kernel) :(
>>
>> >> Where can I get these changes? Is this your copy of
>> linuxppc_2_4_devel
>> >> or
>> >> (so-called) official tree?
>> >
>> > As I wrote before: this is in the "linuxppc_2_4_devel" module on  our
>> > CVS server.
>>
>> Sorry, it was not clear to me. Anyway, I copied ppcboot.h and
>> i2c-ibm_iic.c (due to different field name - one line change) from your
>> tree to the linuxppc tree and it worked. However, the new fields were
>> not
>> intialized properly so driver somehow defaulted to sane values :) I am
>> using u-boot 1.0 . I guess I need to checkout u-boot from CVS and apply
>> my
>> csb272 board changes to have them initialized properly. right?
>>
>> Best regards,
>> Tolunay
>>
>>
>> -------------------------------------------------------
>> The SF.Net email is sponsored by EclipseCon 2004
>> Premiere Conference on Open Tools Development and Integration
>> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
>> http://www.eclipsecon.org/osdn
>> _______________________________________________
>> U-Boot-Users mailing list
>> U-Boot-Users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQFAINw0mxLCz0u+Ko8RAiHGAJ4qaDYryRe3KwKQhPAlfiHsjjRwNgCfQ8TO
> Q+tmx2/lPU82LKYWpWXIibU=
> =/8y1
> -----END PGP SIGNATURE-----
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>

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

end of thread, other threads:[~2004-02-04 17:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-03  1:21 [U-Boot-Users] u-boot.h/bd_t missing fields needed by Linux IBM IIC I2C Interface Driver listmember at orkun.us
2004-02-03 13:07 ` Wolfgang Denk
2004-02-03 17:28   ` listmember at orkun.us
2004-02-03 22:33     ` Wolfgang Denk
2004-02-04  2:12       ` listmember at orkun.us
2004-02-04 11:49         ` Brian Waite
2004-02-04 17:53           ` listmember at orkun.us

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.