[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 14/24] xen/video: hdlcd: Convert the driver to the new device tree API
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 <julien.grall@xxxxxxxxxx> >> --- >> 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 <xen/libfdt/libfdt.h> >> #include <xen/init.h> >> #include <xen/mm.h> >> +#include <asm/early_printk.h> >> #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. > >> 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. > > Why tr /A-Z/ /a-z/? To keep all printks with the same format. I will stick to HDLCD then. -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |