From patchwork Mon Jan 23 21:22:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9533521 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 348256042D for ; Mon, 23 Jan 2017 21:25:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D001283FD for ; Mon, 23 Jan 2017 21:25:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 103D82841F; Mon, 23 Jan 2017 21:25:55 +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 A88A1283FD for ; Mon, 23 Jan 2017 21:25:54 +0000 (UTC) Received: from localhost ([::1]:44518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVm7d-0008Ry-Qm for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Jan 2017 16:25:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVm4s-0006wI-3b for qemu-devel@nongnu.org; Mon, 23 Jan 2017 16:23:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVm4o-0007aN-4r for qemu-devel@nongnu.org; Mon, 23 Jan 2017 16:23:02 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:34988) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cVm4n-0007aG-Tq for qemu-devel@nongnu.org; Mon, 23 Jan 2017 16:22:58 -0500 Received: by mail-wm0-x242.google.com with SMTP id d140so29559691wmd.2 for ; Mon, 23 Jan 2017 13:22:57 -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; bh=G3e0SqkMwpQHy45HKS5/raGE0lcwHkyWiW/4+krOrg8=; b=laxLfLzm1iIk3NFNninQB+HEbaacfdQqbH1VDZ73DNjAFWqIQHQUWnPxg+oBbNuxRY Kv8m04FNLvqufhmE02WrAj+TdxAatHW53uOu+qY8k6B0Oz1CCA/d3QNVh8VQAJIGpr9e k0FpVfBCaU9emQLRCAAOSLgYYE2qXn/XbcrLs9lZmX3JRrwpvGsDm2Tq7MnJNA5VE6mZ CfiIjHZXC40khwX64K4lGptjEHTFhy8bJCmNw35Gis2j7p+UiyKImJyMaHJWeM65Vc5Z WW2cG4CmLNwGRoefBP1vG0hKVQwGWRcmcEB+JppiyXpJFCBfYmtTOX+4qKJzzznm3myC +xrg== 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; bh=G3e0SqkMwpQHy45HKS5/raGE0lcwHkyWiW/4+krOrg8=; b=tmyV/XijAcfvMs3Gn2qxz4j13ywyST2furhFKIfNteb1bJB1YGiAJB4it4780gFXEY drfZfuo8heoeMGLYsPSDLagcX3CdrbipfNYyyELeN5C6xaECvPO2/n6biGwtMIiO9fIp I/opDRe5AIdkOthmw75tpSsoOhaeeN4qvXfXi5tD7pRuxPhbhNgeDRBbDZCUhWu/aqO8 +CVaWay+8FZu17Xyg5Qe+i01Izn2egywO8xXj7uz/s+/lpjiLQafZ1m6OFDwGxQwWCcg r6P4jqfZua9HKhE8CTrg5+kH0tPFpBmTfS1Q95ZylPmsvULkH9noaB2nEhSLLJeIw16y iNLQ== X-Gm-Message-State: AIkVDXK1zhsWhNe8jMr7sNsU5uHZv6GPhnV/WE4V5XPTu8zSx1QTzJLA2eLdS4sVTZFpjA== X-Received: by 10.223.154.114 with SMTP id z105mr25408694wrb.89.1485206576957; Mon, 23 Jan 2017 13:22:56 -0800 (PST) Received: from localhost (x55b4d8ad.dyn.telefonica.de. [85.180.216.173]) by smtp.gmail.com with ESMTPSA id y145sm23043306wmc.17.2017.01.23.13.22.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jan 2017 13:22:56 -0800 (PST) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Mon, 23 Jan 2017 22:22:53 +0100 Message-Id: <1485206573-32452-1-git-send-email-atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH 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: 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 Signed-off-by: Artyom Tarasenko Reviewed-by: Markus Armbruster --- 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 e945b5a..a14724f 100644 --- a/hw/sparc64/niagara.c +++ b/hw/sparc64/niagara.c @@ -154,9 +154,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); }