Skip to contentSkip to conversation

Kernel for MPC Lite 5200 will not compile

DISCUSSION Matthias Fechner 5 participants 22 messages Mar 28, 2006 – Apr 2, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

I installed today ELDK 4.0 for the LITE5200 board (icecube). ./install -d /usr/local/eldk ppc_6xx

After compiling u-boot and playing a little bit with it, i tried to compile the kernel 2.6.

For this I used the git repository.
I copied the file arch/ppc/configs/lite5200_defconfig to .config, and tried the following one:
make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

But i got a failure with the following error message:
CC arch/ppc/syslib/bestcomm/bestcomm.o arch/ppc/syslib/bestcomm/bestcomm.c: In function 'mpc52xx_sdma_probe':
arch/ppc/syslib/bestcomm/bestcomm.c:269: warning: implicit declaration of function 'to_platform_device' arch/ppc/syslib/bestcomm/bestcomm.c:269: warning: initialization makes pointer from integer without a cast arch/ppc/syslib/bestcomm/bestcomm.c:278: warning: implicit declaration of function 'platform_get_resource' arch/ppc/syslib/bestcomm/bestcomm.c:278: warning: assignment makes pointer from integer without a cast arch/ppc/syslib/bestcomm/bestcomm.c:279: warning: assignment makes pointer from integer without a cast arch/ppc/syslib/bestcomm/bestcomm.c: At top level:
arch/ppc/syslib/bestcomm/bestcomm.c:367: error: 'platform_bus_type' undeclared here (not in a function) make[2]: *** [arch/ppc/syslib/bestcomm/bestcomm.o] Fehler 1
make[1]: *** [arch/ppc/syslib/bestcomm] Fehler 2
make: *** [arch/ppc/syslib] Fehler 2

What is wrong here, I think i did an error on any step...

Thx for help!

Best regards,
Matthias

#1 lore raw

try make lite5200_defconfig instead of copying it to .config or make oldconfig after copying ti to .config

Quoted 45 lines · Matthias Fechner

Hi,

I installed today ELDK 4.0 for the LITE5200 board (icecube). ./install -d /usr/local/eldk ppc_6xx

After compiling u-boot and playing a little bit with it, i tried to compile the kernel 2.6.

For this I used the git repository.
I copied the file arch/ppc/configs/lite5200_defconfig to .config, and tried the following one:
make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

But i got a failure with the following error message:
CC arch/ppc/syslib/bestcomm/bestcomm.o
arch/ppc/syslib/bestcomm/bestcomm.c: In function 'mpc52xx_sdma_probe':
arch/ppc/syslib/bestcomm/bestcomm.c:269: warning: implicit declaration of function 'to_platform_device' arch/ppc/syslib/bestcomm/bestcomm.c:269: warning: initialization makes pointer from integer without a cast arch/ppc/syslib/bestcomm/bestcomm.c:278: warning: implicit declaration of function 'platform_get_resource' arch/ppc/syslib/bestcomm/bestcomm.c:278: warning: assignment makes pointer from integer without a cast arch/ppc/syslib/bestcomm/bestcomm.c:279: warning: assignment makes pointer from integer without a cast arch/ppc/syslib/bestcomm/bestcomm.c: At top level:
arch/ppc/syslib/bestcomm/bestcomm.c:367: error: 'platform_bus_type' undeclared here (not in a function)
make[2]: *** [arch/ppc/syslib/bestcomm/bestcomm.o] Fehler 1 make[1]: *** [arch/ppc/syslib/bestcomm] Fehler 2
make: *** [arch/ppc/syslib] Fehler 2

What is wrong here, I think i did an error on any step...

Thx for help!

Best regards,
Matthias
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

#2 lore raw

Hello John,

Quoted 2 lines · John Rigby

try make lite5200_defconfig instead of copying it to .config or make oldconfig after copying ti to .config

