Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2147102imu; Sun, 18 Nov 2018 17:04:24 -0800 (PST) X-Google-Smtp-Source: AJdET5dpq9hjuH+Qm8jCosdE+GGMDp91fIacswJ9ZshyVTR2nn+L5v1ZecjghIAgoE+MbCfBBqeb X-Received: by 2002:a63:a064:: with SMTP id u36mr18361644pgn.145.1542589464442; Sun, 18 Nov 2018 17:04:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542589464; cv=none; d=google.com; s=arc-20160816; b=WCDR8BAKsdq8R6iHWu8BO4Nq1O3FJaBtxAeb5l0SrVIcKyPzc2Rons0Ih2ej7P1YME 4v+lMWT0NK4APFCO07jbK930dHL3tMqw9zTJr5bfBSXoz7Rp91a4o6imOmvcuw6scEOw 0SkISJeJ3R7oF8i4uAfLZMnkvR2hm8sd0ancbXgytwfS6UdzeRoSjefE8To4zgOGAldK J4hVlTAbQoEQqbcbk2fKOrEbUG9faJnpDPwx8TV3HMXFPDaU8+n1lJDsJfwT+4zhn551 ja1C+bCYq8kCoOHlWsBv8Z0BC4kZ72V/8NnNCm10DUGRfk+v9TAh3cd+29k83+nyMov1 werw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=+ZzJLIOddXXCJiJ/uq4PNVXLO4hPhqn1t2ruihFITak=; b=WwaElWmEmAav3oA/iJAK1iDUkmO54WIFKPAF+ZBwYUxzBWLvSjtnKb5FtclAbFRiIz 4sFGX9uJ+3rRNQYatfzCl7TSVLs8pDkMPbu/XEs8WVryKUB23M6yljoeua8RsQnKx85X CxDUntAVhys8u9ieY918RwF2bj3WFmAyzISJRAnhE7h0r6E0xRmYK0HwEyEw3XvRimds eKSkK4uMfyADgrS4skAG8lMngBoB5zvq40fITpyilAM5/h1EBguhdAcC8vnbw+I4WqJL ABtUzMOCEZDJ+HAI/s9cPdwRZ7dnP/XwSDpcwWMTXmov09s23wkUqx71M78YQFLzx5oj SJYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17si27411251pfc.198.2018.11.18.17.04.10; Sun, 18 Nov 2018 17:04:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727647AbeKSLWb (ORCPT + 99 others); Mon, 19 Nov 2018 06:22:31 -0500 Received: from mx.socionext.com ([202.248.49.38]:40673 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbeKSLWb (ORCPT ); Mon, 19 Nov 2018 06:22:31 -0500 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 Cc: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Greg Kroah-Hartman , Daniel Lezcano , Thomas Gleixner , Russell King , Jiri Slaby , Masami Hiramatsu , Jassi Brar , Sugaya Taichi 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 1.9.1