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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 BE1CAC4338F for ; Tue, 17 Aug 2021 09:09:11 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 15EAC6023B for ; Tue, 17 Aug 2021 09:09:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 15EAC6023B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 370D380FBE; Tue, 17 Aug 2021 11:09:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.b="UQHkGReu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 51F1A8032E; Tue, 17 Aug 2021 11:09:04 +0200 (CEST) Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 47BDB8032E for ; Tue, 17 Aug 2021 11:08:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=zong.li@sifive.com Received: by mail-pj1-x1036.google.com with SMTP id u13-20020a17090abb0db0290177e1d9b3f7so4094438pjr.1 for ; Tue, 17 Aug 2021 02:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P5UhpgRW5uzRFsif6mg/2tdqL8IssuQ7hZSwDyoWdmY=; b=UQHkGReur9UfyOWzpLTMWxAMzgGvFb9iXxLc+ZmB+XlBKinWTWoUDGzC19pRvqR1Y2 WVMgu5sf2YsPoPNycoDFGBQulb3LDgHDJvkitmu0bRl/hNOaUhRSVt4s3ejkEJmsiThC lxyknQ+0UuM5/6aMo9tCTHjL7AHgARL9erRcFEvd+jwp6ydJ59s5tC6Xe3KPBHz0JZAJ pkLctbm84FPhQWgMhb6xIKp55EVhKARtLWeqdJOmfxZdSq2vgsqmF8C7jAmP8J3mxN2o +CnNuU8a3VpUBmIozOg2wxxJ5xGTd8bUCOQanc1qCZZ/66Dlo0h3PVJO6LgwBnMQ8Aa8 btFw== 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:mime-version :content-transfer-encoding; bh=P5UhpgRW5uzRFsif6mg/2tdqL8IssuQ7hZSwDyoWdmY=; b=YRNf0QEYng5guEcXWyTALcZX7MghGJd35Vvw40x5KTXS6zwwtke5HDc+CmCmlTaN6J teuGgTy0VztygvRrARh7NsOt6M8BQeUL84aLlH6iIXKYmW1q9UYAOsZkvqSOsY0bcHlS NVqnlwWW2oUpzQf2Rwg5U1LHYF8K40laitkCDws1HFKzkYQ0iYjYXi2H33LjVkiSNzVo a6hGfxaLVYmBEH3JysUMbWE9Lhk7wk54vx1DdFyHqfYhSVRdDmRv/MWTca6EoHONtFZh xUet7ZDpCRDwcBP46iAjigJCxLGfPK7UseDe4H/mNpQ9QRFqPZwP5iQPIa5dpsDC+oKM lmdg== X-Gm-Message-State: AOAM532qCxhHlpskMf3fIfJ/0TAR8h45nGsN5ay8jYhTap1Tru/+0Iam IIuriKkPyqb3szesVcQ0K7zcYg== X-Google-Smtp-Source: ABdhPJzIer0gWTFU8T30cnpUx1BxO6yuRnvyoC/jXAfFSsnxGK3SFf838CJXmGU34Vg5jXQi7fH4+A== X-Received: by 2002:a63:4e65:: with SMTP id o37mr2606185pgl.202.1629191337522; Tue, 17 Aug 2021 02:08:57 -0700 (PDT) Received: from hsinchu15.internal.sifive.com (59-124-168-89.HINET-IP.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id y2sm1813318pfe.146.2021.08.17.02.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 02:08:56 -0700 (PDT) From: Zong Li To: rick@andestech.com, ycliang@andestech.com, bmeng.cn@gmail.com, seanga2@gmail.com, green.wan@sifive.com, paul.walmsley@sifive.com, sjg@chromium.org, u-boot@lists.denx.de Cc: Zong Li Subject: [PATCH v3 0/4] Support SiFive Composable cache driver Date: Tue, 17 Aug 2021 17:08:48 +0800 Message-Id: <20210817090852.17022-1-zong.li@sifive.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This patch set contains the SiFive composable cache support, and indroduce an interface to do cache initialization, each platform can overwrite it by their own implementation. Changed in v3: - Combine some patches - Drop the subdirectories of vendor in lib/ - Rebase codebase Changed in v2: - Refine the ccache driver by Sean's suggestions - Introduce a common interface for cache initialization Zong Li (4): cache: add sifive composable cache driver riscv: lib: introduce a cache_init interface board: sifive: use ccache driver instead of helper function riscv: lib: modify the indent arch/riscv/Kconfig | 5 ++ arch/riscv/cpu/fu540/Kconfig | 2 + arch/riscv/cpu/fu540/Makefile | 1 - arch/riscv/cpu/fu540/cache.c | 55 ----------------- arch/riscv/cpu/fu740/Kconfig | 2 + arch/riscv/cpu/fu740/Makefile | 1 - arch/riscv/cpu/fu740/cache.c | 55 ----------------- arch/riscv/include/asm/arch-fu540/cache.h | 14 ----- arch/riscv/include/asm/arch-fu740/cache.h | 14 ----- arch/riscv/include/asm/cache.h | 3 +- arch/riscv/lib/Makefile | 1 + arch/riscv/lib/cache.c | 5 ++ arch/riscv/lib/sifive_cache.c | 27 ++++++++ board/sifive/unleashed/unleashed.c | 12 +--- board/sifive/unmatched/unmatched.c | 11 +--- drivers/cache/Kconfig | 7 +++ drivers/cache/Makefile | 1 + drivers/cache/cache-sifive-ccache.c | 75 +++++++++++++++++++++++ 18 files changed, 131 insertions(+), 160 deletions(-) delete mode 100644 arch/riscv/cpu/fu540/cache.c delete mode 100644 arch/riscv/cpu/fu740/cache.c delete mode 100644 arch/riscv/include/asm/arch-fu540/cache.h delete mode 100644 arch/riscv/include/asm/arch-fu740/cache.h create mode 100644 arch/riscv/lib/sifive_cache.c create mode 100644 drivers/cache/cache-sifive-ccache.c -- 2.32.0