I tried now several combinations with:
make ARCH=ppc CROSS_COMPILE=ppc_6xx- lite5200_defconfig make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

then coping the file to .config and
make ARCH=ppc CROSS_COMPILE=ppc_6xx- oldconfig make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

but it always leads to the same error message...

Best regards,
Matthias

#3 lore raw

Sorry I'm not sure what the state of 5200 support in the eldk. I know that Wolfgang
has said that 2.6 is not supported though. You may want to try out Sylvains

kernel: http://gitbits.246tnt.com/gitbits/linux-2.6-mpc52xx.git

You can search in list for Syvains instructions on how to use it.

Quoted 24 lines · Matthias Fechner

Hello John,

Quoted 2 lines · John Rigby

try make lite5200_defconfig instead of copying it to .config or make oldconfig after copying ti to .config

I tried now several combinations with:
make ARCH=ppc CROSS_COMPILE=ppc_6xx- lite5200_defconfig make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

then coping the file to .config and
make ARCH=ppc CROSS_COMPILE=ppc_6xx- oldconfig make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

but it always leads to the same error message...

Best regards,
Matthias
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

#4 lore raw

Hi Matthias,

You might want to try the "quick start" section of
http://www.246tnt.com/mpc52xx/

The last compile I tried worked just fine ... You just needed to be sure CONFIG_NET is
enabled (even if you don't use network ... the issue is known and being taken care of,
I've seen some posts of Russel King and Andrew Morton about it).

If it still doesnt work, report it and I'll have a closer look. Maybe something changed
recently and I didn't update my tree since a few days ...

Sylvain

Quoted 43 lines · John Rigby

Sorry I'm not sure what the state of 5200 support in the eldk. I know that Wolfgang
has said that 2.6 is not supported though. You may want to try out Sylvains
kernel: http://gitbits.246tnt.com/gitbits/linux-2.6-mpc52xx.git

You can search in list for Syvains instructions on how to use it.

On 3/28/06, *Matthias Fechner* <[email protected] <mailto:[email protected]>> wrote:

Hello John,

* John Rigby <[email protected] <mailto:[email protected]>> [27-03-06 18:01]:
> try make lite5200_defconfig instead of copying it to .config > or make oldconfig after copying ti to .config

I tried now several combinations with:
make ARCH=ppc CROSS_COMPILE=ppc_6xx- lite5200_defconfig make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

then coping the file to .config and make ARCH=ppc CROSS_COMPILE=ppc_6xx- oldconfig make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

but it always leads to the same error message...

Best regards,
Matthias
_______________________________________________
Linuxppc-embedded mailing list [email protected] <mailto:[email protected]>
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

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

_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

#6 lore raw
In reply to Sylvain Munaut

Hello Sylvain,

Quoted 3 lines · Sylvain Munaut

If it still doesnt work, report it and I'll have a closer look. Maybe something changed
recently and I didn't update my tree since a few days ...

ok, I have now the board to really test it.
I tried to boot over NFS, the kernel was loaded successfully but it will not really boot, I got:
--- cut ---
U-Boot 1.1.4 (Jan 23 2006 - 11:03:09)

CPU: MPC5200 v1.2 at 396 MHz
Bus 132 MHz, IPB 66 MHz, PCI 33 MHz
Board: Motorola MPC5200 (IceCube)
I2C: 85 kHz, ready
DRAM: 64 MB
FLASH: 16 MB
PCI: Bus Dev VenId DevId Class Int
00 1a 1057 5803 0680 00
In: serial
Out: serial
Err: serial
Net: FEC ETHERNET
IDE: Bus 0: not available

Autostarting.V13_02_06_OP. Press any key to abort..

Hit any key to stop autoboot: 0
Using FEC ETHERNET device
TFTP from server 192.168.0.151; our IP address is 192.168.0.101 Filename 'MPC5200/uImage'.
Load address: 0x200000
Loading: #################################################################

         #################################################################
         #################################################################
         ############
done
Bytes transferred = 1057133 (10216d hex)
## Booting image at 00200000 ...
   Image Name:   Linux-2.6.16-rc1-gaf4f75fd
   Created:      2006-03-29  16:45:14 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1057069 Bytes =  1 MB

Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
id mach(): done
MMU:enter
MMU:hw init
MMU:mapin
MMU:setio
MMU:exit
setup_arch: enter
setup_arch: bootmem
arch: exit
--- cut ---

After this the board wait for something until it will reboot.
I have the following variables set in U-Boot:
--- cut ---
baudrate=115200
ethact=FEC ETHERNET
1ipaddr=192.168.10.101
ethaddr=00:04:9F:00:11:02
stdin=serial
stdout=serial
stderr=serial
bootcmd=tftp 200000; bootm 200000
preboot=echo;echo Autostarting. Press any key to abort..;echo
serverip=192.168.0.151
ipaddr=192.168.0.101
netmask=255.255.255.0
bootdelay=5
hostname=icecube
nfsroot=root=/dev/nfs rw nfsroot=192.168.0.151:/usr/local/eldk/ppc_6xx ip=ip=192.168.0.101:192.168.0.151:192.168.0.151:255.255.255.0:icecube::off
flashroot=root=/dev/mtdblock2 rw
rootfs=root=/dev/nfs rw nfsroot=192.168.0.151:/usr/local/eldk/ppc_6xx
bootfile=MPC5200/uImage
bootargs=root=/dev/nfs rw nfsroot=192.168.0.151:/usr/local/eldk/ppc_6xx ip=192.168.0.101:192.168.0.151:192.168.0.151:255.255.255.0:icecube::off --- cut ---

The kernel is built with nfs support:
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
# CONFIG_NFS_DIRECTIO is not set
# CONFIG_NFSD is not set
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
CONFIG_RPCSEC_GSS_KRB5=y

I tried to find if the networkcard from the board will work, but I cannot find a driver in the kernel for it.
What can be the problem for this?

Thx a lot!

Best regards,
Matthias

#7 lore raw
Quoted 4 lines · Matthias Fechner

Hello Sylvain,

* Sylvain Munaut <[email protected]> [28-03-06 22:47]:

Quoted 9 lines
Quoted 4 lines

If it still doesnt work, report it and I'll have a closer look. Maybe something changed
recently and I didn't update my tree since a few days ...

ok, I have now the board to really test it.
I tried to boot over NFS, the kernel was loaded successfully but it will not really boot, I got:

Well, if you didn't find the network driver then booting over NFS is not gonna happen ...
and since (see below) you didn't configure the console properly either, you can't
even see the error message ...

Quoted 3 lines

bootargs=root=/dev/nfs rw nfsroot=192.168.0.151:/usr/local/eldk/ppc_6xx ip=192.168.0.101:192.168.0.151:192.168.0.151:255.255.255.0:icecube::off

As I said earlier in this thread, you need console=ttyPSC0 in your kernel command line, else, you
just won't see anything on the serial except very early debug.

Quoted 4 lines

I tried to find if the networkcard from the board will work, but I cannot find a driver in the kernel for it.
What can be the problem for this?

Well, you didn't pull from the bestcomm head maybe ?

PS: Please cc me when answering ... without it I might miss the mail ...

Sylvain

#8 lore raw

Hallo Sylvain,

Quoted 1 line · Sylvain Munaut

PS: Please cc me when answering ... without it I might miss the mail ...

thx for your answer. I was today able to get the board running. Now I can login.

Thx a lot for your help!

Best regards,
Matthias

Signature · 3 lines
"Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the universe trying to produce
bigger and better idiots. So far, the universe is winning." -- Rich Cook
#9 lore raw
In reply to John Rigby
Quoted 4 lines · In message <[email protected]> you…

Sorry I'm not sure what the state of 5200 support in the eldk. I know that Wolfgang
has said that 2.6 is not supported though. You may want to try out Sylvains

Well, that's exxactly the state: not supported (i. e. known to be broken).

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Quotation, n. The act of repeating erroneously the words of  another.
The  words  erroneously  repeated.
                            - Ambrose Bierce _The Devil's Dictionary_
#11 lore raw
In reply to Matthias Fechner
Quoted 2 lines · In message <[email protected]> you wrote:

I installed today ELDK 4.0 for the LITE5200 board (icecube).

There is no "ELDK 4.0 for the LITE5200 board".

Quoted 1 line

./install -d /usr/local/eldk ppc_6xx

This installas ELDK 4.0 for PPC 6xx processors. Nothing less, but nothing more either.

Quoted 2 lines

After compiling u-boot and playing a little bit with it, i tried to compile the kernel 2.6.

Which kernel tree are you using? There is no support for MPC5200 in the DENX Linux tree. Well, some code is there, as there is in the public 2.6 kernel tree, but it's known to be broken and not supported by us.

Quoted 1 line

For this I used the git repository.

Which one?

Quoted 3 lines

I copied the file arch/ppc/configs/lite5200_defconfig to .config, and tried the following one:
make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

That's not the official way to build images.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
We, the unwilling, led by the unknowing, are doing the impossible for
the ungrateful. We have done so much, for so long, with so little, we
are now qualified to do anything with nothing.
#12 lore raw

Hello Wolfgang,

Quoted 4 lines · Wolfgang Denk

Which kernel tree are you using? There is no support for MPC5200 in the DENX Linux tree. Well, some code is there, as there is in the public 2.6 kernel tree, but it's known to be broken and not supported by us.

i tried the following trees:
linux-2.6.15 (from kernel.org)
linux-2.6-denx (from cg-clone http://www.denx.de/git/<project_name>)
linux-2.6-denx-git (see above)
linuxppc_2_4_mpc5200 (see above)

on the 2.4 kernel i got a different errormessage, but now with the kernel linux-2.6-mpc52xx.git from Sylvain everthing seems to work fine, I need to test it at first. :) But I think this will take now some time from now.

Quoted 3 lines
Quoted 1 line

For this I used the git repository.

Which one?

see above

Quoted 5 lines
Quoted 3 lines

I copied the file arch/ppc/configs/lite5200_defconfig to .config, and tried the following one:
make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

That's not the official way to build images.

oh, sry I played with crosscompiling the firt time, it would be a pleasure for me if you could correct me.

Best regards,
Matthias

#13 lore raw

Dear Matthias,

Quoted 4 lines · in message <[email protected]> you wrote:

i tried the following trees:
linux-2.6.15 (from kernel.org)
linux-2.6-denx (from cg-clone http://www.denx.de/git/<project_name>)

MPC5200 support known to be broken in these two.

Quoted 1 line

linux-2.6-denx-git (see above)

Does not exist...

Quoted 1 line

linuxppc_2_4_mpc5200 (see above)

Is NOT a git repository and marked as obsolete.

The only stable tree we offer for 5200 is the linuxppc_2_4_devel tree.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

I copied the file arch/ppc/configs/lite5200_defconfig to .config, and tried the following one:
make ARCH=ppc CROSS_COMPILE=ppc_6xx- uImage

That's not the official way to build images.

oh, sry I played with crosscompiling the firt time, it would be a pleasure for me if you could correct me.

Read the README, and probably the DULG. You missed at leat the "make oldconfig" step which is essential.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Blast medicine anyway!  We've learned to tie into every organ in the
human body but one.  The brain!  The brain is what life is all about.
	-- McCoy, "The Menagerie", stardate 3012.4
#14 lore raw
Quoted 11 lines · Wolfgang Denk

Dear Matthias,

Quoted 4 lines · in message <[email protected]> you wrote:

i tried the following trees:
linux-2.6.15 (from kernel.org)
linux-2.6-denx (from cg-clone http://www.denx.de/git/<project_name>)

MPC5200 support known to be broken in these two.

It is ?

I don't know about the 2.6-denx, but the stock 2.6.15 should work just fine. What's wrong with it ? (except it misses some drivers ... it should compile and boot just fine)

Sylvain

#15 lore raw
Quoted 2 lines · In message <[email protected]> you wrote:

It is ?

I think so.

Quoted 3 lines

I don't know about the 2.6-denx, but the stock 2.6.15 should work just fine. What's wrong with it ? (except it misses some drivers ... it should compile and boot just fine)

Isn't the current reengineered implementation of the BestComm code based on an very old Freescale version, which has known limitations and problems?

Or has there any action resulted out of the discussion with the Freescale engineers, and I have missed it?

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
In accord with UNIX philosophy, Perl gives you enough  rope  to  hang
yourself.              - L. Wall & R. L. Schwartz, _Programming Perl_
#16 lore raw
Quoted 7 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you wrote:

It is ?

I think so.

The stock 2.6.15 doesn't have bestcomm.

Quoted 6 lines
Quoted 5 lines

I don't know about the 2.6-denx, but the stock 2.6.15 should work just fine. What's wrong with it ? (except it misses some drivers ... it should compile and boot just fine)

Quoted 7 lines

Isn't the current reengineered implementation of the BestComm code based on an very old Freescale version, which has known limitations and problems?

Or has there any action resulted out of the discussion with the Freescale engineers, and I have missed it?

The microcode is updated each time I get a new copy from Freescale and the last time I checked it was up to date is when John Rigby sent me a copy of the
latest one.
Freescale doesn't change the software interface of the microcode tasks that much so upgrading isn't that hard.

Regards,

Sylvain

#17 lore raw
In reply to Wolfgang Denk

Sent this to Wolfgang last night. Accidently omitted Syvain and the list.

The actual bestcomm "microcode" in Sylvain's tree is the same as the latest Freescale supported code. The linux driver code that interfaces with it is code written by Dale Farnsworth and has Montavista copyright. I don't know if it is based on old Freescale (Motorola) code or if it is Dale's creation (perhaps Dale can comment).

I have just spent some time getting UDMA support into the ATA driver using the the bestcomm code in Sylvain's tree. In the process I found some bugs in the code that may explain some problems people have seen with the FEC driver. I'll try to get the patch out tomorrow.

The ATA driver is a port from a version that worked on an older kernel and used the supported Freescale Bestcomm code. I did the port because it was my understanding that attempts to get the supported Freescale code into a public tree had met with resistance in the past. (Second hand info, I'm actually fairly new to the 52xx world).

The pluses for the Freescale version is that several devices are supported that are not in Sylvain's tree. The version in Sylvain's kernel has a generic api plus specific code for FEC. My upcoming patch fixes some bugs, adds some missing functionality that I need for ATA and adds the specific ATA dma driver code.

The biggest minus for the Freescale version is that it is really opaque. Its implementation makes it hard to figure out what the code is actually doing.

If there is a chance of getting the Freescale Bestcomm code into Sylvain's tree (and on up the line to Linus) I would welcome that since I would not have to port other Bestcomm dependent drivers to the version in Sylvain's tree. I would gladly port the current FEC code to the Freescale Bestcomm code to avoid the work of porting the other drivers. Also we at Freescale would prefer to have one version of the Bestcomm code circulating.

So I guess my question for those with an opinion is what version of Bestcomm should be we use for 5200.

Thanks for your input
John

Quoted 34 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you wrote:

It is ?

I think so.

Quoted 1 line

I don't know about the 2.6-denx, but the stock 2.6.15 should work just

fine.

Quoted 1 line

What's wrong with it ? (except it misses some drivers ... it should

compile

Quoted 1 line

and boot just fine)

Isn't the current reengineered implementation of the BestComm code based on an very old Freescale version, which has known limitations and problems?

Or has there any action resulted out of the discussion with the Freescale engineers, and I have missed it?

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] In accord with UNIX philosophy, Perl gives you enough rope to hang
yourself. - L. Wall & R. L. Schwartz, _Programming Perl_
_______________________________________________
Linuxppc-embedded mailing list [email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

#18 lore raw

After thinking about this more....I don't want to push getting the official Freescale code into the tree. If Dale's code works as well as the Freescale code then lets stay with it because it is a lot cleaner. The effort of porting other drivers will hopefully be easier now that I have the experience of having done ATA.

Quoted 81 lines · John Rigby

Sent this to Wolfgang last night. Accidently omitted Syvain and the list.

The actual bestcomm "microcode" in Sylvain's tree is the same as the latest Freescale supported code. The linux driver code that interfaces with it is code written by Dale Farnsworth and has Montavista copyright. I don't know if it is based on old Freescale (Motorola) code or if it is Dale's creation (perhaps Dale can comment).

I have just spent some time getting UDMA support into the ATA driver using the the bestcomm code in Sylvain's tree. In the process I found some bugs in the code that may explain some problems people have seen with the FEC driver. I'll try to get the patch out tomorrow.

The ATA driver is a port from a version that worked on an older kernel and used the supported Freescale Bestcomm code. I did the port because it was my understanding that attempts to get the supported Freescale code into a public tree had met with resistance in the past. (Second hand info, I'm actually fairly new to the 52xx world).

The pluses for the Freescale version is that several devices are supported that are not in Sylvain's tree. The version in Sylvain's kernel has a generic api plus specific code for FEC. My upcoming patch fixes some bugs, adds some missing functionality that I need for ATA and adds the specific ATA dma driver code.

The biggest minus for the Freescale version is that it is really opaque. Its implementation makes it hard to figure out what the code is actually doing.

If there is a chance of getting the Freescale Bestcomm code into Sylvain's tree (and on up the line to Linus) I would welcome that since I would not have to port other Bestcomm dependent drivers to the version in Sylvain's tree. I would gladly port the current FEC code to the Freescale Bestcomm code to avoid the work of porting the other drivers. Also we at Freescale would prefer to have one version of the Bestcomm code circulating.

So I guess my question for those with an opinion is what version of Bestcomm should be we use for 5200.

Thanks for your input
John

Quoted 33 lines · Wolfgang Denk
Quoted 2 lines · In message < [email protected]> you wrote:

It is ?

I think so.

Quoted 1 line

I don't know about the 2.6-denx, but the stock 2.6.15 should work just

fine.

Quoted 1 line

What's wrong with it ? (except it misses some drivers ... it should

compile

Quoted 1 line

and boot just fine)

Isn't the current reengineered implementation of the BestComm code based on an very old Freescale version, which has known limitations and problems?

Or has there any action resulted out of the discussion with the Freescale engineers, and I have missed it?

Best regards,

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] In accord with UNIX philosophy, Perl gives you enough rope to hang
yourself. - L. Wall & R. L. Schwartz, _Programming Perl_
_______________________________________________
Linuxppc-embedded mailing list [email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

#19 lore raw
Quoted 3 lines · Jon Rigby

After thinking about this more....I don't want to push getting the official Freescale code into the tree. If Dale's code works as well as the Freescale code then lets stay with it because it is a lot cleaner.

Thanks.

Quoted 2 lines

The effort of porting other drivers will hopefully be easier now that I have the experience of having done ATA.

Would Freescale be amenable to working toward a revised, common, API? Unfortunately, I didn't find the Freescale Bestcomm API to be clean enough for acceptance into Linux, so changes would be needed.

-Dale

#20 lore raw

Even if the current Freescale code were cleaned up the basic design is ugly. The C preprocessor hell it goes through along with the indirection is a high price to pay for the generalitiy it buys in terms of the task var/inc setting.

On the licensing side, it has been changed to an MIT license so it can be included in the kernel but third parties can use it in there non GPL OSs without problem.

For now lets just stay with your code and I will work on getting other drivers to use it.

Quoted 2 lines · Dale Farnsworth
Quoted 1 line · Jon Rigby

After thinking about this more....I don't want to push getting the offi=

cial

Quoted 1 line
Quoted 1 line

Freescale code into the tree. If Dale's code works as well as the Free=

scale

Quoted 9 lines
Quoted 1 line

code then lets stay with it because it is a lot cleaner.

Thanks.

Quoted 2 lines

The effort of porting other drivers will hopefully be easier now that I have the experience of having done ATA.

Would Freescale be amenable to working toward a revised, common, API? Unfortunately, I didn't find the Freescale Bestcomm API to be clean enoug=

h

Quoted 4 lines

for acceptance into Linux, so changes would be needed.

-Dale

#21 lore raw
In reply to John Rigby
Quoted 7 lines · John Rigby

Sent this to Wolfgang last night. Accidently omitted Syvain and the list.

The actual bestcomm "microcode" in Sylvain's tree is the same as the latest Freescale supported code. The linux driver code that interfaces with it is code written by Dale Farnsworth and has Montavista copyright. I don't know if it is based on old Freescale (Motorola) code or if it is Dale's creation (perhaps Dale can comment).

My bestcomm code is not based on the Freescale code. I did have access to the Freescale (Motorola) code when I wrote it, but I think you'll find that there is *very little* similarity between the two code bases.

Quoted 17 lines

I have just spent some time getting UDMA support into the ATA driver using the the bestcomm code in Sylvain's tree. In the process I found some bugs in the code that may explain some problems people have seen with the FEC driver. I'll try to get the patch out tomorrow.

The ATA driver is a port from a version that worked on an older kernel and used the supported Freescale Bestcomm code. I did the port because it was my understanding that attempts to get the supported Freescale code into a public tree had met with resistance in the past. (Second hand info, I'm actually fairly new to the 52xx world).

The pluses for the Freescale version is that several devices are supported that are not in Sylvain's tree. The version in Sylvain's kernel has a generic api plus specific code for FEC. My upcoming patch fixes some bugs, adds some missing functionality that I need for ATA and adds the specific ATA dma driver code.

Quoted 3 lines

The biggest minus for the Freescale version is that it is really opaque. Its implementation makes it hard to figure out what the code is actually doing.

Yes, this makes it difficult to maintain and is what has kept the Freescale Bestcomm code from being accepted into the kernel. I would have preferred not to write an alternate version, but, at the time, Motorola had a take-or-leave-it stance; they wouldn't consider accepting patches to clean it up. So then I planned to simply fork their version, but found the code so convoluted that it was easier to start from scratch.

Quoted 9 lines

If there is a chance of getting the Freescale Bestcomm code into Sylvain's tree (and on up the line to Linus) I would welcome that since I would not have to port other Bestcomm dependent drivers to the version in Sylvain's tree. I would gladly port the current FEC code to the Freescale Bestcomm code to avoid the work of porting the other drivers. Also we at Freescale would prefer to have one version of the Bestcomm code circulating.

So I guess my question for those with an opinion is what version of Bestcomm should be we use for 5200.

It would be better to have one version, and my bestcomm code could be replaced in Linux by code derived from the current Freescale code. The challenges are political. Neither Freescale nor the Linux community is willing to relinquish control of their code to the other. Potentially, this can be addressed by having a Freescaler, who is responsive to the Linux community, be a Linux maintainer for the bestcomm code. There are also licensing concerns though, since Freescale needs to also license their code under non-GPL terms.

Until these challenges are resolved, I think we're stuck with two versions.

Thanks,
-Dale