From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 25 Apr 2013 22:12:40 +0200 Subject: [U-Boot] [PATCH V2 6/6] arm: mx5: Add support for DENX M53EVK In-Reply-To: References: <1366559547-9063-1-git-send-email-marex@denx.de> <201304242332.56022.marex@denx.de> Message-ID: <201304252212.40808.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Fabio Estevam, [..] > >> Shouldn't this function be placed into a common mx5 location? mx53ard > >> uses the same. > > > > The WEIM and M4IF configuration is board-specific. > > Right, understood. It seems like a duplication of code from mx53ard, > but anyway, what about: > > clrbits_le32(WEIM_BASE_ADDR + i, WEIM_GCR2_MUX16_BYP_GRANT) ? > > Accessing registers via offsets is not the best practice in U-boot. > > What about the weim struct defined at > arch/arm/include/asm/arch-mx5/imx-regs.h > > for acessing such registers? Yes, I agree, but you won't be able to do that in a loop as above if accessed via struct-based access so I'm keeping this. Best regards, Marek Vasut