From patchwork Sun Feb 26 22:29:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9592447 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 F3FEA6042B for ; Sun, 26 Feb 2017 22:33:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBA96283CB for ; Sun, 26 Feb 2017 22:33:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB015283E1; Sun, 26 Feb 2017 22:33:25 +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 6071D283CB for ; Sun, 26 Feb 2017 22:33:25 +0000 (UTC) Received: from localhost ([::1]:48706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci7Nc-0001Jn-HK for patchwork-qemu-devel@patchwork.kernel.org; Sun, 26 Feb 2017 17:33:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci7Ky-0008Cz-3Y for qemu-devel@nongnu.org; Sun, 26 Feb 2017 17:30:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci7Ku-0000Ak-Ss for qemu-devel@nongnu.org; Sun, 26 Feb 2017 17:30:40 -0500 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:33663) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ci7Ku-0000Ae-Mr for qemu-devel@nongnu.org; Sun, 26 Feb 2017 17:30:36 -0500 Received: by mail-wm0-x244.google.com with SMTP id v77so10887301wmv.0 for ; Sun, 26 Feb 2017 14:30:36 -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=Q5dVAX0egiiOvs9ts5oJLb2sE8YVMh99Ae1hYfZx7KaKh2FCUadL8ZMZtoTHHMJd0h vkbzM/7rZ7YJWhSj2+HtaPzms78Vl1rvqJ+VscxD0Q+PUdSggLzeNsL4RG7o0PtsttNz lgqkB9+IBRY5PxmDDrdSa4eoqnIXAcfNuVAnaIrDy8lIjX5+IE+RW9qfgS58iYVuol5p hmikMj6EBaDiJKbJuOnM81vM8zA+7ohBa9iUka/RMhG0yUwcX+LsWZDXwt6J/5D8gC96 lGWNoXJvOZwKeHX9rta9cTfZEjUCP0uQKCc9Zj2bye3573NFecYe9+WD5pzAK7sP8zCA qjGA== 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=oU23EygA/lZn+Im8/ypxwgoLWFb2ZeMuCPVf0bSyjDyTPHWHLQvVp7CnQpFeXDnsU4 P5kPPlams3vjQncX1gW25axmXlAlJRCFKtS9bmUaN6lnWhTFBoOtthnxdKOapPTQCX4d TOBbq0+wF2LvMu7+4AjdS8LgsjUF+SiSoXqxeBEMiJCSCNojDBTo3WIBzqCtj/hWzrAf kWVohL+8bQ0FwsLr4maLIMr2ykRSEoP1UzAjF963jBVPR6K36znwCADnnvqqJfK5brnC 9CE8S1j4sc78BJewfBVWvVwuuhZ9f38fRigsLWVLxg5apGud7Opzl1J8JBugNlS+pvMk dvLA== X-Gm-Message-State: AMke39lIzLhzw46xtKc+dMIHDfsPumJjj80zj0q1rkHmXTWzChcUfCbXU4soM6JmeRz6Lg== X-Received: by 10.28.103.3 with SMTP id b3mr10119070wmc.99.1488148235490; Sun, 26 Feb 2017 14:30:35 -0800 (PST) Received: from localhost (x55b4d024.dyn.telefonica.de. [85.180.208.36]) by smtp.gmail.com with ESMTPSA id i189sm11803242wmg.7.2017.02.26.14.30.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Feb 2017 14:30:34 -0800 (PST) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Sun, 26 Feb 2017 23:29:16 +0100 Message-Id: <1488148156-2036-3-git-send-email-atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1488148156-2036-1-git-send-email-atar4qemu@gmail.com> References: <1488148156-2036-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::244 Subject: [Qemu-devel] [PULL 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, 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); }