From: michael Date: Tue, 02 Sep 2008 16:09:04 +0200 Subject: [U-Boot] MACB and DM9000 support for AT91SAM9260 In-Reply-To: <20080902153900.6c0f62f8@hskinnemo-gx745.norway.atmel.com> References: <1fcc2deb0809020552s28c01cb4t2afc54c3c68daad7@mail.gmail.com> <20080902153900.6c0f62f8@hskinnemo-gx745.norway.atmel.com> Message-ID: <48BD4900.10409@gandalf.sssup.it> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, Haavard Skinnemoen wrote: > "Frank v/d Schoot" 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