From patchwork Tue Jan 24 19:55:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9535787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD3C1601D3 for ; Tue, 24 Jan 2017 19:57:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBCD926B41 for ; Tue, 24 Jan 2017 19:57:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C067826E16; Tue, 24 Jan 2017 19:57:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5AD6926B41 for ; Tue, 24 Jan 2017 19:57:18 +0000 (UTC) Received: from localhost ([::1]:55448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cW7DR-0006pK-7Y for patchwork-qemu-devel@patchwork.kernel.org; Tue, 24 Jan 2017 14:57:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cW7Cv-0006nV-Uo for qemu-devel@nongnu.org; Tue, 24 Jan 2017 14:56:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cW7Cu-0000of-LG for qemu-devel@nongnu.org; Tue, 24 Jan 2017 14:56:46 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33198) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cW7Cu-0000oK-G3 for qemu-devel@nongnu.org; Tue, 24 Jan 2017 14:56:44 -0500 Received: by mail-wm0-x243.google.com with SMTP id r144so37179580wme.0 for ; Tue, 24 Jan 2017 11:56:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xHbvyKoiyouuO1iQZXo2sR+K/HReeDpYAzs0+LQ5Pog=; b=qm2xsPsZKpPjwNAZKzElwbnAoAn2RAJrW5Q5MJB16vW+Ck6fPg57vzuyHUfG1OM7rr f/6VWND4o8NaLcu/MPFsG/YKeiNCMA3tXZKZoLbWyRR+Dpjm7gLXIE3z6KOBiaSf8UR2 L7/chvbkr6KVqa1gW7S21HxY25xHcgzw9RV8JJbXiINBl+QniDd4JL23c1ZlZygVGMJB 8G7Q9+CumfcSCmDVpM3TbwhTkSQqSdiVqP+ewbzJdHWVzSib8WQ3aAgSQj122vUwXFGu J0rxMGdKjoIAWCdtk+6cip8jy1iNdxefbkmdoaN9khkH+1+gRfgCNCLuMcb/a4CwllzD nZUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xHbvyKoiyouuO1iQZXo2sR+K/HReeDpYAzs0+LQ5Pog=; b=Tqjo8P6Xp3OSQS6FNxsrg2sZnVjK2SIlKCW3ADSK7BTGesXqRP46sLmB0EVW8DBoSv t3bDVw6a4R9zrnKXnRyRA8FBQFi8MfrXujIOFJ0mg8A4QQZb/8DyDkX3VP70YZ25WsG+ ZJPx3ZvSHIlQFwGbUFga14ynBhUeUUfO7Ikz9fcNELWT6yHW2MMvWmRBetnrZCFXA5U8 ZdWNJLdfj0sV5dTDb2hHFqcTS6LEVbyx8TmUT3OOew5PLpLiL2GVegri86p8YaxUPThp B2sBNCfOMMcRVW9+ZRcKvFyXYXOb3nY+6pk9pT0thQpLdpWFWLToDhOSeOVwYgIbkpvX k+cw== X-Gm-Message-State: AIkVDXKo/eNG7kW+WI1GEVfFpurNiMTkQHVBTVH8oF6G+OzlYEh8L7rg7Tiu30B7jf6QPg== X-Received: by 10.28.139.74 with SMTP id n71mr20938053wmd.139.1485287803304; Tue, 24 Jan 2017 11:56:43 -0800 (PST) Received: from localhost (x55b4b9ca.dyn.telefonica.de. [85.180.185.202]) by smtp.gmail.com with ESMTPSA id o132sm27835715wmo.17.2017.01.24.11.56.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 11:56:42 -0800 (PST) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Tue, 24 Jan 2017 20:55:42 +0100 Message-Id: <1485287742-31374-3-git-send-email-atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1485287742-31374-1-git-send-email-atar4qemu@gmail.com> References: <1485287742-31374-1-git-send-email-atar4qemu@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH v2 2/2] niagara: check if a serial port is available X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk, armbru@redhat.com, Artyom Tarasenko Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Reported-by: Markus Armbruster Reviewed-by: Markus Armbruster Signed-off-by: Artyom Tarasenko --- hw/sparc64/niagara.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c index edde86e..9a8d610 100644 --- a/hw/sparc64/niagara.c +++ b/hw/sparc64/niagara.c @@ -158,9 +158,10 @@ static void niagara_init(MachineState *machine) exit(1); } } - serial_mm_init(sysmem, NIAGARA_UART_BASE, 0, NULL, 115200, - serial_hds[0], DEVICE_BIG_ENDIAN); - + if (serial_hds[0]) { + serial_mm_init(sysmem, NIAGARA_UART_BASE, 0, NULL, 115200, + serial_hds[0], DEVICE_BIG_ENDIAN); + } empty_slot_init(NIAGARA_IOBBASE, NIAGARA_IOBSIZE); sun4v_rtc_init(NIAGARA_RTC_BASE); }