From patchwork Wed Feb 28 22:39:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 130083 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp296439lja; Wed, 28 Feb 2018 14:39:50 -0800 (PST) X-Google-Smtp-Source: AH8x224kJ2WvHECow9R2LTrKWKT+Ueb2c7tEG7qBuDrO7T7rkYeMCzJQMlzMztSf3wymlD1yWlT7 X-Received: by 2002:a17:902:b686:: with SMTP id c6-v6mr19477086pls.339.1519857589940; Wed, 28 Feb 2018 14:39:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519857589; cv=none; d=google.com; s=arc-20160816; b=sfgt0vpSZGsSrPwC67ym0k1mTi8rNO3KpHH9q5aUXpZHLPh8jvoucMyvD0mU1b+Vxp FNYYIfYvjIP92MhcmTB2L+wtYwxu4laHj4rGQQGTsJQGCX0WpEw7Fp6JPArh1eIOzbEc 7BPqPQG15myjBClfF5p3EF/Co6F3cuS18nuV6YzF4dzU7sgNwfUEO1puJ80zoMW90fOl Fja2JAqxL5aAP9xe8sXuooZHpVWHKivaEl+NotclQuoDaQTokIy62cxnRaa76ibRLGfx hyYDERpNeApvQAYi0Odu8gT3gpnkD8y3V7U4VmQWTCFsq12rE7rx2udRfOOBJN34mgQH IxPQ== 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:arc-authentication-results; bh=fhUClqNi0wtIHno3J1zZ4NoWqwFtpkcpzp90d6rEC1E=; b=jk8MyGe45Jwsh3/rhfFjAhVliLM/A3JLs5xKXWXXg0mXR1NhYDMDpgPClPGEtpCBCy hJWUtQ3P3z3CvyJoL/XNcQ+Qc6rgtkxc6t/0ws/AZdz7WbMao1VPfYXpI55Bnc3jcbc6 ItqpaK+uO9Hx7PoWPN0kriF0X6dw+NfPvyv+wNKV498zlvJ8emzFWQBtb+iB4MAaeYEU cs+z4x7WEs/9MIYdk3iy2Fq3Thr13y0f8N4xtsxUEnQ74RsKcmnvYatPCHx3z0yt2HzN n4NvD3wB1/YTg3nZbaJ9Vuxox9rZ3mk6LXlFjjkxZstsbvbJvPSsWGe6dHrTcZWuSMdN cyjg== 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 s16-v6si1936077plp.358.2018.02.28.14.39.49; Wed, 28 Feb 2018 14:39:49 -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 S935531AbeB1Wjq (ORCPT + 28 others); Wed, 28 Feb 2018 17:39:46 -0500 Received: from mail-oi0-f65.google.com ([209.85.218.65]:43141 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935486AbeB1Wjl (ORCPT ); Wed, 28 Feb 2018 17:39:41 -0500 Received: by mail-oi0-f65.google.com with SMTP id a207so3045825oii.10 for ; Wed, 28 Feb 2018 14:39:41 -0800 (PST) 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=fhUClqNi0wtIHno3J1zZ4NoWqwFtpkcpzp90d6rEC1E=; b=E4V9wNtMkymJ5S72P/b51YjcF2EGGPUmDEsS7CtHMXEdOfoykfW2WtjVK5ZCiU8CUZ 5UBldDEY6WznHYhoKV+d+VdAN3BSUWjN2lKm1LXGNruz4UYmKNPfZURLgB9uO9UDzOa5 CWdwW+cr9ixAhnIHwJYJiYlxOJx5jzhm54cWusidl/Gb4Pgspvw+sIWyJwO1wnj3wqJ4 LdEt6TDNgYa/+FWOwr2VmWH2C9SZI0kkUQnGtWtHgzJ+KmPI5exQ+Xdq+BcneRXzllaV nLrcMQoQrJ9CHdDD7l2EepI4xuKRQi865vIO0FMeUA7DbMM3O92tae66HDklNcsfESvr 5D+g== X-Gm-Message-State: APf1xPDsJajKs79NUmmneuxCcqWPlKgMQ0pAN/gyTl84qvLUelyWbCq+ VE9Y9dUSF+9mvsZBkKcwv3RGXzE= X-Received: by 10.202.223.134 with SMTP id w128mr9053836oig.52.1519857581386; Wed, 28 Feb 2018 14:39:41 -0800 (PST) Received: from xps15.herring.priv (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id d45sm1356835otf.72.2018.02.28.14.39.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2018 14:39:40 -0800 (PST) From: Rob Herring To: Michal Simek Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/3] microblaze: remove unnecessary prom.h includes Date: Wed, 28 Feb 2018 16:39:35 -0600 Message-Id: <20180228223937.29196-2-robh@kernel.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180228223937.29196-1-robh@kernel.org> References: <20180228223937.29196-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to remove prom.h, remove unnecessary prom.h includes. Signed-off-by: Rob Herring Cc: Michal Simek --- arch/microblaze/include/asm/cpuinfo.h | 2 +- arch/microblaze/include/asm/pci.h | 1 - arch/microblaze/kernel/platform.c | 1 - arch/microblaze/pci/indirect_pci.c | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) -- 2.14.1 diff --git a/arch/microblaze/include/asm/cpuinfo.h b/arch/microblaze/include/asm/cpuinfo.h index 3337417fcdca..8f4996730552 100644 --- a/arch/microblaze/include/asm/cpuinfo.h +++ b/arch/microblaze/include/asm/cpuinfo.h @@ -13,7 +13,7 @@ #ifndef _ASM_MICROBLAZE_CPUINFO_H #define _ASM_MICROBLAZE_CPUINFO_H -#include +#include /* CPU Version and FPGA Family code conversion table type */ struct cpu_ver_key { diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h index 114b93488193..c1ee76d30aed 100644 --- a/arch/microblaze/include/asm/pci.h +++ b/arch/microblaze/include/asm/pci.h @@ -19,7 +19,6 @@ #include #include -#include #include #define PCIBIOS_MIN_IO 0x1000 diff --git a/arch/microblaze/kernel/platform.c b/arch/microblaze/kernel/platform.c index b9529caa507a..2540d60610d9 100644 --- a/arch/microblaze/kernel/platform.c +++ b/arch/microblaze/kernel/platform.c @@ -12,7 +12,6 @@ #include #include -#include #include static struct of_device_id xilinx_of_bus_ids[] __initdata = { diff --git a/arch/microblaze/pci/indirect_pci.c b/arch/microblaze/pci/indirect_pci.c index ae4fca46c9f6..24030837a425 100644 --- a/arch/microblaze/pci/indirect_pci.c +++ b/arch/microblaze/pci/indirect_pci.c @@ -16,7 +16,6 @@ #include #include -#include #include static int From patchwork Wed Feb 28 22:39:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 130085 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp296726lja; Wed, 28 Feb 2018 14:40:14 -0800 (PST) X-Google-Smtp-Source: AH8x225DA2I6CODxcQO54IKKWO/PZtBHxuOEaozHxlS/ASascifpyjFFe9U/le4Z5LS5RuJoTJTF X-Received: by 10.99.96.73 with SMTP id u70mr14992912pgb.199.1519857613845; Wed, 28 Feb 2018 14:40:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519857613; cv=none; d=google.com; s=arc-20160816; b=0EyMymTXtOuGedTK8411Imgky9FtFM4LVTxLusAY6GLTTOVmMgKEq1Rr5rF3rVGyAZ BVRvkN7uuw+T8qPpdPPA0d+bI6ar7wErL62Tq/4uT6bKEJEIlq2ZQOW4hlbYUuOWxMGq fYKSMdSRMLTFe/Svz70jCXI+vd5u/YstNFuDrUIWaD6MyaC38/5osIW1Iwf6BP0Qyt2v 7ivhHq2Vb6HUT/V+uDEAJsUySaPCgSj5XZBzThLP0KIIj1SHEY9AgZU5p8ijwh/84L/1 GDRHizTVLTlGSlLfp5HNsouOgjgMI67nk+bDvAYyHXs/a9PrCcpp3Sk2jVyIOmuuNJwQ W6rg== 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:arc-authentication-results; bh=zuG+NugxPPo4pFEeJbrMiP/Z/tmkq/VLl9aDWJQsuK4=; b=wzdyhi+4QbDv/lEf/28UXRigXm96L+d/PYY7+X3NmjyzdJoDtPrtXvgKZAcTJBjvrr +XIzQJvUcR2EFIfit3BuI0HTew6yARZfgOyhztbdIkSpzJXsEUdMyXoMgYvm4/wxzI4/ af7bsd7PHPGvRnWEyq1X0cqTCYHR3erBk2IvBwNJIdHM8blWs2/ez3TU/FHKex6dLpGj 0GGOMqDI8KmCUSqeaNklRsSZ8PFEFTuYQ2F9r8BeEy23ST7Hz/nF5WDWs2/WpbW0mNOl KCQPxeYGrcSl8uLzIBSAXIRgiWq2pf/PTT9wKjWJ+wlJYfghTdlL8xZlocMQb5z1kPgo iDLg== 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 ay2-v6si1911571plb.749.2018.02.28.14.40.13; Wed, 28 Feb 2018 14:40:13 -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 S935568AbeB1WkK (ORCPT + 28 others); Wed, 28 Feb 2018 17:40:10 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:36020 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935511AbeB1Wjo (ORCPT ); Wed, 28 Feb 2018 17:39:44 -0500 Received: by mail-oi0-f68.google.com with SMTP id u73so3067204oie.3 for ; Wed, 28 Feb 2018 14:39:44 -0800 (PST) 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=zuG+NugxPPo4pFEeJbrMiP/Z/tmkq/VLl9aDWJQsuK4=; b=YizCMj+rrOK5tMj7f+psPuDnI9YsyIb/pCKK06EE+tGwZ4h5mn6coD5yLcc9WKyDNS ucyRHYdXm/842RIO2pQl4XA/yVNj4x6OfODG+y4HgiYudYKT/RAZpfYmixFatuw8W2co z3xro5u5JkTLmIbByLX1ofA4pWRWfdgNt2x4FtT3pqre2Y9UNWPkFh5YVPz5cdLAuKrn pbcHN1TloKcVrUC8NzY2Tj7RFzFZHHcuObsq2yO6mKEVsGmF6iEcgjpfNNlcz7ZLsi3c xUrkIw8+Uu3X9eguFr6AY1l0HS+8HyB+/9XlC4kBh92T9ti9BtIe3TpNoMYYFl3XjX6b snuA== X-Gm-Message-State: APf1xPBGhWJbp9M0vzc7wUtJ/BeWPqBrgpAWFDrjURDpiSPbZhsqx0Nu NkzCmxGpstphSfZji3bEXsv0zGE= X-Received: by 10.84.78.21 with SMTP id a21mr9909238oiy.172.1519857583418; Wed, 28 Feb 2018 14:39:43 -0800 (PST) Received: from xps15.herring.priv (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id d45sm1356835otf.72.2018.02.28.14.39.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2018 14:39:42 -0800 (PST) From: Rob Herring To: Michal Simek Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/3] microblaze: remove redundant early_printk support Date: Wed, 28 Feb 2018 16:39:36 -0600 Message-Id: <20180228223937.29196-3-robh@kernel.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180228223937.29196-1-robh@kernel.org> References: <20180228223937.29196-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With earlycon support now enabled, the arch specific early_printk support can be removed. Signed-off-by: Rob Herring Cc: Michal Simek --- arch/microblaze/Kconfig.debug | 8 -- arch/microblaze/include/asm/prom.h | 27 ----- arch/microblaze/kernel/Makefile | 1 - arch/microblaze/kernel/early_printk.c | 184 ---------------------------------- arch/microblaze/kernel/misc.S | 35 ------- arch/microblaze/kernel/prom.c | 80 --------------- arch/microblaze/kernel/setup.c | 12 +-- 7 files changed, 1 insertion(+), 346 deletions(-) delete mode 100644 arch/microblaze/include/asm/prom.h delete mode 100644 arch/microblaze/kernel/early_printk.c -- 2.14.1 diff --git a/arch/microblaze/Kconfig.debug b/arch/microblaze/Kconfig.debug index 012e377330cd..331a3bb66297 100644 --- a/arch/microblaze/Kconfig.debug +++ b/arch/microblaze/Kconfig.debug @@ -8,14 +8,6 @@ config TRACE_IRQFLAGS_SUPPORT source "lib/Kconfig.debug" -config EARLY_PRINTK - bool "Early printk function for kernel" - depends on SERIAL_UARTLITE_CONSOLE || SERIAL_8250_CONSOLE - default n - help - This option turns on/off early printk messages to console. - First Uartlite node is taken. - config HEART_BEAT bool "Heart beat function for kernel" default n diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h deleted file mode 100644 index 2f03ac815851..000000000000 --- a/arch/microblaze/include/asm/prom.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Definitions for talking to the Open Firmware PROM on - * Power Macintosh computers. - * - * Copyright (C) 1996-2005 Paul Mackerras. - * - * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _ASM_MICROBLAZE_PROM_H -#define _ASM_MICROBLAZE_PROM_H - -#include - -/* Other Prototypes */ -enum early_consoles { - UARTLITE = 1, - UART16550 = 2, -}; - -extern int of_early_console(void *version); - -#endif /* _ASM_MICROBLAZE_PROM_H */ diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile index 0da76fa1ab17..7e99cf6984a1 100644 --- a/arch/microblaze/kernel/Makefile +++ b/arch/microblaze/kernel/Makefile @@ -22,7 +22,6 @@ obj-y += dma.o exceptions.o \ obj-y += cpu/ -obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-$(CONFIG_HEART_BEAT) += heartbeat.o obj-$(CONFIG_MODULES) += microblaze_ksyms.o module.o obj-$(CONFIG_MMU) += misc.o diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c deleted file mode 100644 index 365f2d53f1b2..000000000000 --- a/arch/microblaze/kernel/early_printk.c +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Early printk support for Microblaze. - * - * Copyright (C) 2007-2009 Michal Simek - * Copyright (C) 2007-2009 PetaLogix - * Copyright (C) 2003-2006 Yasushi SHOJI - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static u32 base_addr; - -#ifdef CONFIG_SERIAL_UARTLITE_CONSOLE -static void early_printk_uartlite_putc(char c) -{ - /* - * Limit how many times we'll spin waiting for TX FIFO status. - * This will prevent lockups if the base address is incorrectly - * set, or any other issue on the UARTLITE. - * This limit is pretty arbitrary, unless we are at about 10 baud - * we'll never timeout on a working UART. - */ - - unsigned retries = 1000000; - /* read status bit - 0x8 offset */ - while (--retries && (in_be32(base_addr + 8) & (1 << 3))) - ; - - /* Only attempt the iowrite if we didn't timeout */ - /* write to TX_FIFO - 0x4 offset */ - if (retries) - out_be32(base_addr + 4, c & 0xff); -} - -static void early_printk_uartlite_write(struct console *unused, - const char *s, unsigned n) -{ - while (*s && n-- > 0) { - if (*s == '\n') - early_printk_uartlite_putc('\r'); - early_printk_uartlite_putc(*s); - s++; - } -} - -static struct console early_serial_uartlite_console = { - .name = "earlyser", - .write = early_printk_uartlite_write, - .flags = CON_PRINTBUFFER | CON_BOOT, - .index = -1, -}; -#endif /* CONFIG_SERIAL_UARTLITE_CONSOLE */ - -#ifdef CONFIG_SERIAL_8250_CONSOLE -static void early_printk_uart16550_putc(char c) -{ - /* - * Limit how many times we'll spin waiting for TX FIFO status. - * This will prevent lockups if the base address is incorrectly - * set, or any other issue on the UARTLITE. - * This limit is pretty arbitrary, unless we are at about 10 baud - * we'll never timeout on a working UART. - */ - - #define UART_LSR_TEMT 0x40 /* Transmitter empty */ - #define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ - #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) - - unsigned retries = 10000; - - while (--retries && - !((in_be32(base_addr + 0x14) & BOTH_EMPTY) == BOTH_EMPTY)) - ; - - if (retries) - out_be32(base_addr, c & 0xff); -} - -static void early_printk_uart16550_write(struct console *unused, - const char *s, unsigned n) -{ - while (*s && n-- > 0) { - if (*s == '\n') - early_printk_uart16550_putc('\r'); - early_printk_uart16550_putc(*s); - s++; - } -} - -static struct console early_serial_uart16550_console = { - .name = "earlyser", - .write = early_printk_uart16550_write, - .flags = CON_PRINTBUFFER | CON_BOOT, - .index = -1, -}; -#endif /* CONFIG_SERIAL_8250_CONSOLE */ - -int __init setup_early_printk(char *opt) -{ - int version = 0; - - if (early_console) - return 1; - - base_addr = of_early_console(&version); - if (base_addr) { -#ifdef CONFIG_MMU - early_console_reg_tlb_alloc(base_addr); -#endif - switch (version) { -#ifdef CONFIG_SERIAL_UARTLITE_CONSOLE - case UARTLITE: - pr_info("Early console on uartlite at 0x%08x\n", - base_addr); - early_console = &early_serial_uartlite_console; - break; -#endif -#ifdef CONFIG_SERIAL_8250_CONSOLE - case UART16550: - pr_info("Early console on uart16650 at 0x%08x\n", - base_addr); - early_console = &early_serial_uart16550_console; - break; -#endif - default: - pr_info("Unsupported early console %d\n", - version); - return 1; - } - - register_console(early_console); - return 0; - } - return 1; -} - -/* Remap early console to virtual address and do not allocate one TLB - * only for early console because of performance degression */ -void __init remap_early_printk(void) -{ - if (!early_console) - return; - pr_info("early_printk_console remapping from 0x%x to ", base_addr); - base_addr = (u32) ioremap(base_addr, PAGE_SIZE); - pr_cont("0x%x\n", base_addr); - -#ifdef CONFIG_MMU - /* - * Early console is on the top of skipped TLB entries - * decrease tlb_skip size ensure that hardcoded TLB entry will be - * used by generic algorithm - * FIXME check if early console mapping is on the top by rereading - * TLB entry and compare baseaddr - * mts rtlbx, (tlb_skip - 1) - * nop - * mfs rX, rtlblo - * nop - * cmp rX, orig_base_addr - */ - tlb_skip -= 1; -#endif -} - -void __init disable_early_printk(void) -{ - if (!early_console) - return; - pr_warn("disabling early console\n"); - unregister_console(early_console); - early_console = NULL; -} diff --git a/arch/microblaze/kernel/misc.S b/arch/microblaze/kernel/misc.S index 1dafddeb8a0b..6759af688451 100644 --- a/arch/microblaze/kernel/misc.S +++ b/arch/microblaze/kernel/misc.S @@ -63,38 +63,3 @@ _tlbie_1: nop .size _tlbie, . - _tlbie - -/* - * Allocate TLB entry for early console - */ -.globl early_console_reg_tlb_alloc; -.type early_console_reg_tlb_alloc, @function -.align 4; -early_console_reg_tlb_alloc: - /* - * Load a TLB entry for the UART, so that microblaze_progress() can use - * the UARTs nice and early. We use a 4k real==virtual mapping. - */ - lwi r4, r0, tlb_skip - mts rtlbx, r4 /* TLB slot 63 */ - - or r4,r5,r0 - andi r4,r4,0xfffff000 - ori r4,r4,(TLB_WR|TLB_I|TLB_M|TLB_G) - - andi r5,r5,0xfffff000 - ori r5,r5,(TLB_VALID | TLB_PAGESZ(PAGESZ_4K)) - - mts rtlblo,r4 /* Load the data portion of the entry */ - nop - mts rtlbhi,r5 /* Load the tag portion of the entry */ - nop - - lwi r5, r0, tlb_skip - addik r5, r5, 1 - swi r5, r0, tlb_skip - - rtsd r15, 8 - nop - - .size early_console_reg_tlb_alloc, . - early_console_reg_tlb_alloc diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index 68f099960ebc..f15cc1933bab 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c @@ -13,91 +13,11 @@ * 2 of the License, or (at your option) any later version. */ -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CONFIG_EARLY_PRINTK -static const char *stdout; - -static int __init early_init_dt_scan_chosen_serial(unsigned long node, - const char *uname, int depth, void *data) -{ - int l; - const char *p; - - pr_debug("%s: depth: %d, uname: %s\n", __func__, depth, uname); - - if (depth == 1 && (strcmp(uname, "chosen") == 0 || - strcmp(uname, "chosen@0") == 0)) { - p = of_get_flat_dt_prop(node, "linux,stdout-path", &l); - if (p != NULL && l > 0) - stdout = p; /* store pointer to stdout-path */ - } - - if (stdout && strstr(stdout, uname)) { - p = of_get_flat_dt_prop(node, "compatible", &l); - pr_debug("Compatible string: %s\n", p); - - if ((strncmp(p, "xlnx,xps-uart16550", 18) == 0) || - (strncmp(p, "xlnx,axi-uart16550", 18) == 0)) { - unsigned int addr; - - *(u32 *)data = UART16550; - - addr = *(u32 *)of_get_flat_dt_prop(node, "reg", &l); - addr += *(u32 *)of_get_flat_dt_prop(node, - "reg-offset", &l); - /* clear register offset */ - return be32_to_cpu(addr) & ~3; - } - if ((strncmp(p, "xlnx,xps-uartlite", 17) == 0) || - (strncmp(p, "xlnx,opb-uartlite", 17) == 0) || - (strncmp(p, "xlnx,axi-uartlite", 17) == 0) || - (strncmp(p, "xlnx,mdm", 8) == 0)) { - const unsigned int *addrp; - - *(u32 *)data = UARTLITE; - - addrp = of_get_flat_dt_prop(node, "reg", &l); - return be32_to_cpup(addrp); /* return address */ - } - } - return 0; -} - -/* this function is looking for early console - Microblaze specific */ -int __init of_early_console(void *version) -{ - return of_scan_flat_dt(early_init_dt_scan_chosen_serial, version); -} -#endif - void __init early_init_devtree(void *params) { pr_debug(" -> early_init_devtree(%p)\n", params); diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index be98ffe28ca8..bd47aba352af 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c @@ -27,13 +27,12 @@ #include #include #include -#include +#include #include #include #include #include -#include #include DEFINE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */ @@ -64,11 +63,6 @@ void __init setup_arch(char **cmdline_p) setup_memory(); -#ifdef CONFIG_EARLY_PRINTK - /* remap early console to virtual address */ - remap_early_printk(); -#endif - xilinx_pci_init(); #if defined(CONFIG_DUMMY_CONSOLE) @@ -133,10 +127,6 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, /* initialize device tree for usage in early_printk */ early_init_devtree(_fdt_start); -#ifdef CONFIG_EARLY_PRINTK - setup_early_printk(NULL); -#endif - /* setup kernel_tlb after BSS cleaning * Maybe worth to move to asm code */ kernel_tlb = tlb0 + tlb1; From patchwork Wed Feb 28 22:39:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 130084 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp296541lja; Wed, 28 Feb 2018 14:39:58 -0800 (PST) X-Google-Smtp-Source: AH8x2252KivcAvfGsJtS5nNM4h76zR8B747mFVVR8L90vN3lsZu4xhSRE5a9JtMI7qCFMMJCrngH X-Received: by 2002:a17:902:128c:: with SMTP id g12-v6mr19579839pla.85.1519857598204; Wed, 28 Feb 2018 14:39:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519857598; cv=none; d=google.com; s=arc-20160816; b=EuGDq7FClr76HRMgzxhWe8l1mRZkAbdG4EP5Plr2F5Xi4ZmkAz1PZnTpYPPEcDt9P+ qTV+5YCjHWcHbzD7T+K5LTy9/we9q+aoqK3tmmldPSEB3itgB/gVkmXXKF1miA9VEMJv L9I8ooDIey0b+vsvrmyomBLhjmXscGyY0jK/JTQTKAN0GlogtuVz7zxELnysmlwGxqM+ c/sj1em9zhHpvO5GhhpdRaIuxUnS/wWqKbFYF46sgU7xEHO3twxJGgLCTvyZQydgBh7B Qyu/OiWl9IRRDT5oLWmgejo7MgI/G+ZA5TQG14rhhXPDoPprloO1xD+Y+1tn0Y6Pxymm g3cQ== 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:arc-authentication-results; bh=B137d87ZOibUmBsRD0Ps/RYr1uP9w5G1sd18+BNE+Rc=; b=HdlP5h3pztt6Mgy5DY2cNBn+RneOcolKZtfe8QyrODS8YzzgERVRUQ+FkcYM7xyI9A 7DK0qvAA4KsYXLT62C2obbuGnRrlAIludLcNq7Rb40Y5z5l+ZrW+GGspW9ijTMgsarBQ wc/GVPs97UQ7Ftyr1x17SQYTqxZQ7klpmzAP6oMoZKRLeAVIYT89zJoJIv/CReVpFvAE CArueuYqSwCfaEvgo8PCOTrptjx57bMbY3v0OdioxFW+cT+tH1D22q17A6Euoxw4wCS+ Ney3r7LME/u3VfLrm8zOMxqEByEWTvGYvvvhI2Qh6hPru6MlGfzQbjB/C78zVpIAyXas u/Ow== 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 y131si1916339pfg.44.2018.02.28.14.39.57; Wed, 28 Feb 2018 14:39:58 -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 S935556AbeB1Wjw (ORCPT + 28 others); Wed, 28 Feb 2018 17:39:52 -0500 Received: from mail-oi0-f65.google.com ([209.85.218.65]:33822 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935526AbeB1Wjp (ORCPT ); Wed, 28 Feb 2018 17:39:45 -0500 Received: by mail-oi0-f65.google.com with SMTP id c83so3077444oib.1; Wed, 28 Feb 2018 14:39:45 -0800 (PST) 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=B137d87ZOibUmBsRD0Ps/RYr1uP9w5G1sd18+BNE+Rc=; b=Zj/lusz+a79qBYkCl17gxvYzYVfxeCtOqnP0u+mTvdH0fWh8HtM3Jo0AnJwDYirOWk HRwUnsCqPxsZAiphQMlfCpIthVcELdJzCoqOBRepEPOGMR6IKpLVEOPz2vMRU8MxpKli ZHCxE63Wz27hVkKeWLBaKRQRY4YG1bpXRGK7xjhFMhAGcHZPIcFimK6hAUd/eALBKHML Abo7AYuECOcpwhFEwHtLnd33sPTrOpu3cvs33f/rsZWnuEO84OtdfmcNVbA7COCr4X6y LOSTDvQt0Tvoqees4pmuk3G98VyxCsTBJjekmpueNq/V9G7dLaq4pEbXQBEwttpuGF2X oy9A== X-Gm-Message-State: APf1xPA4zKXxasxWu8fEJuPAoYYSWKcTocO+d357GjVMK/WJUYFhRicB elb9hwo/MpbCvKf9IHGgrRNHBsE= X-Received: by 10.202.228.141 with SMTP id b135mr13001744oih.137.1519857584787; Wed, 28 Feb 2018 14:39:44 -0800 (PST) Received: from xps15.herring.priv (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id d45sm1356835otf.72.2018.02.28.14.39.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2018 14:39:43 -0800 (PST) From: Rob Herring To: Michal Simek Cc: linux-kernel@vger.kernel.org, Mark Rutland , devicetree@vger.kernel.org Subject: [PATCH 3/3] microblaze: dts: replace 'linux, stdout-path' with 'stdout-path' Date: Wed, 28 Feb 2018 16:39:37 -0600 Message-Id: <20180228223937.29196-4-robh@kernel.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180228223937.29196-1-robh@kernel.org> References: <20180228223937.29196-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'linux,stdout-path' has been deprecated for some time in favor of 'stdout-path'. Now dtc will warn on occurrences of 'linux,stdout-path'. Search and replace the one occurrence with 'stdout-path'. Signed-off-by: Rob Herring Cc: Mark Rutland Cc: Michal Simek Cc: devicetree@vger.kernel.org --- arch/microblaze/boot/dts/system.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.1 diff --git a/arch/microblaze/boot/dts/system.dts b/arch/microblaze/boot/dts/system.dts index b620da23febb..8a420c6702eb 100644 --- a/arch/microblaze/boot/dts/system.dts +++ b/arch/microblaze/boot/dts/system.dts @@ -44,7 +44,7 @@ } ; chosen { bootargs = "console=ttyUL0,115200 highres=on"; - linux,stdout-path = "/plb@0/serial@84000000"; + stdout-path = "/plb@0/serial@84000000"; } ; cpus { #address-cells = <1>;