From patchwork Tue Jan 22 13:04:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 10775461 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 25D36139A for ; Tue, 22 Jan 2019 13:10:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 153E629FB1 for ; Tue, 22 Jan 2019 13:10:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0936C2A053; Tue, 22 Jan 2019 13:10:45 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8435D29FB1 for ; Tue, 22 Jan 2019 13:10:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728343AbfAVNKo (ORCPT ); Tue, 22 Jan 2019 08:10:44 -0500 Received: from forward106o.mail.yandex.net ([37.140.190.187]:41822 "EHLO forward106o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728488AbfAVNKn (ORCPT ); Tue, 22 Jan 2019 08:10:43 -0500 X-Greylist: delayed 318 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Jan 2019 08:10:41 EST Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 716E15061729; Tue, 22 Jan 2019 16:05:22 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id OlsEWXwmZ7-5L7SLMjt; Tue, 22 Jan 2019 16:05:22 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; s=mail; t=1548162322; bh=rxcZVRlMHjDctv2ssN2QMaqlJZjeB3SIV1dbFY/Ne/Q=; h=From:To:Cc:Subject:Date:Message-Id; b=aa38T2ozUlxq/GmTXbhcnlMDC2TQ2TmnBxJw4ftKOWealVyVOZYscHqe10raaq3Rm B/me4PfBn+TToSEDK2hLwkINSvFsKRISoBKBMz0QrWwbMzqvf/O25ZSOBo1WVskD6T 1k3RdY3XkafhI7A6ynntjVcABNIrmgp6NOmvlDy4= Authentication-Results: mxback4g.mail.yandex.net; dkim=pass header.i=@flygoat.com Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nEDDgaQwiv-5FeS4VFM; Tue, 22 Jan 2019 16:05:19 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: keguang.zhang@gmail.com, paul.burton@mips.com, Jiaxun Yang Subject: [PATCH 1/6] MIPS: Loongson32: Remove unused platform devices Date: Tue, 22 Jan 2019 21:04:10 +0800 Message-Id: <20190122130415.3440-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP platform.c contains several unused platform device with no drivers submited. Signed-off-by: Jiaxun Yang --- .../include/asm/mach-loongson32/platform.h | 4 -- arch/mips/loongson32/common/platform.c | 63 ------------------- 2 files changed, 67 deletions(-) diff --git a/arch/mips/include/asm/mach-loongson32/platform.h b/arch/mips/include/asm/mach-loongson32/platform.h index 8f8fa43ba095..15d1de2300fe 100644 --- a/arch/mips/include/asm/mach-loongson32/platform.h +++ b/arch/mips/include/asm/mach-loongson32/platform.h @@ -17,19 +17,15 @@ extern struct platform_device ls1x_uart_pdev; extern struct platform_device ls1x_cpufreq_pdev; -extern struct platform_device ls1x_dma_pdev; extern struct platform_device ls1x_eth0_pdev; extern struct platform_device ls1x_eth1_pdev; extern struct platform_device ls1x_ehci_pdev; extern struct platform_device ls1x_gpio0_pdev; extern struct platform_device ls1x_gpio1_pdev; -extern struct platform_device ls1x_nand_pdev; extern struct platform_device ls1x_rtc_pdev; extern struct platform_device ls1x_wdt_pdev; void __init ls1x_clk_init(void); -void __init ls1x_dma_set_platdata(struct plat_ls1x_dma *pdata); -void __init ls1x_nand_set_platdata(struct plat_ls1x_nand *pdata); void __init ls1x_rtc_set_extclk(struct platform_device *pdev); void __init ls1x_serial_set_uartclk(struct platform_device *pdev); diff --git a/arch/mips/loongson32/common/platform.c b/arch/mips/loongson32/common/platform.c index ac584c5823d0..0bf355c8bcb2 100644 --- a/arch/mips/loongson32/common/platform.c +++ b/arch/mips/loongson32/common/platform.c @@ -81,42 +81,6 @@ struct platform_device ls1x_cpufreq_pdev = { }, }; -/* DMA */ -static struct resource ls1x_dma_resources[] = { - [0] = { - .start = LS1X_DMAC_BASE, - .end = LS1X_DMAC_BASE + SZ_4 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = LS1X_DMA0_IRQ, - .end = LS1X_DMA0_IRQ, - .flags = IORESOURCE_IRQ, - }, - [2] = { - .start = LS1X_DMA1_IRQ, - .end = LS1X_DMA1_IRQ, - .flags = IORESOURCE_IRQ, - }, - [3] = { - .start = LS1X_DMA2_IRQ, - .end = LS1X_DMA2_IRQ, - .flags = IORESOURCE_IRQ, - }, -}; - -struct platform_device ls1x_dma_pdev = { - .name = "ls1x-dma", - .id = -1, - .num_resources = ARRAY_SIZE(ls1x_dma_resources), - .resource = ls1x_dma_resources, -}; - -void __init ls1x_dma_set_platdata(struct plat_ls1x_dma *pdata) -{ - ls1x_dma_pdev.dev.platform_data = pdata; -} - /* Synopsys Ethernet GMAC */ static struct stmmac_mdio_bus_data ls1x_mdio_bus_data = { .phy_mask = 0, @@ -291,33 +255,6 @@ struct platform_device ls1x_gpio1_pdev = { .resource = ls1x_gpio1_resources, }; -/* NAND Flash */ -static struct resource ls1x_nand_resources[] = { - [0] = { - .start = LS1X_NAND_BASE, - .end = LS1X_NAND_BASE + SZ_32 - 1, - .flags = IORESOURCE_MEM, - }, - [1] = { - /* DMA channel 0 is dedicated to NAND */ - .start = LS1X_DMA_CHANNEL0, - .end = LS1X_DMA_CHANNEL0, - .flags = IORESOURCE_DMA, - }, -}; - -struct platform_device ls1x_nand_pdev = { - .name = "ls1x-nand", - .id = -1, - .num_resources = ARRAY_SIZE(ls1x_nand_resources), - .resource = ls1x_nand_resources, -}; - -void __init ls1x_nand_set_platdata(struct plat_ls1x_nand *pdata) -{ - ls1x_nand_pdev.dev.platform_data = pdata; -} - /* USB EHCI */ static u64 ls1x_ehci_dmamask = DMA_BIT_MASK(32); From patchwork Tue Jan 22 13:04:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 10775459 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 28DF2139A for ; Tue, 22 Jan 2019 13:05:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1957F29114 for ; Tue, 22 Jan 2019 13:05:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D78029C72; Tue, 22 Jan 2019 13:05:40 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B975A29114 for ; Tue, 22 Jan 2019 13:05:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728479AbfAVNFi (ORCPT ); Tue, 22 Jan 2019 08:05:38 -0500 Received: from forward102p.mail.yandex.net ([77.88.28.102]:58248 "EHLO forward102p.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728215AbfAVNFh (ORCPT ); Tue, 22 Jan 2019 08:05:37 -0500 Received: from mxback22g.mail.yandex.net (mxback22g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:322]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 2D3FA1D41B7F; Tue, 22 Jan 2019 16:05:35 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback22g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id pGxgvvVMkR-5YdCIRlA; Tue, 22 Jan 2019 16:05:35 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; s=mail; t=1548162335; bh=va6ar2RlbpsemIhQu9vlfedfrdFRiZG2GKowMPk/oVg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=pkFsxeYaOjAbglO7sy69YaIDEzegejIfotgffxUoaNH2ieTiGp/e0j5Saj+TeVyhQ GULzvW45Nmsytn1/fkToX+RxY5dWDhjd8IHDltRSDwITzuKDfFAXf/ZVxfKdV/F3Ew mTcnfvm+8eZrynlZl5XcD5N0Ft8L6ZkBTMa7zgbc= Authentication-Results: mxback22g.mail.yandex.net; dkim=pass header.i=@flygoat.com Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nEDDgaQwiv-5Neq02Cj; Tue, 22 Jan 2019 16:05:29 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: keguang.zhang@gmail.com, paul.burton@mips.com, Jiaxun Yang Subject: [PATCH 2/6] MIPS: Loongson32: workaround di issue Date: Tue, 22 Jan 2019 21:04:11 +0800 Message-Id: <20190122130415.3440-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122130415.3440-1-jiaxun.yang@flygoat.com> References: <20190122130415.3440-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP GS232 core used in Loongson-1 processors has a bug that di instruction doesn't save the irqflag immediately. Workaround by set irqflag in CP0 before di instructions as same as Loongson-3. Signed-off-by: Jiaxun Yang --- arch/mips/include/asm/irqflags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/irqflags.h b/arch/mips/include/asm/irqflags.h index 9d3610be2323..59549d972439 100644 --- a/arch/mips/include/asm/irqflags.h +++ b/arch/mips/include/asm/irqflags.h @@ -41,7 +41,7 @@ static inline unsigned long arch_local_irq_save(void) " .set push \n" " .set reorder \n" " .set noat \n" -#if defined(CONFIG_CPU_LOONGSON3) +#if defined(CONFIG_CPU_LOONGSON3) || defined (CONFIG_CPU_LOONGSON1) " mfc0 %[flags], $12 \n" " di \n" #else From patchwork Tue Jan 22 13:04:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 10775463 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 6795213B4 for ; Tue, 22 Jan 2019 13:12:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56FDB2A049 for ; Tue, 22 Jan 2019 13:12:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A4202A054; Tue, 22 Jan 2019 13:12: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D44CA2A049 for ; Tue, 22 Jan 2019 13:12:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728492AbfAVNMC (ORCPT ); Tue, 22 Jan 2019 08:12:02 -0500 Received: from forward102j.mail.yandex.net ([5.45.198.243]:47078 "EHLO forward102j.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728305AbfAVNMC (ORCPT ); Tue, 22 Jan 2019 08:12:02 -0500 X-Greylist: delayed 347 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Jan 2019 08:12:01 EST Received: from mxback9j.mail.yandex.net (mxback9j.mail.yandex.net [IPv6:2a02:6b8:0:1619::112]) by forward102j.mail.yandex.net (Yandex) with ESMTP id D8D81F22096; Tue, 22 Jan 2019 16:06:12 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback9j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id XO4y2NgwwV-6CAGar0W; Tue, 22 Jan 2019 16:06:12 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; s=mail; t=1548162372; bh=biQ3k1UH7uX5Tl/x3Ok/jTKPVsSaR/YJwnXsyqAvbts=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=t2/rxjywTGulUFirHl48q3NJrmMm/HChA1yB/K9ECZxT1h7InYqptHrkL1keFIH0h cmt30/Of6QKX8pizNPxAN7cmuiFz84uGsv06/QPLYvHhyEcSLuhHun4jptqc9JAlJJ +tyneg9wCateXQB6hzzzNPbTk3WUDK5uUFjKO8YI= Authentication-Results: mxback9j.mail.yandex.net; dkim=pass header.i=@flygoat.com Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nEDDgaQwiv-5heeFDpQ; Tue, 22 Jan 2019 16:06:03 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: keguang.zhang@gmail.com, paul.burton@mips.com, Jiaxun Yang Subject: [PATCH 3/6] MIPS: Loongson32: Revert ISA level to MIPS32R2 Date: Tue, 22 Jan 2019 21:04:12 +0800 Message-Id: <20190122130415.3440-3-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122130415.3440-1-jiaxun.yang@flygoat.com> References: <20190122130415.3440-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP GS232 core have implemented all necessary mips32r2 instructions. Serval missing FP instructions can be emulated by kernel. The issue of di instruction have been solved. Thus we revert the ISA level back to MIPS32R2. Signed-off-by: Jiaxun Yang --- arch/mips/Kconfig | 2 +- arch/mips/loongson32/Platform | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 787290781b8c..5f6cf6fe6382 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1866,7 +1866,7 @@ config CPU_LOONGSON2 config CPU_LOONGSON1 bool select CPU_MIPS32 - select CPU_MIPSR1 + select CPU_MIPSR2 select CPU_HAS_PREFETCH select CPU_HAS_LOAD_STORE_LR select CPU_SUPPORTS_32BIT_KERNEL diff --git a/arch/mips/loongson32/Platform b/arch/mips/loongson32/Platform index a0dbb3b2f2de..0db38f64f571 100644 --- a/arch/mips/loongson32/Platform +++ b/arch/mips/loongson32/Platform @@ -1,4 +1,4 @@ -cflags-$(CONFIG_CPU_LOONGSON1) += -march=mips32 -Wa,--trap +cflags-$(CONFIG_CPU_LOONGSON1) += -march=mips32r2 -Wa,--trap platform-$(CONFIG_MACH_LOONGSON32) += loongson32/ cflags-$(CONFIG_MACH_LOONGSON32) += -I$(srctree)/arch/mips/include/asm/mach-loongson32 load-$(CONFIG_CPU_LOONGSON1) += 0xffffffff80100000 From patchwork Tue Jan 22 13:04:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 10775465 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 5AB8613B4 for ; Tue, 22 Jan 2019 13:12:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49FFD29FB1 for ; Tue, 22 Jan 2019 13:12:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E4952A053; Tue, 22 Jan 2019 13:12:09 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31F6229FB1 for ; Tue, 22 Jan 2019 13:12:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728486AbfAVNMH (ORCPT ); Tue, 22 Jan 2019 08:12:07 -0500 Received: from forward101o.mail.yandex.net ([37.140.190.181]:52405 "EHLO forward101o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728305AbfAVNMH (ORCPT ); Tue, 22 Jan 2019 08:12:07 -0500 Received: from mxback7g.mail.yandex.net (mxback7g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:168]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 739423C01864; Tue, 22 Jan 2019 16:06:24 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback7g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id sau7Mk13Ba-6OKu9ZPb; Tue, 22 Jan 2019 16:06:24 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; s=mail; t=1548162384; bh=pqqm05iMBuZF8YCzrghS6KXuTd0gu3xVBHG21EEKUNI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=czuNKMiKGcgZ54oYz8+CFX03+TKxYnVQ8klePUS8tMGqf345RpEA+BEvUpSzksAme KSkm7kKnwbYZ6T0NiqfBfse6bMjaD0gAPvgOr7hENVgIAWalj5UET29N96b2D46IdG duYdIz4qCvxo8qb7hnMis4aXLnxtBDdICXLRqVPM= Authentication-Results: mxback7g.mail.yandex.net; dkim=pass header.i=@flygoat.com Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nEDDgaQwiv-6DeGg2oU; Tue, 22 Jan 2019 16:06:21 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: keguang.zhang@gmail.com, paul.burton@mips.com, Jiaxun Yang Subject: [PATCH 4/6] MIPS: Loongson32: clarify we don't support MIPS16 and merge configs Date: Tue, 22 Jan 2019 21:04:13 +0800 Message-Id: <20190122130415.3440-4-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122130415.3440-1-jiaxun.yang@flygoat.com> References: <20190122130415.3440-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Accorading to GS232 core user's manual, it doesn't support MIPS16. Signed-off-by: Jiaxun Yang --- arch/mips/Kconfig | 4 ++++ arch/mips/loongson32/Kconfig | 15 --------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 5f6cf6fe6382..d4c01f9baf19 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1870,6 +1870,10 @@ config CPU_LOONGSON1 select CPU_HAS_PREFETCH select CPU_HAS_LOAD_STORE_LR select CPU_SUPPORTS_32BIT_KERNEL + select IRQ_MIPS_CPU + select DMA_NONCOHERENT + select BOOT_ELF32 + select SYS_SUPPORTS_LITTLE_ENDIAN select CPU_SUPPORTS_HIGHMEM select CPU_SUPPORTS_CPUFREQ diff --git a/arch/mips/loongson32/Kconfig b/arch/mips/loongson32/Kconfig index 462b126f45aa..b4eed5b59b39 100644 --- a/arch/mips/loongson32/Kconfig +++ b/arch/mips/loongson32/Kconfig @@ -9,13 +9,6 @@ config LOONGSON1_LS1B select CEVT_R4K if !MIPS_EXTERNAL_TIMER select CSRC_R4K if !MIPS_EXTERNAL_TIMER select SYS_HAS_CPU_LOONGSON1B - select DMA_NONCOHERENT - select BOOT_ELF32 - select IRQ_MIPS_CPU - select SYS_SUPPORTS_32BIT_KERNEL - select SYS_SUPPORTS_LITTLE_ENDIAN - select SYS_SUPPORTS_HIGHMEM - select SYS_SUPPORTS_MIPS16 select SYS_HAS_EARLY_PRINTK select USE_GENERIC_EARLY_PRINTK_8250 select COMMON_CLK @@ -24,14 +17,6 @@ config LOONGSON1_LS1C bool "Loongson LS1C board" select CEVT_R4K if !MIPS_EXTERNAL_TIMER select CSRC_R4K if !MIPS_EXTERNAL_TIMER - select SYS_HAS_CPU_LOONGSON1C - select DMA_NONCOHERENT - select BOOT_ELF32 - select IRQ_MIPS_CPU - select SYS_SUPPORTS_32BIT_KERNEL - select SYS_SUPPORTS_LITTLE_ENDIAN - select SYS_SUPPORTS_HIGHMEM - select SYS_SUPPORTS_MIPS16 select SYS_HAS_EARLY_PRINTK select USE_GENERIC_EARLY_PRINTK_8250 select COMMON_CLK From patchwork Tue Jan 22 13:04:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 10775469 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 8AA7C13B4 for ; Tue, 22 Jan 2019 13:14:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7959E24B5B for ; Tue, 22 Jan 2019 13:14:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D434266F3; Tue, 22 Jan 2019 13:14:12 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B29A24B5B for ; Tue, 22 Jan 2019 13:14:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728351AbfAVNOL (ORCPT ); Tue, 22 Jan 2019 08:14:11 -0500 Received: from forward100o.mail.yandex.net ([37.140.190.180]:34896 "EHLO forward100o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728239AbfAVNOK (ORCPT ); Tue, 22 Jan 2019 08:14:10 -0500 Received: from mxback14o.mail.yandex.net (mxback14o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::65]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 6B2074AC0478; Tue, 22 Jan 2019 16:06:41 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback14o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ZRjXgVJLmo-6fQehKuL; Tue, 22 Jan 2019 16:06:41 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; s=mail; t=1548162401; bh=Enxe7Ra4n9wapkfL2KrruAVJnEZJLRIEeeRogslsjzk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=iV4jwNQq9XB7wxaMyO0KM0XD5zV0dt8JaITnIN9KeSPQ5qaD0SUEHsb8/S7oIC9OQ bGSMCtgo7/gFRuKQ+lAUDAY/ShBOWkoHyPV4hzyFJBOx68tAFhyt9qbOyBRyK9rd5P +GsUScMHeUBcpkuuiqoX9CRlmQd2bHKAk2mLwCUw= Authentication-Results: mxback14o.mail.yandex.net; dkim=pass header.i=@flygoat.com Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nEDDgaQwiv-6Peq4VsM; Tue, 22 Jan 2019 16:06:38 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: keguang.zhang@gmail.com, paul.burton@mips.com, Jiaxun Yang Subject: [PATCH 5/6] MIPS: Loongson32: Set load address to 0x80200000 Date: Tue, 22 Jan 2019 21:04:14 +0800 Message-Id: <20190122130415.3440-5-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122130415.3440-1-jiaxun.yang@flygoat.com> References: <20190122130415.3440-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP PMON bootloader on Loongson-1C will use memory between 0x80100000 and 0x80200000 as stack. Use 0x80100000 as load address may hang the bootloader during loading. Signed-off-by: Jiaxun Yang --- arch/mips/loongson32/Platform | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/loongson32/Platform b/arch/mips/loongson32/Platform index 0db38f64f571..333215593092 100644 --- a/arch/mips/loongson32/Platform +++ b/arch/mips/loongson32/Platform @@ -1,4 +1,4 @@ cflags-$(CONFIG_CPU_LOONGSON1) += -march=mips32r2 -Wa,--trap platform-$(CONFIG_MACH_LOONGSON32) += loongson32/ cflags-$(CONFIG_MACH_LOONGSON32) += -I$(srctree)/arch/mips/include/asm/mach-loongson32 -load-$(CONFIG_CPU_LOONGSON1) += 0xffffffff80100000 +load-$(CONFIG_CPU_LOONGSON1) += 0xffffffff80200000 From patchwork Tue Jan 22 13:04:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 10775467 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 40AD5139A for ; Tue, 22 Jan 2019 13:12:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 306AF2A053 for ; Tue, 22 Jan 2019 13:12:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22A142A071; Tue, 22 Jan 2019 13:12:34 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FF192A053 for ; Tue, 22 Jan 2019 13:12:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728497AbfAVNMc (ORCPT ); Tue, 22 Jan 2019 08:12:32 -0500 Received: from forward102o.mail.yandex.net ([37.140.190.182]:44488 "EHLO forward102o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728305AbfAVNMc (ORCPT ); Tue, 22 Jan 2019 08:12:32 -0500 Received: from mxback15o.mail.yandex.net (mxback15o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::66]) by forward102o.mail.yandex.net (Yandex) with ESMTP id 5998B6681A91; Tue, 22 Jan 2019 16:06:55 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback15o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id VMsj4N6Pih-6txKBoC2; Tue, 22 Jan 2019 16:06:55 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; s=mail; t=1548162415; bh=oYvH4eSIBX+qrlmucTvRQzppVm0dlIcMtOM4kKD3tVQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=OFRgpWlCuSUlBQnSz0axjT5o5yEs6GmarvsFRhjkp/V4dphTHU8zD9LlSrfZAXOmZ 10iSs4PgvXfmRRu5IN4rNjrB0it+Ed5I3UznFvdu7FnbMJ3A2j1eV+PQWQhj0lT2Ny C82fOL8LqJ6bL9FXfU4rbnlW1QD7mOICECHx76e8= Authentication-Results: mxback15o.mail.yandex.net; dkim=pass header.i=@flygoat.com Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nEDDgaQwiv-6geeoi1o; Tue, 22 Jan 2019 16:06:49 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: keguang.zhang@gmail.com, paul.burton@mips.com, Jiaxun Yang Subject: [PATCH 6/6] cpu-probe: Rename Loongson 1B to Loongson GS232 Date: Tue, 22 Jan 2019 21:04:15 +0800 Message-Id: <20190122130415.3440-6-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122130415.3440-1-jiaxun.yang@flygoat.com> References: <20190122130415.3440-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Loongson-1A/1B/1C are shareing the same PRID. Rename previous Loongson 1B to the core used in these processors. Signed-off-by: Jiaxun Yang --- arch/mips/include/asm/cpu.h | 2 +- arch/mips/kernel/cpu-probe.c | 4 ++-- arch/mips/loongson32/common/setup.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h index 532b49b1dbb3..b37c1be08dbd 100644 --- a/arch/mips/include/asm/cpu.h +++ b/arch/mips/include/asm/cpu.h @@ -241,7 +241,7 @@ #define PRID_REV_VR4181A 0x0070 /* Same as VR4122 */ #define PRID_REV_VR4130 0x0080 #define PRID_REV_34K_V1_0_2 0x0022 -#define PRID_REV_LOONGSON1B 0x0020 +#define PRID_REV_LOONGSON_GS232 0x0020 #define PRID_REV_LOONGSON1C 0x0020 /* Same as Loongson-1B */ #define PRID_REV_LOONGSON2E 0x0002 #define PRID_REV_LOONGSON2F 0x0003 diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 95b18a194f53..64bf2a971012 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -1546,8 +1546,8 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) c->cputype = CPU_LOONGSON1; switch (c->processor_id & PRID_REV_MASK) { - case PRID_REV_LOONGSON1B: - __cpu_name[cpu] = "Loongson 1B"; + case PRID_REV_LOONGSON_GS232: + __cpu_name[cpu] = "Loongson GS232"; break; } diff --git a/arch/mips/loongson32/common/setup.c b/arch/mips/loongson32/common/setup.c index 1640744288ee..a1cb26dfc366 100644 --- a/arch/mips/loongson32/common/setup.c +++ b/arch/mips/loongson32/common/setup.c @@ -21,7 +21,7 @@ const char *get_system_type(void) unsigned int processor_id = (¤t_cpu_data)->processor_id; switch (processor_id & PRID_REV_MASK) { - case PRID_REV_LOONGSON1B: + case PRID_REV_LOONGSON_GS232: #if defined(CONFIG_LOONGSON1_LS1B) return "LOONGSON LS1B"; #elif defined(CONFIG_LOONGSON1_LS1C)