From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Gorsulowski Date: Wed, 09 Sep 2009 09:15:20 +0200 Subject: [U-Boot] [PATCH 1/1] at91: Update MEESC board support In-Reply-To: <4AA4B599.7090609@esd.eu> References: <12520673913026-git-send-email-Daniel.Gorsulowski@esd.eu> <20090904211358.GR30118@game.jcrosoft.org> <20090904220234.EDC99832E8DE@gemini.denx.de> <4AA4B599.7090609@esd.eu> Message-ID: <4AA75608.6090207@esd.eu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello, Daniel Gorsulowski wrote: > Hello Wolfgang, Jean-Christophe, > > Wolfgang Denk wrote: >> Dear Daniel, >> >> In message <20090904211358.GR30118@game.jcrosoft.org> Jean-Christophe wrote: >>>> +#ifdef CONFIG_REVISION_TAG >>>> +u32 get_board_rev(void) >>>> +{ >>>> + return hw_rev | 0x100; >>>> +} >>>> +#endif >>>> + >>>> +int misc_init_r(void) >>>> +{ >>>> +#ifdef CONFIG_MACB >>>> + u32 hwaddr_btm; >>>> + u16 hwaddr_top; >>>> + u8 mac[6]; >>>> + >>>> + /* Set ethernet address */ >>>> + if (!eth_getenv_enetaddr("ethaddr", mac)) { >>>> + puts("Missing environment variable 'ethaddr'\n"); >>>> + } else { >>>> + hwaddr_btm = mac[0] | mac[1] << 8 | mac[2] << 16 | mac[3] << 24; >>>> + hwaddr_top = mac[4] | mac[5] << 8; >>>> + writel(hwaddr_btm, (void *)(AT91SAM9263_BASE_EMAC + MACB_SA1B)); >>>> + writel(hwaddr_top, (void *)(AT91SAM9263_BASE_EMAC + MACB_SA1T)); >>> nack this will be done when u-boot will need to use the macb# > Just imagine: U-boot boots a Linux kernel from NAND flash. It does NOT need the > ethernet interface, so it does NOT initialize ethernet, so the ethernet address > will NOT be written to the EMAC module! > As a result, Linux will assign a random address, that is not acceptable! >> Jean-Christophe means: The Etherent interface must not be always >> initialized, but only when it is needed and used within U-Boot itself, >> i. e. if U-boot is performing anetwork command. See also item 2 at >> http://www.denx.de/wiki/U-Boot/DesignPrinciples and >> http://www.denx.de/wiki/view/DULG/EthernetDoesNotWorkInLinux >> >> Best regards, >> >> Wolfgang Denk >> > I know about it. > > But this patch does NOT initialize the Ethernet Interface. It JUST write > the ethernet address to the EMAC module! > > So please ACK this patch. > > > Regards, > Daniel Gorsulowski it was worth an attempt... I made a new patch without the MACB stuff, see separate mail. Now I parse the ethaddr through the kernel commandline. The kernel patch is temporary available at http://paste.debian.net/46114/ (maybe someone is interested in it) Regards, Daniel Gorsulowski