From patchwork Wed Aug 28 14:47:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 19577 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0007225E58 for ; Wed, 28 Aug 2013 14:48:27 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id a11sf7078963qcx.1 for ; Wed, 28 Aug 2013 07:48:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state: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=YQx7csBCZSepU5tiqEh7OvNrAQSo1RnmZepwGNFLfsaz9qEomLZbArDTZDJtNY7c6e FfvsGCBiWzpFBracifdqwBLM8vgN0gAba9n+ENIPJbGrUHyfCNt+HaERwv1jFldqnvGF AMVwxnEi0s566uVMG1jYX+l58RAjsltz0edfBK/jQzvhCqUnuDReIDSPh3/9uXltTlJx 0lnucGF5fvTVyEW/b2cv5ypmTPOc6E/82nC4R4pn+lz0GxmpGDn0WGUfQ6Bp8kgX0vs5 1TI3C0nd1ELyoo9q27hZG7wH2ufd+2NfmN28lRMzarkQZSZYzRXBRNsl3E1WZ8coaj4v oKEw== X-Received: by 10.236.209.103 with SMTP id r67mr10722487yho.35.1377701307789; Wed, 28 Aug 2013 07:48:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.53.103 with SMTP id a7ls327356qep.90.gmail; Wed, 28 Aug 2013 07:48:27 -0700 (PDT) X-Received: by 10.58.108.8 with SMTP id hg8mr25514255veb.6.1377701307594; Wed, 28 Aug 2013 07:48:27 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id tt2si6604947vcb.77.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 07:48:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so4239996vbg.11 for ; Wed, 28 Aug 2013 07:48:27 -0700 (PDT) X-Gm-Message-State: ALoCoQkHmqO5WJZVXY96C8exr178usSx+CM/62VP685U4pyHDPqqf69W1PnOdbiK10evhvMhq5l/ X-Received: by 10.58.137.167 with SMTP id qj7mr25633591veb.1.1377701307493; Wed, 28 Aug 2013 07:48:27 -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 u4csp359952vcz; Wed, 28 Aug 2013 07:48:25 -0700 (PDT) X-Received: by 10.194.175.133 with SMTP id ca5mr20428144wjc.19.1377701303469; Wed, 28 Aug 2013 07:48:23 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id dg6si9507360wjc.129.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 07:48:23 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.50; Received: by mail-wg0-f50.google.com with SMTP id m15so5523677wgh.29 for ; Wed, 28 Aug 2013 07:48:23 -0700 (PDT) X-Received: by 10.194.240.164 with SMTP id wb4mr2706634wjc.70.1377701302933; Wed, 28 Aug 2013 07:48:22 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id a8sm5590498wie.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 07:48:22 -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 V1 14/29] xen/video: hdlcd: Use early_printk instead of printk Date: Wed, 28 Aug 2013 15:47:28 +0100 Message-Id: <1377701263-3319-15-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1377701263-3319-1-git-send-email-julien.grall@linaro.org> References: <1377701263-3319-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.212.52 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);