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 15:11:44 +0100 Message-ID: <1377180704.2825.50.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> <1377178085.2825.19.camel@kazak.uk.xensource.com> <521619F6.9060108@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <521619F6.9060108@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 Thu, 2013-08-22 at 15:02 +0100, Julien Grall wrote: > On 08/22/2013 02:28 PM, Ian Campbell wrote: > > 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. > > dt_get_address take a pointer to u64 value (actually paddr_t == u64). > Perhaps dt_get_addres should take a paddr_t. Assuming dt_gt_address always deals in physical addresses then, yes, I think so. > > > > >> 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. > > The console is not yet set up when the video driver is initialized. > > I will divide this patch in 2 parts. Thanks. > > > > Why tr /A-Z/ /a-z/? > > To keep all printks with the same format. I will stick to HDLCD then. I think they were until you introduced a lower case one ;-) Ian.