From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Jackson Date: Sat, 13 Apr 2013 18:46:11 +0100 Subject: [U-Boot] How do I use AM335x eth1 rather than eth0 ? [SOLVED] In-Reply-To: <5167E879.4060900@mimc.co.uk> References: <5167E879.4060900@mimc.co.uk> Message-ID: <516999E3.3000506@mimc.co.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12/04/13 11:56, Mark Jackson wrote: > We have a dual Ethernet board (based on the BeagelBone) but with both Ethernet ports connected. > > I'm wanting to use eth1 (rather than eth0), so in my board.c file, I changed:- > > static struct cpsw_slave_data cpsw_slaves[] = { > { > .slave_reg_ofs = 0x208, > .sliver_reg_ofs = 0xd80, > .phy_id = 0, > }, > { > .slave_reg_ofs = 0x308, > .sliver_reg_ofs = 0xdc0, > .phy_id = 1, > }, > }; > > ... to ... > > static struct cpsw_slave_data cpsw_slaves[] = { > { > .slave_reg_ofs = 0x308, > .sliver_reg_ofs = 0xdc0, > .phy_id = 1, > }, > { > .slave_reg_ofs = 0x208, > .sliver_reg_ofs = 0xd80, > .phy_id = 0, > }, > }; > > ... assuming that eth0 would now be ignored (as only 1 slave is configured). > > But (eg) dhcp still only responds on eth0 !?! > > What else do I have to change ? After much experimenting, I've managed to get it to work. Based on the original board.c file copied from the TI starter kit, I simply changed the slaves count to 2, and set CONFIG_PHY_ADDR to 1 in my board config file. Simple.