From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Gorsulowski Date: Fri, 11 Sep 2009 09:03:31 +0200 Subject: [U-Boot] [PATCH 1/1] at91: Update MEESC board support In-Reply-To: <20090910184150.EF1ED832E8DE@gemini.denx.de> References: <12524805241911-git-send-email-Daniel.Gorsulowski@esd.eu> <20090909085825.2BF15832E8DE@gemini.denx.de> <4AA90821.1060106@esd.eu> <20090910184150.EF1ED832E8DE@gemini.denx.de> Message-ID: <4AA9F643.3000509@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 Dear Wolfgang Denk, Wolfgang Denk wrote: > Dear Daniel Gorsulowski, > > In message <4AA90821.1060106@esd.eu> you wrote: >>>> - /* arch number of MEESC-Board */ >>>> - gd->bd->bi_arch_number = MACH_TYPE_MEESC; >>>> + /* initialize ET1100 Controller */ >>>> + meesc_ethercat_hw_init(); >>> I thought we had agreed not to initialize the Ethernet hardware if it >>> not used by U-Boot? >>> >> We had, but this does not initialize unused hardware. This is needed for >> detecting hw_type and setting correct arch_number. > > meesc_ethercat_hw_init() "is needed for ... setting correct > arch_number" ?? > > Best regards, > > Wolfgang Denk > Please take a look at function checkboard(). There is a call "hw_type = readb(CONFIG_ET1100_BASE);" to read the ET1100 type register. The read value is used to determine the correct arch_number. valid value (ET1100 present) --> arch_number = MACH_TYPE_MEESC invalid value (no ET1100 present) --> arch_number = MACH_TYPE_ETHERCAN2 For accessing the ET1100 type register, it is mandatory to initialize the memory controller. Thus, meesc_ethercat_hw_init() is needed and does not initialize unused hardware! Btw. the function meesc_ethercat_hw_init() is not new in this patch. I entirely moved the function call. Best regards, Daniel Gorsulowski