Message ID | 20190709092814.21363-1-uboot@andestech.com |
---|---|
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=andestech.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45jcb243b1z9sBt for <incoming@patchwork.ozlabs.org>; Tue, 9 Jul 2019 19:34:06 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 33DC0C21DCA; Tue, 9 Jul 2019 09:34:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=RDNS_DYNAMIC autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C03B1C21D4A; Tue, 9 Jul 2019 09:34:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 969B2C21CB1; Tue, 9 Jul 2019 09:33:58 +0000 (UTC) Received: from ATCSQR.andestech.com (59-120-53-16.HINET-IP.hinet.net [59.120.53.16]) by lists.denx.de (Postfix) with ESMTPS id 5BF62C21C51 for <u-boot@lists.denx.de>; Tue, 9 Jul 2019 09:33:57 +0000 (UTC) Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id x699OjZH021083; Tue, 9 Jul 2019 17:24:45 +0800 (GMT-8) (envelope-from uboot@andestech.com) Received: from app09.andestech.com (10.0.15.117) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Tue, 9 Jul 2019 17:33:22 +0800 From: Andes <uboot@andestech.com> To: <u-boot@lists.denx.de> Date: Tue, 9 Jul 2019 17:28:07 +0800 Message-ID: <20190709092814.21363-1-uboot@andestech.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-Originating-IP: [10.0.15.117] X-DNSRBL: X-MAIL: ATCSQR.andestech.com x699OjZH021083 Cc: trini@konsulko.com, kclin@andestech.com, rickchen36@gmail.com Subject: [U-Boot] [PATCH v2 0/7] Support Andes RISC-V l2cache on AE350 platform X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
Support Andes RISC-V l2cache on AE350 platform
|
expand
|
From: Rick Chen <rick@andestech.com> Add a v5l2 cache controller driver that is usually found on Andes RISC-V ae350 platform. It will parse and configure the cache settings (data & instruction prefetch, data & tag latency) from the device tree blob. Also implement L2 cache flush and disable before jump to linux. The sequence will be preferred as below: L1 flush -> L1 disable -> L2 flush -> L2 disable Changes in v2: - Add new patch [1/7] to support dm cache uclass enable and disable ops. - Use ofdata_to_platdata() to parse and save register base instead of global data. - Rename compatible string of "cache" as "v5l2cache". - make v512_init() return void. - Use dm cache uclass api to disable L2 cache. Rick Chen (7): dm: cache: Add enable and disable ops for cache uclass dm: cache: add v5l2 cache controller driver riscv: ae350: use the v5l2 driver to configure the cache riscv: ax25: add imply v5l2 cache controller riscv: cache: Flush L2 cache before jump to linux riscv: dts: move out AE350 L2 node from cpus node riscv: ax25: use CCTL to flush d-cache arch/riscv/cpu/ax25/Kconfig | 1 + arch/riscv/cpu/ax25/cache.c | 22 +++--- arch/riscv/cpu/ax25/cpu.c | 26 +++++++ arch/riscv/dts/ae350_32.dts | 17 +++-- arch/riscv/dts/ae350_64.dts | 17 +++-- arch/riscv/include/asm/v5l2cache.h | 58 +++++++++++++++ board/AndesTech/ax25-ae350/ax25-ae350.c | 9 +++ drivers/cache/Kconfig | 9 +++ drivers/cache/Makefile | 1 + drivers/cache/cache-uclass.c | 20 ++++++ drivers/cache/cache-v5l2.c | 121 ++++++++++++++++++++++++++++++++ include/cache.h | 31 ++++++++ test/dm/cache.c | 2 + 13 files changed, 313 insertions(+), 21 deletions(-) create mode 100644 arch/riscv/include/asm/v5l2cache.h create mode 100644 drivers/cache/cache-v5l2.c