From patchwork Fri Sep 13 12:49:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 20035 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E373228E9B for ; Fri, 13 Sep 2013 12:49:51 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id gd11sf1168662vcb.8 for ; Fri, 13 Sep 2013 05:49:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=0QSIFAE4KfKuqiUluYSrQSZ2QFcoqpD8iRcocHLn8+M=; b=hvGgDlWjrSK9Mzh+yu8M6j3ny3RcvUvre7PeZSt+vIkKjf9oMvxpWb4YvZKTPqnp6K lWkltCqAPvVPX/RZtLWidZJAouCOZN9w56DXLCOs3StZnEu07ZWGBHyYzdhncC2uL/jJ /eE9LGZnoRk0p98/U3OAa1HdfRXZRLVdnoMW6vbxC1NKM1s36W44tsnakvgXAgCqbcxt NNrVhT5eZpK/hzq9VV9jg192kN9z7hnRHte3jmEbxL+xZvMEFyQuCNlN5tkrDY9Rc76h hmVLo/IFRNChCbgeSsk1d5KyQLyyW7Zy96NmAN5HsalBcGTUCMlvtdiZelIcsC0+FqF5 9oyA== X-Gm-Message-State: ALoCoQnOYGK6K7yRBjOJCS6NACSLN/BNRAsY1/W6Tp6RBExsVEj41hlQChNR1gNmo5PN07yyB8iu X-Received: by 10.236.135.79 with SMTP id t55mr4870184yhi.39.1379076591648; Fri, 13 Sep 2013 05:49:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.196 with SMTP id w4ls1104607qen.71.gmail; Fri, 13 Sep 2013 05:49:51 -0700 (PDT) X-Received: by 10.220.145.132 with SMTP id d4mr11831503vcv.9.1379076591399; Fri, 13 Sep 2013 05:49:51 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id ry8si3067116vcb.121.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:49:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id db12so896538veb.8 for ; Fri, 13 Sep 2013 05:49:51 -0700 (PDT) X-Received: by 10.220.244.132 with SMTP id lq4mr162458vcb.31.1379076591319; Fri, 13 Sep 2013 05:49:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp78775vcz; Fri, 13 Sep 2013 05:49:50 -0700 (PDT) X-Received: by 10.15.56.199 with SMTP id y47mr1340206eew.73.1379076590068; Fri, 13 Sep 2013 05:49:50 -0700 (PDT) Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by mx.google.com with ESMTPS id t9si3775866eeo.35.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:49:50 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.41 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.83.41; Received: by mail-ee0-f41.google.com with SMTP id d17so563185eek.28 for ; Fri, 13 Sep 2013 05:49:49 -0700 (PDT) X-Received: by 10.14.109.66 with SMTP id r42mr18086941eeg.43.1379076589443; Fri, 13 Sep 2013 05:49:49 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id p5sm14678420eeg.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 05:49:48 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, andre.przywara@linaro.org, Julien Grall Subject: [PATCH v4 10/27] xen/video: hdlcd: Use early_printk instead of printk Date: Fri, 13 Sep 2013 13:49:17 +0100 Message-Id: <1379076574-28316-11-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1379076574-28316-1-git-send-email-julien.grall@linaro.org> References: <1379076574-28316-1-git-send-email-julien.grall@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The video driver is initialized before the console is correctly set up. Therefore, printk will never output if there is no serial configured. Signed-off-by: Julien Grall --- xen/drivers/video/arm_hdlcd.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/xen/drivers/video/arm_hdlcd.c b/xen/drivers/video/arm_hdlcd.c index ab464c6..dffda9a 100644 --- a/xen/drivers/video/arm_hdlcd.c +++ b/xen/drivers/video/arm_hdlcd.c @@ -146,13 +146,13 @@ void __init video_init(void) if ( !hdlcd_start ) { - printk(KERN_ERR "HDLCD address missing from device tree, disabling driver\n"); + early_printk(KERN_ERR "HDLCD: address missing from device tree, disabling driver\n"); return; } if ( !hdlcd_start || !framebuffer_start ) { - printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n"); + early_printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n"); return; } @@ -166,27 +166,27 @@ void __init video_init(void) else if ( strlen(mode_string) < strlen("800x600@60") || strlen(mode_string) > sizeof(_mode_string) - 1 ) { - printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string); + early_printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string); return; } else { char *s = strchr(mode_string, '-'); if ( !s ) { - printk(KERN_INFO "HDLCD: bpp not found in modeline %s, assume 32 bpp\n", - mode_string); + early_printk(KERN_INFO "HDLCD: bpp not found in modeline %s, assume 32 bpp\n", + mode_string); get_color_masks("32", &c); memcpy(_mode_string, mode_string, strlen(mode_string) + 1); bytes_per_pixel = 4; } else { if ( strlen(s) < 6 ) { - printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string); + early_printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string); return; } s++; if ( get_color_masks(s, &c) < 0 ) { - printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s); + early_printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s); return; } bytes_per_pixel = simple_strtoll(s, NULL, 10) / 8; @@ -205,22 +205,23 @@ void __init video_init(void) } if ( !videomode ) { - printk(KERN_WARNING "HDLCD: unsupported videomode %s\n", _mode_string); + early_printk(KERN_WARNING "HDLCD: unsupported videomode %s\n", + _mode_string); return; } if ( framebuffer_size < bytes_per_pixel * videomode->xres * videomode->yres ) { - printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n"); + early_printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n"); return; } - printk(KERN_INFO "Initializing HDLCD driver\n"); + early_printk(KERN_INFO "Initializing HDLCD driver\n"); lfb = ioremap_wc(framebuffer_start, framebuffer_size); if ( !lfb ) { - printk(KERN_ERR "Couldn't map the framebuffer\n"); + early_printk(KERN_ERR "Couldn't map the framebuffer\n"); return; } memset(lfb, 0x00, bytes_per_pixel * videomode->xres * videomode->yres);