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 DAC04C4338F for ; Tue, 3 Aug 2021 04:44:59 +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 947C460F92 for ; Tue, 3 Aug 2021 04:44:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 947C460F92 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 E926782DB4; Tue, 3 Aug 2021 06:44:55 +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="DLGhRxEm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4BA3682DA3; Tue, 3 Aug 2021 06:44:54 +0200 (CEST) Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) (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 39A3482D58 for ; Tue, 3 Aug 2021 06:44:51 +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-pl1-x631.google.com with SMTP id k2so4669541plk.13 for ; Mon, 02 Aug 2021 21:44:51 -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=JBhN7x0RxqBVqx8a1g8BXFBPa/JjhVrYsNXwIUwU99A=; b=DLGhRxEmmbIM7CDSftNWIDJepa7BCJjxyqOGeqO/1MDyzwQGCW5eRMP/tD6WuttaK0 yoy998VsOWck6lQsmwaxJcC65OXKJGhfmRGQRlSzxu24yvek3GeIYNgO1sSs2jXkLwNW xa0mt3clOAudeopV7GpNs81Ho/s/hjqpvtrTrKFpsZU2kW7ipS5PQKN3nFDU41gEIo2u SK9jSluMf+oN84etK7rRy/QK4hgX231A3aYbexGQC7H3miegC3pKXwY/LlGJGJm18rq2 waVLBrXC6nVmY30EDOFbmEmjj4hG23Ny+NnfE1olYMh5yAT7/JBNzDVOFwVn09z7pzR6 r09w== 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=JBhN7x0RxqBVqx8a1g8BXFBPa/JjhVrYsNXwIUwU99A=; b=H/smmkTf9hjgqhXlXYAEAwlNB+VOdFoEx0n1TSS69Lna2Whm7BGvEdip79CN9LOIY0 o0cWSd0FkYpIYSFIs5UDnokIppE6ShT4a8XcY9ETMxmpSCEO6De4m62dA1tvpdWllo23 iCJ/CGIQXa/zEdKpctZfy9n/KYzKHR8+OCoLszKKN1voBMbvU72bs1iP/MTbz13iUnyU uSUoUq1Nx3v/0cWSyoalMOs3B/qRrjQJBB5CvnwmnnJTLkTcORUGQThHXUa1nyTk0A/h OSLv8tfOD8/RTpwLY+Vm8C+Vvrtj73Dxdp7BBqbL5IHb05ODHnGvXuCs7MVcHoL0MJrv eM5g== X-Gm-Message-State: AOAM532B2e7vOF422xtmd+FSr2eyGYJ/GugjvXLnXvzGiHWcn5Eec8Ku roZF+Lv5KY62VF1l7qbYfJtn1w== X-Google-Smtp-Source: ABdhPJxUMB0KRWoS6kbopfO8zwG3RJUzqTzZkj4/3GXZqIiABx38gQ7Mm4zecnmkXJR4hq3yPKWSzw== X-Received: by 2002:a17:902:b113:b029:128:cec4:e01e with SMTP id q19-20020a170902b113b0290128cec4e01emr17008658plr.78.1627965889533; Mon, 02 Aug 2021 21:44:49 -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 d2sm15327998pgv.87.2021.08.02.21.44.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 21:44:49 -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 v2 0/6] Support SiFive Composable cache driver Date: Tue, 3 Aug 2021 12:44:38 +0800 Message-Id: <20210803044444.14032-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 v2: - Refine the ccache driver by Sean's suggestions - Introduce a common interface for cache initialization Zong Li (6): cache: add sifive composable cache driver board: sifive: use ccache driver instead of helper function riscv: lib: introduce cache_init interface riscv: sifive: use common cache_init instead of duplicated implementation riscv: lib: move platform-related libraries to sperate folder riscv: lib: modify the indent arch/riscv/Kconfig | 12 ++++ 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 | 8 +-- arch/riscv/lib/andestech/Kconfig | 8 +++ arch/riscv/lib/andestech/Makefile | 7 ++ arch/riscv/lib/{ => andestech}/andes_plic.c | 0 arch/riscv/lib/cache.c | 5 ++ arch/riscv/lib/sifive/Kconfig | 8 +++ arch/riscv/lib/sifive/Makefile | 9 +++ arch/riscv/lib/sifive/sifive_cache.c | 27 ++++++++ arch/riscv/lib/{ => sifive}/sifive_clint.c | 0 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 +++++++++++++++++++++ 24 files changed, 173 insertions(+), 164 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/andestech/Kconfig create mode 100644 arch/riscv/lib/andestech/Makefile rename arch/riscv/lib/{ => andestech}/andes_plic.c (100%) create mode 100644 arch/riscv/lib/sifive/Kconfig create mode 100644 arch/riscv/lib/sifive/Makefile create mode 100644 arch/riscv/lib/sifive/sifive_cache.c rename arch/riscv/lib/{ => sifive}/sifive_clint.c (100%) create mode 100644 drivers/cache/cache-sifive-ccache.c -- 2.32.0