From patchwork Mon Nov 19 01:01:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sugaya Taichi X-Patchwork-Id: 10688101 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 F2CB314BD for ; Mon, 19 Nov 2018 01:01:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E25CB2957F for ; Mon, 19 Nov 2018 01:01:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6AF42958A; Mon, 19 Nov 2018 01:01:03 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 628B5295AD for ; Mon, 19 Nov 2018 01:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=gVhAXQpUiteYZH5hDAvMga+CWj1PNotJqcirVmX+O1Y=; b=I8qLdTzDbvfNP8r+asQYMOreGX N1PU13l9N0XBU+q/UQ4wh4Tp6r1QaKmIWK5bRTPOA4AjqugSFf2K+H5ru9VCybPqu0/LlKiFbWEbq /ZJG2pFcRSeewjI5gIfPoHAPwGvtYnt9+h6elX2prH8CTZduTM/O9ya25NbCB3FgE9U+x7M5khqSw W/pLBP54ii+yTOLAnAfBdov/7V7aximBAp+h0EJ4egS0dviHpJH0GWW2vWvmhGSf14YgA0jcUPNt7 SBml9vaPwPTM+fOJ2OB3ld9U8F/DG/Ex7zkB96xLXEr50p4/oBfBFFmGMMZJEic9v07RK4LS7YeMn 60Q39ZBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gOXvn-0000O4-Kr; Mon, 19 Nov 2018 01:00:51 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gOXvm-0000Ms-GA for linux-arm-kernel@bombadil.infradead.org; Mon, 19 Nov 2018 01:00:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+ZzJLIOddXXCJiJ/uq4PNVXLO4hPhqn1t2ruihFITak=; b=HBlLfxpkJ4ab12ee4/j0+EGTN tElhgxzGNl5lws4RNg6YObka/HtZJ4tme66rZdlDQqsKga2pyvT+AQo4eOo5AecP5bOlFJdVz6+zi fBGmn8HjICNR5fsiOVCVaJ/iHzZ6yfOGVEDC5uF4q5Fkg00+fhLB6Pu0dwfhtL7f3hqSy5IDcJmRx 82ngrnEP4b4KZkKUP8IPFwGooRSTpplgbvLDCqvP0E15PRFBz9JQPvSj4BMxGXfoVtIVJNHJjzEZW 3vFB9S/ktmebv8Wf5cD9Yoj+Z9wC2418aTikXZ4OxOlQ5KdxVSruD+RIG0bgdVbchCypo8UmVbuhg bh/nxk0tQ==; Received: from mx.socionext.com ([202.248.49.38]) by merlin.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gOXvj-0003OQ-OY for linux-arm-kernel@lists.infradead.org; Mon, 19 Nov 2018 01:00:48 +0000 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 19 Nov 2018 10:00:35 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 4F7F6180111; Mon, 19 Nov 2018 10:00:35 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Mon, 19 Nov 2018 10:00:35 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id B0C8740387; Mon, 19 Nov 2018 10:00:33 +0900 (JST) Received: from M20VSDK.e01.socionext.com (unknown [10.213.118.34]) by yuzu.css.socionext.com (Postfix) with ESMTP id 8EDB2120455; Mon, 19 Nov 2018 10:00:33 +0900 (JST) From: Sugaya Taichi To: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH 03/14] ARM: milbeaut: Add Milbeaut M10V early printk Date: Mon, 19 Nov 2018 10:01:08 +0900 Message-Id: <1542589274-13878-4-git-send-email-sugaya.taichi@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1542589274-13878-1-git-send-email-sugaya.taichi@socionext.com> References: <1542589274-13878-1-git-send-email-sugaya.taichi@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181118_200048_214420_83188FC1 X-CRM114-Status: GOOD ( 25.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Sugaya Taichi , Masami Hiramatsu , Stephen Boyd , Greg Kroah-Hartman , Michael Turquette , Daniel Lezcano , Russell King , Jassi Brar , Rob Herring , Jiri Slaby , Thomas Gleixner MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add Milbeaut M10V earlyprintk. Signed-off-by: Sugaya Taichi --- arch/arm/Kconfig.debug | 12 ++++++++++-- arch/arm/include/debug/milbeaut.S | 25 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 arch/arm/include/debug/milbeaut.S diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index d6a49f5..5c44533 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1413,6 +1413,11 @@ choice options; the platform specific options are deprecated and will be soon removed. + config DEBUG_LL_MILBEAUT_UART + bool "Kernel low-level debug output via USIO" + depends on ARCH_MILBEAUT + help + Say Y here if you want to debug with USIO endchoice config DEBUG_AT91_UART @@ -1534,6 +1539,7 @@ config DEBUG_LL_INCLUDE default "debug/bcm63xx.S" if DEBUG_BCM63XX_UART default "debug/digicolor.S" if DEBUG_DIGICOLOR_UA0 default "debug/brcmstb.S" if DEBUG_BRCMSTB_UART + default "debug/milbeaut.S" if DEBUG_LL_MILBEAUT_UART default "mach/debug-macro.S" # Compatibility options for PL01x @@ -1580,6 +1586,7 @@ config DEBUG_UART_PHYS default 0x18020000 if DEBUG_SIRFATLAS7_UART1 default 0x18023000 if DEBUG_BCM_IPROC_UART3 default 0x1c090000 if DEBUG_VEXPRESS_UART0_RS1 + default 0x1e700010 if ARCH_MILBEAUT_M10V default 0x20001000 if DEBUG_HIP01_UART default 0x20060000 if DEBUG_RK29_UART0 default 0x20064000 if DEBUG_RK29_UART1 || DEBUG_RK3X_UART2 @@ -1681,7 +1688,7 @@ config DEBUG_UART_PHYS DEBUG_S3C64XX_UART || \ DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \ DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 || \ - DEBUG_AT91_UART + DEBUG_AT91_UART || DEBUG_LL_MILBEAUT_UART config DEBUG_UART_VIRT hex "Virtual base address of debug UART" @@ -1755,6 +1762,7 @@ config DEBUG_UART_VIRT default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART default 0xfe230000 if DEBUG_PICOXCELL_UART default 0xfe300000 if DEBUG_BCM_KONA_UART + default 0xfe700010 if ARCH_MILBEAUT_M10V default 0xfe800000 if ARCH_IOP32X default 0xfeb00000 if DEBUG_HI3620_UART || DEBUG_HIX5HD2_UART default 0xfeb24000 if DEBUG_RK3X_UART0 @@ -1796,7 +1804,7 @@ config DEBUG_UART_VIRT DEBUG_S3C64XX_UART || \ DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \ DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 || \ - DEBUG_AT91_UART + DEBUG_AT91_UART || DEBUG_LL_MILBEAUT_UART config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART" diff --git a/arch/arm/include/debug/milbeaut.S b/arch/arm/include/debug/milbeaut.S new file mode 100644 index 0000000..0660e0f --- /dev/null +++ b/arch/arm/include/debug/milbeaut.S @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2018 Socionext Inc. + */ + + .macro addruart, rp, rv, tmp + ldr \rp, =CONFIG_DEBUG_UART_PHYS + ldr \rv, =CONFIG_DEBUG_UART_VIRT + .endm + + .macro senduart,rd,rx + strh \rd, [\rx, #0x04] @ write to TxData register + .endm + + .macro waituart,rd,rx +1: ldrb \rd, [\rx, #0x03] @ SSR + tst \rd, #1 << 1 @ check TDRE bit + beq 1b + .endm + + .macro busyuart,rd,rx +2: ldrb \rd, [\rx, #0x03] @ SSR + tst \rd, #1 << 1 @ check TEMT bit + beq 2b + .endm