From patchwork Fri Jan 8 08:30:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lauri Kasanen X-Patchwork-Id: 12006049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20FC8C433E0 for ; Fri, 8 Jan 2021 08:30:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9E8F2343F for ; Fri, 8 Jan 2021 08:30:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727169AbhAHIaH (ORCPT ); Fri, 8 Jan 2021 03:30:07 -0500 Received: from mout.gmx.net ([212.227.15.15]:52813 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727146AbhAHIaH (ORCPT ); Fri, 8 Jan 2021 03:30:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610094514; bh=Ua1mWCOr4LTqZEzaZB63R+wqOSGeuV/pZ/FWoM0VPhU=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject; b=HHYO8A6jYhuAQrig8p+BZcO3p2L1JCrclARxSVfTQEVtVumkwLR7nfWbP/gv3jFqq AR+nyh9AXs1ITQ2EcLWQAoSfiNcY1TnNHaPjYfwWqYSqoOtD6B+RjQR27MsTt2MIIE Xzd+zYClgAr2pK6ir9ZTpMOZXxV+LWHZTadLMl4Y= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Valinor ([82.128.181.212]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MsYqv-1k5pbV2BVj-00u5a1; Fri, 08 Jan 2021 09:28:34 +0100 Date: Fri, 8 Jan 2021 10:30:13 +0200 From: Lauri Kasanen To: linux-mips@vger.kernel.org Cc: tsbogend@alpha.franken.de Subject: [PATCH 1/6] Revert "MIPS: Remove unused R4300 CPU support" Message-Id: <20210108103013.c8a017c2995f8893f31dd368@gmx.com> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.18.6; x86_64-unknown-linux-gnu) Mime-Version: 1.0 X-Provags-ID: V03:K1:ozwAkwCqCWNOVRc+zgLxancgRnDRUCqI9UeGIn2qiII/gtlSAXb ZixMvJwTpF9a/3TcG2ckqkERZfpYCYIAnQZczA/GDIh88jBGkZJo/N82mjxSWjVUfEulRML 53egZX93eIkk56WPERSZFZyacIWZD0ugbtWUTCrg/Vs37Koszuv5yKh3sPbMQS9T/DOX5Sf pID/cTtnmOPkA5ORKCXGQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:lUNDovh7cyU=:gXksqtJztncJjggu++kZCC g9xa84E2EBHTtFQs9R61LNwuo7KTqFbVRY7PsXGqsfmYks5YxHfS0q64QhpyPQBasOzN8vKYh 7aWkotzSW0td5ON6Bb4R35MOLjxykgvGz/NqGbaLVAnehhPPyYrtgcLIT6EFFZ8ygi61iEGih iGsJEoQ4pfGNBOPdi0j2aXxL3MPrUjdsN9vjve6JOX8pfcJzQM4BvpnncZ64nWiU98Tflt09y +9zLIhoJLydK15UMacHiBahxN3UD+8KM7429cPITZGbO3Nq4WoeQjhYHfung7750IZudu9fN1 aPNlSvHMDAWH9qlfV9FX1r9cVWiTheSsyvPDF6NJVRM3wNYUHyhHMOghYq93T9b9rjTbaQg4p sSp9zNzHDgDFRoeAOkBCGo6E6YpehusRGn38Tg8PaaTLxUkWFUUoUQsqGrrEnCE3c4RJIS2cZ H6SUWAFbLJSReUKL9kJDCSaQu9BQeWNallDS9Y3P3Q4+9s5KnCua2DYtYZdw+LKVyZuco+6GN uX6YHnSp1dOQmHzn5L0fZvKVvIoFleNi3JVTYTEC0h85RoXzSVVUUGL0t06zsP7KkTps6onw5 NmnAzaXsRsmz/hpLmpikA6ih6JQNkBBqSUv3SySpPs14+PfQSx1OyN+m++RBg6JieLrEUUWYg m+7Gw2tu4kCLUZC+1sf8LLusOMU8zFcHZAaWcRAWok4lRs8mtRuys9BEAERGFRUIneiXzOAYJ mK4LCMQnSeSrulYBMPPqiepkBGLQpkaoN6dCJn3uv0Yi15r/GL4jUB5FpSbddIFEc871cPQCd dPUNFZUukqEJCZiKT/SA0Whhtb+ePs2O6fw+nbxjKG1LfYDjzwktelHVnDIfM4k9VLEICyUX+ xbdEzbMrHUoyGrB3d3rQ== Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org This reverts commit f9065b54d437c4660e3d974ad9ce5188c068cd76. We're adding Nintendo 64 support, so the VR4300 is no longer unused. Signed-off-by: Lauri Kasanen --- arch/mips/Kconfig | 12 ++++++++++++ arch/mips/Makefile | 1 + arch/mips/include/asm/cpu-type.h | 5 +++++ arch/mips/include/asm/cpu.h | 2 +- arch/mips/include/asm/vermagic.h | 2 ++ arch/mips/kernel/cpu-probe.c | 9 +++++++++ arch/mips/kernel/idle.c | 1 + arch/mips/mm/c-r4k.c | 1 + arch/mips/mm/tlbex.c | 1 + 9 files changed, 33 insertions(+), 1 deletion(-) -- 2.6.2 diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 2000bb2..4b52588 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1661,6 +1661,15 @@ config CPU_VR41XX kernel built with this option will not run on any other type of processor or vice versa. +config CPU_R4300 + bool "R4300" + depends on SYS_HAS_CPU_R4300 + select CPU_SUPPORTS_32BIT_KERNEL + select CPU_SUPPORTS_64BIT_KERNEL + select CPU_HAS_LOAD_STORE_LR + help + MIPS Technologies R4300-series processors. + config CPU_R4X00 bool "R4x00" depends on SYS_HAS_CPU_R4X00 @@ -1995,6 +2004,9 @@ config SYS_HAS_CPU_TX39XX config SYS_HAS_CPU_VR41XX bool +config SYS_HAS_CPU_R4300 + bool + config SYS_HAS_CPU_R4X00 bool diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 0d0f29d..d7d8c20 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -141,6 +141,7 @@ cflags-y += -fno-stack-check # cflags-$(CONFIG_CPU_R3000) += -march=r3000 cflags-$(CONFIG_CPU_TX39XX) += -march=r3900 +cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap diff --git a/arch/mips/include/asm/cpu-type.h b/arch/mips/include/asm/cpu-type.h index 3288cef..2be5d7b 100644 --- a/arch/mips/include/asm/cpu-type.h +++ b/arch/mips/include/asm/cpu-type.h @@ -122,6 +122,11 @@ static inline int __pure __get_cpu_type(const int cpu_type) case CPU_VR4181A: #endif +#ifdef CONFIG_SYS_HAS_CPU_R4300 + case CPU_R4300: + case CPU_R4310: +#endif + #ifdef CONFIG_SYS_HAS_CPU_R4X00 case CPU_R4000PC: case CPU_R4000SC: diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h index c9222cc..9e6211e 100644 --- a/arch/mips/include/asm/cpu.h +++ b/arch/mips/include/asm/cpu.h @@ -302,7 +302,7 @@ enum cpu_type_enum { /* * R4000 class processors */ - CPU_R4000PC, CPU_R4000SC, CPU_R4000MC, CPU_R4200, + CPU_R4000PC, CPU_R4000SC, CPU_R4000MC, CPU_R4200, CPU_R4300, CPU_R4310, CPU_R4400PC, CPU_R4400SC, CPU_R4400MC, CPU_R4600, CPU_R4640, CPU_R4650, CPU_R4700, CPU_R5000, CPU_R5500, CPU_NEVADA, CPU_R10000, CPU_R12000, CPU_R14000, CPU_R16000, CPU_VR41XX, CPU_VR4111, CPU_VR4121, diff --git a/arch/mips/include/asm/vermagic.h b/arch/mips/include/asm/vermagic.h index 4d2dae0..371c187 100644 --- a/arch/mips/include/asm/vermagic.h +++ b/arch/mips/include/asm/vermagic.h @@ -26,6 +26,8 @@ #define MODULE_PROC_FAMILY "TX39XX " #elif defined CONFIG_CPU_VR41XX #define MODULE_PROC_FAMILY "VR41XX " +#elif defined CONFIG_CPU_R4300 +#define MODULE_PROC_FAMILY "R4300 " #elif defined CONFIG_CPU_R4X00 #define MODULE_PROC_FAMILY "R4X00 " #elif defined CONFIG_CPU_TX49XX diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index e685369..84f7034 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -1154,6 +1154,15 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) break; } break; + case PRID_IMP_R4300: + c->cputype = CPU_R4300; + __cpu_name[cpu] = "R4300"; + set_isa(c, MIPS_CPU_ISA_III); + c->fpu_msk31 |= FPU_CSR_CONDX; + c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | + MIPS_CPU_LLSC; + c->tlbsize = 32; + break; case PRID_IMP_R4600: c->cputype = CPU_R4600; __cpu_name[cpu] = "R4600"; diff --git a/arch/mips/kernel/idle.c b/arch/mips/kernel/idle.c index 18e69eb..1aca3b4 100644 --- a/arch/mips/kernel/idle.c +++ b/arch/mips/kernel/idle.c @@ -151,6 +151,7 @@ void __init check_wait(void) cpu_wait = r39xx_wait; break; case CPU_R4200: +/* case CPU_R4300: */ case CPU_R4600: case CPU_R4640: case CPU_R4650: diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 9cede7c..da7796e 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -1164,6 +1164,7 @@ static void probe_pcache(void) case CPU_R4400PC: case CPU_R4400SC: case CPU_R4400MC: + case CPU_R4300: icache_size = 1 << (12 + ((config & CONF_IC) >> 9)); c->icache.linesz = 16 << ((config & CONF_IB) >> 5); c->icache.ways = 1; diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index a7521b8..0fb1db8 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -549,6 +549,7 @@ void build_tlb_write_entry(u32 **p, struct uasm_label **l, tlbw(p); break; + case CPU_R4300: case CPU_5KC: case CPU_TX49XX: case CPU_PR4450: From patchwork Fri Jan 8 08:32:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lauri Kasanen X-Patchwork-Id: 12006053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED3DBC433E0 for ; Fri, 8 Jan 2021 08:32:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1BBA23447 for ; Fri, 8 Jan 2021 08:32:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726241AbhAHIcq (ORCPT ); Fri, 8 Jan 2021 03:32:46 -0500 Received: from mout.gmx.net ([212.227.15.18]:35019 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbhAHIcq (ORCPT ); Fri, 8 Jan 2021 03:32:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610094672; bh=jPxErSARzOQpeDIOGpyn/6sc7W8I2LOu26u5r24It3k=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject; b=RjXGCMsveKS7TIXHmU9U29o+hd+onCm/golLxpxoJTAbt+UUcjBaAJQ36aWCBFWjw ruvCJ1SFJE5/TUzk0DDJVd/dFkkVNO8c7Aw8BNCoiqdKx+XWgI5C9aSe23uAgvklSr sXEyDCvI/aJXgZSNN9x6oOTWvGfKj5o+MXhqxZWo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Valinor ([82.128.181.212]) by mail.gmx.com (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MUowV-1kXlyo35l3-00QmZA; Fri, 08 Jan 2021 09:31:11 +0100 Date: Fri, 8 Jan 2021 10:32:50 +0200 From: Lauri Kasanen To: linux-mips@vger.kernel.org Cc: tsbogend@alpha.franken.de, hdegoede@redhat.com, linux-fbdev@vger.kernel.org Subject: [PATCH 3/6] fbdev/simplefb: Add the N64's mode Message-Id: <20210108103250.43e293897f80ae175629b3e5@gmx.com> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.18.6; x86_64-unknown-linux-gnu) Mime-Version: 1.0 X-Provags-ID: V03:K1:bApoqVzbVU0mtX64Q9PoqtXUCH8phwiGJq2Pww/PWVXpBD3YUyD Z9v8QWbhhxNq+2acMcb26jEqNJi9V9S78i0uHeyBNdrXibomhWw9pvVLzegtUhs06R09vXd K8CPcoibffQGz97VQr0BGnX1/1lci1CLU1dJSqJnApW7ZOIhFm6rAGo1Ff7TZyWKwxWlURD PAiefH1+/uh3BST6KxLKg== X-UI-Out-Filterresults: notjunk:1;V03:K0:QMSv8irzne0=:67h5VWDrIbAKtrxMipt5KZ RFYiYTQAKBC1QdNSd9cdpn6MElpMCqxQiIAzsc/VnFL/lTpapX70IzvxJKSxMOlSXUafGxBxx FbM6eq7JaIA+NjuRzUrc2bGrIhDicxIkksppv01ofM7JoGqZCZ8659ul7V1cB46TTPx2cQE1O RHpXaGyPDTVx7WN1XUt0VGCY0TnZEoYAv3EwRCALVMH61b+ffrzLAEzeu33BB3q3y2IpsKBCz FCbrm/aH5BfrOgsdkWKNstkDKZNASMh8wAPd4+Z/Brw5xvjbhGnY4pJpuEWG74oQuXB94S+9z tF51N1Fr+HCp/WOysbIbspHod+J9tSsIsajrTB/3TK60qByMnmgKg8XcWzpsORcoFNK8XMwPN 3hWldXh+kRMBLmuKSpoda0wUHx0lWC81eQ2NdFoFpRhK07yQ1W4tZymRAjDIlFtNxkrKcsqbR tNLgdCCy9BaNPsf68vqgoxOfVkaf5GRBcpJJ1SwXu/WGxOBtxG+fqbf8nblmYppXmFta3/aDb 0IhCpDXFJ7MBzk4glXr3p5pjfsgKyiwQXoS4YBio8d0DoOTWkcOumyXm7TjzkRBjLqu48ZWVa tBGzcH7JtF0+KhlhYAakiGdR837w5vu06e4nqAc5nK+tLuEW2kS2VKfYj3nWI2LQFOiDPDo8/ zVvo7P2DZVTzifUnuecGNSRRKxAGc2i5W2EcJ9u2E+10WxswBRIIYgScXw76Mej9/cvRyzPU+ BCHhLCwQTLwIU8DsHGQVPf+LXX1Rtt9o6o7Cp2sivYIH5nYTqpr+iOlCKBC05o38/KSzVHnAE PO9m9xV9CoSBlStATYPP9/ivbqcyKEvZgs3NDdtQrB1ZKvuAxSdZVAf+BJ/HoEFqP4ig+2D11 KbHqK6DsjE8N7C3Qp1PA== Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org By keeping it separate for the platform, we save 748 bytes. This brings simplefb to 2.5kb from 3.2kb, when a native fb driver was 1.5kb. Signed-off-by: Lauri Kasanen --- include/linux/platform_data/simplefb.h | 7 +++++++ 1 file changed, 7 insertions(+) No changes for this patch, just refreshing as part of the series. -- 2.6.2 diff --git a/include/linux/platform_data/simplefb.h b/include/linux/platform_data/simplefb.h index ca83376..c9d4f2c 100644 --- a/include/linux/platform_data/simplefb.h +++ b/include/linux/platform_data/simplefb.h @@ -13,6 +13,12 @@ #include /* format array, use it to initialize a "struct simplefb_format" array */ +#ifdef CONFIG_MACH_NINTENDO64 +#define SIMPLEFB_FORMATS \ +{ \ + { "r5g5b5a1", 16, {11, 5}, {6, 5}, {1, 5}, {0, 1}, DRM_FORMAT_RGBA5551 }, \ +} +#else #define SIMPLEFB_FORMATS \ { \ { "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0}, DRM_FORMAT_RGB565 }, \ @@ -25,6 +31,7 @@ { "x2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {0, 0}, DRM_FORMAT_XRGB2101010 }, \ { "a2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {30, 2}, DRM_FORMAT_ARGB2101010 }, \ } +#endif /* * Data-Format for Simple-Framebuffers