From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Nelson Date: Wed, 20 Feb 2013 09:05:21 -0700 Subject: [U-Boot] [PATCH] Add Boundary Devices Nitrogen6X boards In-Reply-To: <20130220142041.414A520052F@gemini.denx.de> References: <1361305248-24598-1-git-send-email-eric.nelson@boundarydevices.com> <20130220142041.414A520052F@gemini.denx.de> Message-ID: <5124F441.8060507@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On 02/20/2013 07:20 AM, Wolfgang Denk wrote: > Dear Eric Nelson, > > In message <1361305248-24598-1-git-send-email-eric.nelson@boundarydevices.com> you wrote: > >> +static int detect_hdmi(struct display_info_t const *dev) >> +{ >> + return __raw_readb(HDMI_ARB_BASE_ADDR+HDMI_PHY_STAT0) & HDMI_PHY_HPD; > ... >> + reg = __raw_readb( >> + HDMI_ARB_BASE_ADDR >> + +HDMI_PHY_CONF0); > > etc. etc. > > NAK!! We do not allow device access through base address plus offset > notation. Please use a proper C Struct to access thes device. > This tells me that there's other breakage here. In particular, this usage follows the lead of drivers/video/ipu_common.c and the detect code is also present in mx6qsabrelite.c: http://git.denx.de/u-boot.git/?p=u-boot.git;a=blob;f=board/freescale/mx6qsabrelite/mx6qsabrelite.c;h=f010d0c60d25734d2b81579b6d2806d365a415e6;hb=HEAD#l456 > Also, are you absolutely sure that the __raw_* accessors are the right > thing to use here? Are you really sure no memory barriers etc. are > needed here? > Good catch. readb() would be more appropriate, though this particular register is unlikely to produce a different value. Regards, Eric