Re: [U-Boot] building enc28j60 for omap3: undefined references

2011-02-18 Thread jacopo mondi
On Thu, 17 Feb 2011 13:37:27 +0100
Stefano Babic sba...@denx.de wrote:
 It seems to me that the driver goes out from receive function when no
 data are available. pkn_cnt is read directly from HW, and if the
 controller is not broken, it will not return any packets and the loop
 ends up.

You are right..
 
 Best regards,
 Stefano Babic
 
As said I'm trying to enable enc28j60 in beagle C4.
The device did not gets initialized because in eth.c, the
board_eth_init function is defined as __def_eth_init through an
__attribute__ weak statements (always return -1).

This is because in board/ti/beagle.c no board_eth_init function is
defined and libbeagle.o is not linked to libnet.o (where board_eth_init
gets called).
My question: have I to implement that function myself? Is it worth to
introduce a new #define statements in omap3_beagle.h that enables the
function in board specific file? I will be happy to do so, if it's
worth (I'm looking at top900 board specific file as an example).

Thank you

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] building enc28j60 for omap3: undefined references

2011-02-17 Thread jacopo mondi
On Wed, 16 Feb 2011 18:31:23 +0100
Reinhard Meyer u-b...@emk-elektronik.de wrote:
 
 Not sure, the driver builds fine with ARM boards.
 Maybe you need to have CONFIG_NET_MULTI set?
 
 Best Regards,
 Reinhard
Yes, I have CONFIG_NET_MULTI (mainly I've taken those entries from
top900 and lpc2292 configs).
That's how I enabled enc

/*ethernet*/
#define CONFIG_NET_MULTI
#define CONFIG_NET_RETRY_COUNT  20
/*network*/
#define CONFIG_ENC28J60
#define ENC_SPI_BUS 4
#define ENC_CS_NUM  0
#define ENC_SPI_CLOCK 2500  
/*ip configuration*/
#define CONFIG_SERVERIP 192.168.5.5
#define CONFIG_IPADDR 192.168.5.1

libnet.o seems to be an architecture independent abstraction anyway,
but the problem is related to that...

Thank you
j
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] building enc28j60 for omap3: undefined references

2011-02-17 Thread Stefano Babic
On 02/16/2011 06:31 PM, Reinhard Meyer wrote:

 I'm using last u-boot, cloned from master branch yesterday.
 Is my toolchain broken?
 
 Not sure, the driver builds fine with ARM boards.
 Maybe you need to have CONFIG_NET_MULTI set?

And the driver builds fine with beagleboard, too. Do you drop the

#undef CONFIG_CMD_NET

in the beagleboard configuration file ? If not, this generates exactly
the error you report.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] building enc28j60 for omap3: undefined references

2011-02-17 Thread jacopo mondi
On Thu, 17 Feb 2011 11:09:04 +0100
Stefano Babic sba...@denx.de wrote:

 And the driver builds fine with beagleboard, too. Do you drop the
 
 #undef CONFIG_CMD_NET
 
 in the beagleboard configuration file ? If not, this generates exactly
 the error you report.
 
 Best regards,
 Stefano Babic
 

GOSH, I've exactly searched through the code for CONFIG_CMD_NET, but I
did not noticed was an undef statment instead of a define!
Everything's fine now. Thank you.

Just another question. I've studied the linux enc28j60 driver and
noticed it features an interrupt driven work flow.
No interrupt are used in u-boot version (for what I've seen). Is it
based on some sort of polling instead of interrupt? Isn't
that dangerous? I mean, if there are no data available everything is
going to freeze..

Thank you all
jacopo
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] building enc28j60 for omap3: undefined references

2011-02-17 Thread Stefano Babic
On 02/17/2011 11:48 AM, jacopo mondi wrote:
 GOSH, I've exactly searched through the code for CONFIG_CMD_NET, but I
 did not noticed was an undef statment instead of a define!
 Everything's fine now. Thank you.

Your're welcome.

 
 Just another question. I've studied the linux enc28j60 driver and
 noticed it features an interrupt driven work flow.
 No interrupt are used in u-boot version (for what I've seen).

That is correct. As u-boot is a bootloader and no os, everything can be
done in a single task and polling is used when it is needed.

 Is it
 based on some sort of polling instead of interrupt? Isn't
 that dangerous? I mean, if there are no data available everything is
 going to freeze..

It seems to me that the driver goes out from receive function when no
data are available. pkn_cnt is read directly from HW, and if the
controller is not broken, it will not return any packets and the loop
ends up.

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] building enc28j60 for omap3: undefined references

2011-02-16 Thread jacopo mondi
Hi all,
I'm trying enabling enc2j60 in order to use tftp with SPI-Ethernet
enc28j60 and beagleboard rev C3.
When building u-boot some functions referred by enc28j60.c remain
undefined.

drivers/net/libnet.o: In function `enc28j60_initialize':
u-boot/drivers/net/enc28j60.c:973:
undefined reference to `eth_register' drivers/net/libnet.o: In function
`enc_receive': u-boot/drivers/net/enc28j60.c:489:
undefined reference to `NetReceive' drivers/net/libnet.o: In function
`enc_recv': u-boot/drivers/net/enc28j60.c:868:
undefined reference to `NetRxPackets'

Driver gets compiled and linked without warnings nor errors:

arm-angstrom-linux-gnueabi-gcc  -g  -Os   -fno-common -ffixed-r8
-msoft-float   -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x80008000
-Iu-boot/include -fno-builtin
-ffreestanding -nostdinc
-isystem cross/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.1/include
-pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux
-mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes
-fno-stack-protector   -o enc28j60.o enc28j60.c -c
arm-angstrom-linux-gnueabi-ld  -r -o libnet.o  enc28j60.o

I'm using last u-boot, cloned from master branch yesterday.
Is my toolchain broken?

thank you
j
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] building enc28j60 for omap3: undefined references

2011-02-16 Thread Reinhard Meyer
Dear jacopo mondi,
 Hi all,
 I'm trying enabling enc2j60 in order to use tftp with SPI-Ethernet
 enc28j60 and beagleboard rev C3.
 When building u-boot some functions referred by enc28j60.c remain
 undefined.

 drivers/net/libnet.o: In function `enc28j60_initialize':
 u-boot/drivers/net/enc28j60.c:973:
 undefined reference to `eth_register' drivers/net/libnet.o: In function
 `enc_receive': u-boot/drivers/net/enc28j60.c:489:
 undefined reference to `NetReceive' drivers/net/libnet.o: In function
 `enc_recv': u-boot/drivers/net/enc28j60.c:868:
 undefined reference to `NetRxPackets'
...

 I'm using last u-boot, cloned from master branch yesterday.
 Is my toolchain broken?

Not sure, the driver builds fine with ARM boards.
Maybe you need to have CONFIG_NET_MULTI set?

Best Regards,
Reinhard
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] building enc28j60 for omap3: undefined references

2011-02-16 Thread Mike Frysinger
On Wednesday, February 16, 2011 12:31:23 Reinhard Meyer wrote:
 Dear jacopo mondi,
  I'm using last u-boot, cloned from master branch yesterday.
  Is my toolchain broken?
 
 Not sure, the driver builds fine with ARM boards.

and Blackfin boards.  btw, not sure if i said this before, but good job with 
the updated enc2j60 net driver.  it rox teh sox.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot