From nobody Sun Feb 8 10:17:37 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1559938704; cv=none; d=zoho.com; s=zohoarc; b=cRYa022+C9qUznmHMsuN/2T8EVHuT2xiCKGvFezMgFmFlUnOpl2jTBW99PoRXADa5go+rDYRMosSoMlgpAr84mQTkeVc7THszoOdwGMeYoewCVH15+BkDbYL03yc5VjJny+vJzrg14SGzFEF8uLEMtA7RG/Tku3yxe+8DrqIcW8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559938704; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=t0Fz+Srn7D/QoWa1rytj9WX/s2Iv7kWcoW1bwqc0aVU=; b=luOuMVPML3P3XYkAf2u9y9R77LQo7LRYYCiwDbTAu4djwZSDeB9rVzrOZICzDf4APRCYj+1IlI+rTfic+Phwi2980mUEmWiaslbUWL5+cP9JGXlyF71C4V3jyUlT0ZspZYIdGK451iGGPI8yT8dfjCk+7xomzv/tVGIW1sEmQwM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1559938704537220.99423082250178; Fri, 7 Jun 2019 13:18:24 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hZLIK-0007jE-Jh; Fri, 07 Jun 2019 20:17:00 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hZLIJ-0007j9-W2 for xen-devel@lists.xenproject.org; Fri, 07 Jun 2019 20:17:00 +0000 Received: from mail-pl1-x642.google.com (unknown [2607:f8b0:4864:20::642]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 33d45f09-8961-11e9-8980-bc764e045a96; Fri, 07 Jun 2019 20:16:58 +0000 (UTC) Received: by mail-pl1-x642.google.com with SMTP id a93so1232564pla.7 for ; Fri, 07 Jun 2019 13:16:58 -0700 (PDT) Received: from localhost.localdomain ([223.233.80.237]) by smtp.gmail.com with ESMTPSA id a12sm4407502pgq.0.2019.06.07.13.16.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Jun 2019 13:16:56 -0700 (PDT) X-Inumbo-ID: 33d45f09-8961-11e9-8980-bc764e045a96 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=P+vzjtp1i44txySUhOSs0ClNAsx/SX8KzzDN/ABCcHA=; b=Rq4m8h4RliGU0ykVi+KjpYlzFaE5803cX8T9xqTIXcYqk4OZtC59Z/8LXeJ6kye7+q HtIFpQEBcVl0vL74ugArv64kgW1BcxaDeyETCidPjwOwuHWMzIU79JpOpM0tiBeM+OlM RhLQKpKyN86ZviftTZ8B2n4dcn7HpVX62XRx3yzBVCzwHymUvWqQHbGIO8hCy+kToxWZ 7ED6NTWaTkhNoDIaGzqMLBX0tiDQcj6A3EbjTVqx7fk8p3D8BwJ3boFfzbYc0utqYYUL 3tL2pgt1zDMSikLAdTa8Xrgvi/eVA56MWJeZAVDMuaPlJv9ITTzRsBXBqOJ2RpsD01kU uWhw== 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=P+vzjtp1i44txySUhOSs0ClNAsx/SX8KzzDN/ABCcHA=; b=g+wJTbuTYA1T9lPOBeDfV2K+JbsuFbdstcoujekuiPnv1IElXQMIj9/oN2n0Mi6Vdy LYlSevDQgMHfASkxdzDAPd2x42RbEqUE3PLeMChunWBZgHo+Tc42YG66W39V18iReQ9g b90u+dl4DlVSe7Jg3aOasYg+muorZNxjGZGBEX1UNBGWub3qqQBlfOJkbh+6RDcLaWpS os6i5WBRTcrXPcrjVN5+ibws2wJrGhxFoZ3JceIrwur5MPMWr2rwR/npyAI26FS0vpw8 XwwZQP39kdJDZWOGovaeNjs3ko0xyYK9+nNsHToiHeo58/zfnl9RM5nJzQ6pa4YJr3Wr /Vmg== X-Gm-Message-State: APjAAAX/SlmfhsKNFqwGYCuK4ELF79TIiCnxuYMUAzxbaILwnoN5dclD ko7HyS6mx+IEMd6TPs4FFR6XDuE4 X-Google-Smtp-Source: APXvYqyhr83QMokrjPqmMVUNglnmoksowai/QwtttTkouYNjXvIXJRSHY9ZfREctTqg38/TBwZe9Qw== X-Received: by 2002:a17:902:42a5:: with SMTP id h34mr20024752pld.16.1559938617704; Fri, 07 Jun 2019 13:16:57 -0700 (PDT) From: Amit Singh Tomar To: xen-devel@lists.xenproject.org Date: Sat, 8 Jun 2019 01:46:35 +0530 Message-Id: <1559938596-5696-2-git-send-email-amittomer25@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559938596-5696-1-git-send-email-amittomer25@gmail.com> References: <1559938596-5696-1-git-send-email-amittomer25@gmail.com> Subject: [Xen-devel] [RFC PATCH 1/2] xen/arm: Add i.MX8MQ SoCs earlyprintk support 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: andre.przywara@arm.com, julien.grall@arm.com, sstabellini@kernel.org, peng.fan@nxp.com, Amit Singh Tomar MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This patch adds earlyprintk support for i.MX8MQ SoC based boards. As with most of other debug code for other platforms, uart is initialized by bootloaders(for instance u-boot[1]). [1]:https://github.com/u-boot/u-boot/blob/master/drivers/serial/serial_mxc.= c#L141 Signed-off-by: Amit Singh Tomar --- xen/arch/arm/arm64/debug-imx8mq.inc | 54 +++++++++++++++++++++++++++++++++= ++++ 1 file changed, 54 insertions(+) create mode 100644 xen/arch/arm/arm64/debug-imx8mq.inc diff --git a/xen/arch/arm/arm64/debug-imx8mq.inc b/xen/arch/arm/arm64/debug= -imx8mq.inc new file mode 100644 index 0000000..ec331dc --- /dev/null +++ b/xen/arch/arm/arm64/debug-imx8mq.inc @@ -0,0 +1,54 @@ +/* + * xen/arch/arm/arm64/debug-imx8mq.inc + * + * IMX8MQ specific debug code. + * + * Copyright (c) 2019, Amit Singh Tomar . + * + * This program is free software; you can redistribute it and/or + * modify it under the terms and conditions of the GNU General Public + * License, version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; If not, see . + */ + +#define UTXD 0x40 +#define UTS 0xb4 +#define UTS_TXEMPTY 3<<1 + +.macro early_uart_init xb, c +/* Uart has already been initialized by bootloader Firmware, for instance = by TF-A */ +.endm + +/* + * IMX8MQ UART wait UART to be ready to transmit + * xb: register which contains the UART base address + * c: scratch register + */ +.macro early_uart_ready xb c +1: + ldr w\c, [\xb, #UTS] /* UART Test Register */ + tbz w\c, #UTS_TXEMPTY, 1b /* Check TXEMPTY bit */ +.endm + +/* + * IMX8MQ UART transmit character + * xb: register which contains the UART base address + * wt: register which contains the character to transmit + */ +.macro early_uart_transmit xb wt + str \wt, [\xb, #UTXD] +.endm + +/* + * Local variables: + * mode: ASM + * indent-tabs-mode: nil + * End: + */ --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel