From patchwork Wed Jun 19 21:27:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1949854 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=o8odUuUg; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W4GvK5SFPz20X8 for ; Thu, 20 Jun 2024 07:28:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D8096884D2; Wed, 19 Jun 2024 23:28:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="o8odUuUg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4A743884DC; Wed, 19 Jun 2024 23:28:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) (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 66433884BA for ; Wed, 19 Jun 2024 23:28:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-7005c84e525so131762a34.3 for ; Wed, 19 Jun 2024 14:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1718832486; x=1719437286; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PESRWPE1/6Tjsl4yC8FCoMUonyw5OvXRn5EvjsdlUGc=; b=o8odUuUgExqX1KydehcwzPl+6nauVl92E7S8lLmO5v6bSHTYcDQBHqwrgTj028vwJk d6gGXE9f4FI8JrDoscxLyZcdF2eLjv8ln3DckHhuzKjMFCYB6ARumfsmn06mEMk/VhaI RfxMw2WCRDPEBJM0g8AlUhkcIG5/7kgEG86Hs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718832486; x=1719437286; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PESRWPE1/6Tjsl4yC8FCoMUonyw5OvXRn5EvjsdlUGc=; b=K/05H+MySg6WdTYPpxROquAvyYhorNaCWiT+qWksz2PmIHXuuJc6hDSjolNPGZRJfd oPSmYSDN8soaQQIcfbZLzzszGFbbDIfFUotdZAuULfvoRraxW6rgfhmeXLHYzgCzbfm3 mfSySTjChYJEiNH114iP6Fl0ldNkB8WY/lspKc9JxqPm6RuIx1Q3p/HXy6ruPpftbpG5 +3y3Rms+Zm0//godU+Uk0qtqWmEcrUrhq9uZIQYcNrgGNEgthowFTgczeh2hM7tYcwZw 3OPL6f1YPSAVHb2wXei+PQypTi5dvIa14K7mAikJiTg2JoNPX72spJIlK0hFvJRfm4DP ebFg== X-Gm-Message-State: AOJu0Yy1ht/DaJP7pkMt+zlscRAA3MZx1G9TuD4kPJ1HcWxFn/nCs84M J8X+jh33qgdhJjLwIQUQUixzKVM4jCbSeuq3QYFjpujDiKEce4PvC2htnM3p9luVm6ETPnoS4z+ 7L8UjZQ== X-Google-Smtp-Source: AGHT+IH+ceStpVoEmmW8dOQF+3qWzeszPDgs04sEqh/YM8rGNcYica1UzwxZje60BSs+fXYJyOVaEw== X-Received: by 2002:a05:6830:1e28:b0:6f9:de68:ab8e with SMTP id 46e09a7af769-7007587d3a5mr4027348a34.25.1718832486117; Wed, 19 Jun 2024 14:28:06 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (fixed-187-190-205-45.totalplay.net. [187.190.205.45]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7008a5a34c9sm338654a34.73.2024.06.19.14.28.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:28:05 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Marek Vasut , Nobuhiro Iwamatsu Subject: [PATCH 3/7] sh: Implement a default flush_dcache_all Date: Wed, 19 Jun 2024 15:27:55 -0600 Message-Id: <20240619212759.3456158-3-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619212759.3456158-1-trini@konsulko.com> References: <20240619212759.3456158-1-trini@konsulko.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Implement a weak default version of flush_dcache_all which is based on the ARM default, which is to flush the entire range via flush_dcache_range(...). Signed-off-by: Tom Rini Acked-by: Ilias Apalodimas --- Cc: Marek Vasut Cc: Nobuhiro Iwamatsu --- arch/sh/cpu/sh4/cache.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c index 8c1839935ca1..f0cb39d6a923 100644 --- a/arch/sh/cpu/sh4/cache.c +++ b/arch/sh/cpu/sh4/cache.c @@ -65,6 +65,15 @@ void flush_dcache_range(unsigned long start, unsigned long end) } } +/* + * Default implementation: + * do a range flush for the entire range + */ +void flush_dcache_all(void) +{ + flush_dcache_range(0, ~0); +} + void invalidate_dcache_range(unsigned long start, unsigned long end) { u32 v;