[U-Boot] [PATCH] Add Boundary Devices Nitrogen6X boards

Eric Nelson eric.nelson at boundarydevices.com
Wed Feb 20 17:05:21 CET 2013


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 at 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


More information about the U-Boot mailing list