From: Ian Campbell Subject: Re: [RFC 14/24] xen/video: hdlcd: Convert the driver to the new device tree API Date: Thu, 22 Aug 2013 14:28:05 +0100 Message-ID: <1377178085.2825.19.camel@kazak.uk.xensource.com> References: <1376687156-6737-1-git-send-email-julien.grall@linaro.org> <1376687156-6737-15-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1376687156-6737-15-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: patches@linaro.org, xen-devel@lists.xen.org, andre.przywara@linaro.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2013-08-16 at 22:05 +0100, Julien Grall wrote: > Avoid to use FDT API which will be removed soon. > > Signed-off-by: Julien Grall > --- > xen/drivers/video/arm_hdlcd.c | 58 +++++++++++++++++++++++------------------ > 1 file changed, 32 insertions(+), 26 deletions(-) > > diff --git a/xen/drivers/video/arm_hdlcd.c b/xen/drivers/video/arm_hdlcd.c > index 72979ea..0ff8c22 100644 > --- a/xen/drivers/video/arm_hdlcd.c > +++ b/xen/drivers/video/arm_hdlcd.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > #include "font.h" > #include "lfb.h" > #include "modelines.h" > @@ -96,62 +97,67 @@ static int __init get_color_masks(const char* bpp, struct color_masks **masks) > > static void __init set_pixclock(uint32_t pixclock) > { > - if ( device_tree_node_compatible(device_tree_flattened, 0, "arm,vexpress") ) > + if ( dt_find_compatible_node(NULL, NULL, "arm,vexpress") ) > vexpress_syscfg(1, V2M_SYS_CFG_OSC_FUNC, > V2M_SYS_CFG_OSC5, &pixclock); > } > > void __init video_init(void) > { > - int node, depth; > - u32 address_cells, size_cells; > struct lfb_prop lfbp; > unsigned char *lfb; > - paddr_t hdlcd_start, hdlcd_size; > + u64 hdlcd_start, hdlcd_size; Why? These are physical addresses. > if ( !hdlcd_start ) > { > - printk(KERN_ERR "HDLCD address missing from device tree, disabling driver\n"); > + early_printk("hdlcd: address missing from device tree, disabling driver\n"); I suppose this (and the other instances of this) is for when the console is on HDLCD? That's a separate fix really I think. Why tr /A-Z/ /a-z/? Ian.