From patchwork Mon Apr 8 10:14:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Tyshchenko X-Patchwork-Id: 10889235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9722517EF for ; Mon, 8 Apr 2019 10:16:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E76C285A4 for ; Mon, 8 Apr 2019 10:16:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72C27285C9; Mon, 8 Apr 2019 10:16:51 +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=-5.0 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1ABC0285A4 for ; Mon, 8 Apr 2019 10:16:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDRIy-0003r4-6G; Mon, 08 Apr 2019 10:15:08 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDRIw-0003pk-OR for xen-devel@lists.xenproject.org; Mon, 08 Apr 2019 10:15:06 +0000 X-Inumbo-ID: 2d640ea3-59e7-11e9-92d7-bc764e045a96 Received: from mail-lf1-x141.google.com (unknown [2a00:1450:4864:20::141]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 2d640ea3-59e7-11e9-92d7-bc764e045a96; Mon, 08 Apr 2019 10:15:05 +0000 (UTC) Received: by mail-lf1-x141.google.com with SMTP id u21so9080210lfu.2 for ; Mon, 08 Apr 2019 03:15:05 -0700 (PDT) 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=P3l/nj+0GS/vwoC9GtsDqRnHHzqQeOcfUGS3QkNpkeE=; b=s2FPfUNdji8HAwA/0j0wCrWRJbbH+rpSgAjGRXp+DOu5a4CCWazaU+AnuFpEonhmT1 1Ho+HY+Col9sOt1HY8w9l8uJetNII5bh8s39CSfnkHQQ7MRyhjm+WyZodKC+IRASZRs4 j3i7XDwWxdfTcL2MpDh0nmqUR/gfv5EuadkxxwhiuI4y8S77CfmoKUsevLeJgn/daVIu 4Ni+1OzJfVemp7gpsrj0tXO0NRlfwsZJk95AiEK9qN4zcb+BdMTzi/hDPOkjLzjbNoOL 4weDUx2QqnGMH9yJU/8/vgZ7KcwxMVVgaszOyP830VcPHdvnK7yYt1og6qP0Jot+XLyI n5xw== 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=P3l/nj+0GS/vwoC9GtsDqRnHHzqQeOcfUGS3QkNpkeE=; b=WB4iQmCChoCASl2RzWJguDAz+0CbtsKzRlb3xq7TxhuvDCoftBSEJ3ZCtdBRbu3eT5 blJBewGXp2JOSqzsPd18IM2oTO+6Uwg057pkNmUexrZd4bILVDZcaGdAdfJ6Le2RMfG1 zmGuutVw2PbszJAyEpF+g+XLKDKqrUZOW1BuMEJl/T/93KS9R9g7w3pz44m0cMT2sIem 5yNdVYss2qZgOQJ2CsJCq1Lhp3Tmpz3P9xiBcVps7wmIKO7XdVq/8VE8WIuuCaqAA0tc CzE3mN3ir2IPY+mg3QrgpwD6z1vet6+mcern3HX972/hIaPgjavWNafs2QPS166qly/W IHMA== X-Gm-Message-State: APjAAAXaPAaiw1EJaGtqOyXWBp8DFLxzr93Zqx3zQAwmXI93K5j65VZH UcFFHldX5gtdBZs+CX/Qi7D+rY8ll7s= X-Google-Smtp-Source: APXvYqyx9CeZBktJ6SRWIEZl1FD+8/eXAwTLcTknnmzFeUotIHkCmIhns/Q+ZMfhZjGKPabO1d5v9Q== X-Received: by 2002:ac2:43c4:: with SMTP id u4mr10090557lfl.35.1554718503878; Mon, 08 Apr 2019 03:15:03 -0700 (PDT) Received: from otyshchenko.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id x30sm6275717ljd.38.2019.04.08.03.15.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Apr 2019 03:15:03 -0700 (PDT) From: Oleksandr Tyshchenko To: xen-devel@lists.xenproject.org Date: Mon, 8 Apr 2019 13:14:49 +0300 Message-Id: <1554718489-11318-6-git-send-email-olekstysh@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554718489-11318-1-git-send-email-olekstysh@gmail.com> References: <1554718489-11318-1-git-send-email-olekstysh@gmail.com> Subject: [Xen-devel] [PATCH V3 5/5] xen/arm: Add early printk support for SCIFA compatible UARTs X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Oleksandr Tyshchenko , julien.grall@arm.com, sstabellini@kernel.org MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Oleksandr Tyshchenko This patch makes possible to use existing early prink code for Renesas "Stout" board based on R-Car H2 SoC (SCIFA). The "EARLY_PRINTK_VERSION" for that board should be 'A': CONFIG_EARLY_PRINTK=scif,0xe6c40000,A Signed-off-by: Oleksandr Tyshchenko CC: Julien Grall --- Changes in v3: - It was decided not to introduce new debug-scifa.inc for handling SCIFA interface, but to extend existing debug-scif.inc for handling both interfaces. This patch is a result of splitting an initial patch "xen/arm: Add SCIFA UART support for early printk" and only adds a support. --- xen/arch/arm/arm32/debug-scif.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/arm32/debug-scif.inc b/xen/arch/arm/arm32/debug-scif.inc index a8d2eae..94a18ea 100644 --- a/xen/arch/arm/arm32/debug-scif.inc +++ b/xen/arch/arm/arm32/debug-scif.inc @@ -1,7 +1,7 @@ /* * xen/arch/arm/arm32/debug-scif.inc * - * SCIF specific debug code + * SCIF(A) specific debug code * * Oleksandr Tyshchenko * Copyright (C) 2014, Globallogic. @@ -22,10 +22,13 @@ #ifdef EARLY_PRINTK_VERSION_NONE #define STATUS_REG SCIF_SCFSR #define TX_FIFO_REG SCIF_SCFTDR +#elif EARLY_PRINTK_VERSION_A +#define STATUS_REG SCIFA_SCASSR +#define TX_FIFO_REG SCIFA_SCAFTDR #endif /* - * SCIF UART wait UART to be ready to transmit + * SCIF(A) UART wait UART to be ready to transmit * rb: register which contains the UART base address * rc: scratch register */ @@ -37,7 +40,7 @@ .endm /* - * SCIF UART transmit character + * SCIF(A) UART transmit character * rb: register which contains the UART base address * rt: register which contains the character to transmit */