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: 151442 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2057642ljp; Sun, 18 Nov 2018 17:00:40 -0800 (PST) X-Google-Smtp-Source: AJdET5euPIVsTrGzJSydm6B5Uft45hPDe8gPNkDA+iiNDLtMZZ75fm2KhpyEWgZV7EP7ae5kFIV1 X-Received: by 2002:a17:902:bb86:: with SMTP id m6mr20555629pls.315.1542589240839; Sun, 18 Nov 2018 17:00:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542589240; cv=none; d=google.com; s=arc-20160816; b=TyfIvwTxixqCM2CBHTuyxUHTN/gmDRonTDZHJBmrPiERcMfFEKtaVFfxlhqzTelQkE MlZmzqauWFMEoGJgpBXWwvSp5TMrjhwD4HOGqeOZzSw4y+E4ZCpqx/SK/dXCRiQ18Cyv /WU9Bgh5VpEVoDpU4kRsIJvfvG7ghK95Lr/A9F5EBo3lCLvuXhCcc5n0pFlLpoo0/jDR O4P37H28yDFP9vbfS+1LKi4IUAq2gcpVZFk9BmLPrd926LnSSkws7YLJguTnIT4QjSDp suJOnViWz5kyl30nkII30Y03IxU1TTkqWTd4uWUHGQDYSxHOGUk/4NSwBQ9goy8u9HeK U08g== 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 37-v6si40400258ple.389.2018.11.18.17.00.40; Sun, 18 Nov 2018 17:00:40 -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 S1727675AbeKSLWb (ORCPT + 32 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 -- 1.9.1 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