[U-Boot] MACB and DM9000 support for AT91SAM9260

Hi All,
We have a board with 2 ethernet ports: one on the macb and the other on a dm9000-chip. Got them both working under linux but the dm9000 doesn't get a MAC-address assigned now. I would like to give the dm9000 its MAC-address in U-Boot via a environment-variable. Because I'm new to U-Boot, I do not see how I can initialise the dm9000 (eth_init()) and macb (which is initialised via eth_init() in eth.c). To me it looks like macb & dm9000 driver are using a different type of driver concept. How can this problem be tackled?
Greetings Frank

"Frank v/d Schoot" fvds72@gmail.com wrote:
We have a board with 2 ethernet ports: one on the macb and the other on a dm9000-chip. Got them both working under linux but the dm9000 doesn't get a MAC-address assigned now. I would like to give the dm9000 its MAC-address in U-Boot via a environment-variable. Because I'm new to U-Boot, I do not see how I can initialise the dm9000 (eth_init()) and macb (which is initialised via eth_init() in eth.c). To me it looks like macb & dm9000 driver are using a different type of driver concept. How can this problem be tackled?
I don't know much about dm9000, but the macb driver is initialized by calling macb_eth_initalize() once for each instance you want to use. So assuming dm9000 has something similar, you'll just have to call both of them from board_eth_init() in the order you prefer.
Haavard

Hi, Haavard Skinnemoen wrote:
"Frank v/d Schoot" fvds72@gmail.com wrote:
We have a board with 2 ethernet ports: one on the macb and the other on a dm9000-chip. Got them both working under linux but the dm9000 doesn't get a MAC-address assigned now. I would like to give the dm9000 its MAC-address in U-Boot via a environment-variable. Because I'm new to U-Boot, I do not see how I can initialise the dm9000 (eth_init()) and macb (which is initialised via eth_init() in eth.c). To me it looks like macb & dm9000 driver are using a different type of driver concept. How can this problem be tackled?
I don't know much about dm9000, but the macb driver is initialized by calling macb_eth_initalize() once for each instance you want to use. So
I think that the mac address of the dm9000 is on the eeprom. Linux write it using ethtool. Take a look at the dm9000_write_eeprom in the linux code. I think that if you want to use enviroment variable of u-boot, you must write in the eeprom only if the value is different from the enviroment variable.
assuming dm9000 has something similar, you'll just have to call both of them from board_eth_init() in the order you prefer.
Haavard
Michael

This is certainly a good option, maybe I try to make the dm9000x-driver a eth_device. But if this is too hard than this will be my fall-back scenario.
{------- I think that the mac address of the dm9000 is on the eeprom. Linux write
it using ethtool. Take a look at the dm9000_write_eeprom in the linux code. I think that if you want to use enviroment variable of u-boot, you must write in the eeprom only if the value is different from the enviroment variable.
assuming dm9000 has something similar, you'll just have to call both
of
them from board_eth_init() in the order you prefer.
Haavard
Michael _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
participants (4)
-
Frank v/d Schoot
-
Frank van der Schoot
-
Haavard Skinnemoen
-
michael