From patchwork Wed Jun 19 21:27:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1949852 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=jW2zAq5q; 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 4W4Gtz3pMjz20X8 for ; Thu, 20 Jun 2024 07:28:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 172F3884A4; Wed, 19 Jun 2024 23:28:09 +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="jW2zAq5q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BE898884C5; Wed, 19 Jun 2024 23:28:07 +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=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (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 99A0C87F5C for ; Wed, 19 Jun 2024 23:28:05 +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-x32a.google.com with SMTP id 46e09a7af769-6f980c89db8so96619a34.1 for ; Wed, 19 Jun 2024 14:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1718832484; x=1719437284; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=RzuRkIYFz61ZF2oK0c42uSn5uw1Tte6uFfxNeEEGO4E=; b=jW2zAq5qZDbM/4R3sKiLVR53I4oWluvERaCbEvG3xwhDnFbfvuYMRa/MjSEHbXWTXm GsqOBp0f5T8cLrdysdnFm0thitPL8KSUtIrFyzGOuf20OkJAvRKwcmSu8AV3eEU5Sarp JcrpkS79EJhXZbIJbK78olvw0VkxK4F0v1FWg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718832484; x=1719437284; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RzuRkIYFz61ZF2oK0c42uSn5uw1Tte6uFfxNeEEGO4E=; b=Iwt1FhNVVx/PS1GrzbrpRMT/VAlWNUCG49IxshxFqhexsOP8PeZ7Jx6r1eX52/Jolu NrT6AwA2AuNWoBL2WDwL5iFJmCCDkIh6yx1CUXgGmh58uRg/5f9Mx/Ffwutb5oLL6LTX TN8gzdrP0vcLUZ6hU50GOrzVg+rwxsW1IqC8P2uFCSTIvMm3xppk4W0SsMH/dRiahuFn iHB4D3kO1/92AW2qvTG1YsvwA3tlyQoNBvI1M5fQTQMI6etBnnlCRFF1t3mVV/o8kpgg 5yWeXrGN3q4L0bhMSiaiVlKOjpf9rodEUymEsp+Nzl8HvTunAcbiEu3IBuPCzRqC5T9m L+1A== X-Gm-Message-State: AOJu0Yw6CK8vEPTbfXlMLekCd1kdEqBdgYLXCvfkKlbMGOeZyoAdT71c 2It597L0/wmSogc6+5p4qTkfdx9rn/Q9elGtSpZ0OYnGOJ0Hol6KhVF2zp77t5u9Nsh8LimIn5+ lHeuV7w== X-Google-Smtp-Source: AGHT+IHmLhKdB5nrTUggVUg/wNHBASEKp4vG/xasS+jGQvws8JgeOp10J5aN85iNdA40Vxe7urVLKA== X-Received: by 2002:a05:6830:22e3:b0:6fc:33df:f4f4 with SMTP id 46e09a7af769-70076729adbmr3570517a34.32.1718832484254; Wed, 19 Jun 2024 14:28:04 -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.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:28:03 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Huan Wang , Angelo Dureghello Subject: [PATCH 1/7] m68k: Implement a default flush_dcache_all Date: Wed, 19 Jun 2024 15:27:53 -0600 Message-Id: <20240619212759.3456158-1-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 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: Angelo Dureghello Acked-by: Ilias Apalodimas --- Cc: Huan Wang Cc: Angelo Dureghello --- arch/m68k/lib/cache.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/m68k/lib/cache.c b/arch/m68k/lib/cache.c index de04124404cf..dab834c1cbd8 100644 --- a/arch/m68k/lib/cache.c +++ b/arch/m68k/lib/cache.c @@ -134,6 +134,15 @@ void dcache_invalid(void) #endif } +/* + * Default implementation: + * do a range flush for the entire range + */ +__weak void flush_dcache_all(void) +{ + flush_dcache_range(0, ~0); +} + __weak void invalidate_dcache_range(unsigned long start, unsigned long stop) { /* An empty stub, real implementation should be in platform code */ From patchwork Wed Jun 19 21:27:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1949853 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=OhEjUhG1; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4W4Gv850rtz20X8 for ; Thu, 20 Jun 2024 07:28:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7B1D6884D4; Wed, 19 Jun 2024 23:28:09 +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="OhEjUhG1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8AEF6884C7; Wed, 19 Jun 2024 23:28:08 +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=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (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 6436C88363 for ; Wed, 19 Jun 2024 23:28:06 +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-x32a.google.com with SMTP id 46e09a7af769-6f9603730d5so101415a34.1 for ; Wed, 19 Jun 2024 14:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1718832485; x=1719437285; 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=uxeHz2raTD5KCK6hDmva5KcUg10JobBKvE2xiey8oCU=; b=OhEjUhG1h53xZO4HDem9t7yoQeyDahrUogVge6e0DwNKAKgg0jhPPusi1/PuyFpVbe 8FUUAuMo7C9pB848gCoZcInO6LBMy80fu96F+WGxOcXkl9AE7xBpoAZGDnCYzKpy8/gI OzxbaYBmaNcuU4CtJT3ey+sifr9e+3STmr32U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718832485; x=1719437285; 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=uxeHz2raTD5KCK6hDmva5KcUg10JobBKvE2xiey8oCU=; b=M6NJLb4scjpHSNWlDMHRfkBDjEmN3w7jivlsMXzV+unWvVWtSTbrNFaQVvOlROO6G4 BUeKBbxczq+A51qk50S+pj40Hr0dLqDIC8vjOkp+WA3S6bmkIPBlzuirsFMPAMhpacEH dqCQXCmnbv6jvwvga4VblEX5uryjZ6FXHMXiRdn4gymWAcO5mnMUX91qKIUhkv4e0WFx mj8CMV585D/rF8DavKRnqGy24RqpKKqc0uHbIlQ/NDGv+FDiufTXZURNzTtYtCnZwlW8 V/irx3yL/s0MRcElR85KRFlfdpX3aTe4B9C35mHEyy5lGGU9QsNjM7D6m/ViqXovEWVm hNIA== X-Gm-Message-State: AOJu0YyT4U3na8DBufJtBL9D7wA8RJoWN1A/KibVTLctdUfgGDOOyY+4 A1Zzm5/ECntsLEW7sS6rg16YaJjnR+m9rio5uLfmTCmjykpSVR5ivPrlMGkSBjDFY+mPePbmoHk uWONGng== X-Google-Smtp-Source: AGHT+IFCuvhdEDNhhJkbdHBtaKHg7OoPlYl5hhPOvxmNGv3oJT/b+0HvVbt/XNAIiHHxv3WRWLAQtQ== X-Received: by 2002:a05:6830:1302:b0:6f9:a3c6:a864 with SMTP id 46e09a7af769-70073c2bfc9mr3887150a34.10.1718832485160; Wed, 19 Jun 2024 14:28:05 -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.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:28:04 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas Subject: [PATCH 2/7] m68k: Rename icache_invalid to invalidate_icache_all Date: Wed, 19 Jun 2024 15:27:54 -0600 Message-Id: <20240619212759.3456158-2-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 The implementation of icache_invalid appears to be doing what other architectures call invalidate_icache_all so rename to match. Signed-off-by: Tom Rini Reviewed-by: Ilias Apalodimas --- Huan Wang Angelo Dureghello --- arch/m68k/include/asm/cache.h | 1 - arch/m68k/lib/cache.c | 6 +++--- drivers/net/mcffec.c | 5 +++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/m68k/include/asm/cache.h b/arch/m68k/include/asm/cache.h index 6ef7f7be1af8..aa8d2edb40ba 100644 --- a/arch/m68k/include/asm/cache.h +++ b/arch/m68k/include/asm/cache.h @@ -185,7 +185,6 @@ #ifndef __ASSEMBLY__ /* put C only stuff in this section */ -void icache_invalid(void); void dcache_invalid(void); #endif diff --git a/arch/m68k/lib/cache.c b/arch/m68k/lib/cache.c index dab834c1cbd8..370ad40f1423 100644 --- a/arch/m68k/lib/cache.c +++ b/arch/m68k/lib/cache.c @@ -29,7 +29,7 @@ int dcache_status(void) void icache_enable(void) { - icache_invalid(); + invalidate_icache_all(); *cf_icache_status = 1; @@ -53,7 +53,7 @@ void icache_disable(void) u32 temp = 0; *cf_icache_status = 0; - icache_invalid(); + invalidate_icache_all(); #if defined(CONFIG_CF_V4) || defined(CFG_CF_V4E) __asm__ __volatile__("movec %0, %%acr2"::"r"(temp)); @@ -68,7 +68,7 @@ void icache_disable(void) #endif } -void icache_invalid(void) +void invalidate_icache_all(void) { u32 temp; diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index 04b711e4f650..7e53492733ed 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -399,7 +400,7 @@ static int mcffec_send(struct udevice *dev, void *packet, int length) #endif #ifdef CONFIG_SYS_UNIFY_CACHE - icache_invalid(); + invalidate_icache_all(); #endif j = 0; @@ -433,7 +434,7 @@ static int mcffec_recv(struct udevice *dev, int flags, uchar **packetp) for (;;) { #ifdef CONFIG_SYS_UNIFY_CACHE - icache_invalid(); + invalidate_icache_all(); #endif /* If nothing received - leave for() loop */ if (info->rxbd[info->rx_idx].cbd_sc & BD_ENET_RX_EMPTY) 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; From patchwork Wed Jun 19 21:27:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1949855 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=iBB8/xGe; 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 4W4GvW09yCz20X8 for ; Thu, 20 Jun 2024 07:28:39 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 500DD884F1; Wed, 19 Jun 2024 23:28:12 +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="iBB8/xGe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6AFDA884BA; 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-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) (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 43570882DA for ; Wed, 19 Jun 2024 23:28:08 +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-x32b.google.com with SMTP id 46e09a7af769-6f980c89db8so96630a34.1 for ; Wed, 19 Jun 2024 14:28:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1718832487; x=1719437287; 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=0OQTEtjdFP/SwMt+oBpZIdgduuwg6zoow3rwEX80eJo=; b=iBB8/xGe9UmUVqC/pct2MR0zqzu3PBe9uY6Q/wM86X1HeFMkdq8yCPuTSwy7gSOzW/ /7FDP0Zs2QaRjKZMhcUK9Xwlt11UAO6OMuWAmh/daSSH+XOJZx7T7JyIb5TEpmfLn7/A wD4fvw63RM6MNnw/2zHQAhHZ+XC4TVqAKTSx8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718832487; x=1719437287; 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=0OQTEtjdFP/SwMt+oBpZIdgduuwg6zoow3rwEX80eJo=; b=Lo1ofaEyQW/R6viOXDFVBDi7cCn6Pt3X+KWGd3Z9iXgZttx8+U+r9t7CsWbd8I6BFB zerJwy9GCxwdXDw1va5lCqMF3EFSkJIuhTNZdsgTaXQACGKuz1aFMJOEvt4ZhdiooIVp y6QIRqKIqyepmW9FLbov/l6pb3LzaLhb3jAIcjS+wp3AI4LoylY5TP4VZ8b4uFHPdeFK RjOl5hGfmk+3m/173VQUrT1sRKihusUhnjdZZTCWY9DLMmntsXP73Pqs4iNX3heWm4Ql MzZIudNMm2yqrZvKnlZB8hIJuc10DRkolKyF6JOuAcjlDLmg0+uYmZsAzm2dsr/rXc6W XJsA== X-Gm-Message-State: AOJu0Yyb0cn25hahF8o4/YJh4+OMzKQfvEro2oCc8i8n/0zLnT8wgNIh FYrDmKdEzmY/OcbNENd3RFp5E3Wp8atHfYlV2+DqpbSlNTcGnev+1BFU81Elx47/Q0zARRDLgZs m66zzVA== X-Google-Smtp-Source: AGHT+IEwcHl3snOsHtFuh27GMtEPRVabc0Bv+wb0YQu+tjeywW9MWPIEhGFPRa5wWHQaVg0VX8jgCQ== X-Received: by 2002:a9d:5c15:0:b0:6f9:bcb5:6e90 with SMTP id 46e09a7af769-700747d4227mr3616950a34.15.1718832487018; Wed, 19 Jun 2024 14:28:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:28:06 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Marek Vasut , Nobuhiro Iwamatsu Subject: [PATCH 4/7] sh: Add the old invalidate_icache_all function Date: Wed, 19 Jun 2024 15:27:56 -0600 Message-Id: <20240619212759.3456158-4-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 Add the old invalidate_icache_all function that prints a warning that was previously found in cmd/cache.c Signed-off-by: Tom Rini --- Cc: Marek Vasut Cc: Nobuhiro Iwamatsu --- arch/sh/cpu/sh4/cache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c index f0cb39d6a923..d3c480e79ed2 100644 --- a/arch/sh/cpu/sh4/cache.c +++ b/arch/sh/cpu/sh4/cache.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -100,6 +101,11 @@ void icache_disable(void) cache_control(CACHE_DISABLE); } +void invalidate_icache_all(void) +{ + puts("No arch specific invalidate_icache_all available!\n"); +} + int icache_status(void) { return 0; From patchwork Wed Jun 19 21:27:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1949856 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=jFvdQiPo; 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 4W4Gvh5PVSz20X8 for ; Thu, 20 Jun 2024 07:28:48 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B0929884C7; Wed, 19 Jun 2024 23:28:14 +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="jFvdQiPo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C3E1884DC; Wed, 19 Jun 2024 23:28:11 +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=ham autolearn_force=no version=3.4.2 Received: from mail-oo1-xc33.google.com (mail-oo1-xc33.google.com [IPv6:2607:f8b0:4864:20::c33]) (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 1E8E1884C7 for ; Wed, 19 Jun 2024 23:28:09 +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-oo1-xc33.google.com with SMTP id 006d021491bc7-5c1a6685cd5so91824eaf.1 for ; Wed, 19 Jun 2024 14:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1718832488; x=1719437288; 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=MrEwfaZ6oEG/5NXcYWX1oC0Z6XG5hvAO/TiTt9oZZQM=; b=jFvdQiPoBe5b+0Yds2PBTfHzsaeitbRqes8EkuistlMN6p1AFBYiePtg6eV3r/awin BNl2s6uoNfGdFcmlJtUPpbXQSZp9SIcbM51Ka5r6FEwrF+Hsqlp1wIMdu3QqXydKm9NM Q7zCOR8V006oM0PJoNkXBl05uzKnd1S+h0lkQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718832488; x=1719437288; 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=MrEwfaZ6oEG/5NXcYWX1oC0Z6XG5hvAO/TiTt9oZZQM=; b=co0644DF/IDTNdD5qCgx5eXOfv9K/2nlRdwxpOxQQfroJSty8LsioZZOINFWvyq7Kn izKSnOznMQUj7QkqfzjTOdbzMU4R7d9RFRyLbTE4FTOfatFEXxNMM/veEAB9rMHFEw/e PFcETeCwVzTVL4jTvTUgr0qhOmWuO4DFHKBhHGZgJB1bWdkW5TiClfmAixpQ4SbmxbIi LtS3x42AWfzV7vKpapQ3K3nEmx3XYCM+b0ZLVjPYaFlEslbvCnnVVzg5ukWyeDOLST4P tNErwuSM8QURVxiTMuxgmNQL3dKpzrequYWElnETzopojbUMASLEjnyK6ztmnSQHh/my 0TwA== X-Gm-Message-State: AOJu0Yy/J22/BKKwjqrGJh1JYgLvfZ2Gpw+1FFcyUC8TqqDMSDOcPAyO KJGTZrpepaYkcewSU9eb3S6sse1/1SPHKE3bDw/0ztqd9ymfOOjRxTc+sGAViWqZTGq3AJhZsG6 rBGHHJA== X-Google-Smtp-Source: AGHT+IFTI1sun9eIebxuu0jhttHE2epXfTVgsW8vyywc06TRgpylDfan7nX5GJq0iAjmZfjx70ZzEQ== X-Received: by 2002:a05:6820:2b83:b0:5c1:ae36:14e with SMTP id 006d021491bc7-5c1ae36016emr4089417eaf.6.1718832487747; Wed, 19 Jun 2024 14:28:07 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:28:07 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas Subject: [PATCH 5/7] powerpc: Implement a default flush_dcache_all Date: Wed, 19 Jun 2024 15:27:57 -0600 Message-Id: <20240619212759.3456158-5-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 --- arch/powerpc/lib/cache.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c index e480b2696494..130318d745aa 100644 --- a/arch/powerpc/lib/cache.c +++ b/arch/powerpc/lib/cache.c @@ -43,3 +43,12 @@ void flush_cache(ulong start_addr, ulong size) /* flush prefetch queue */ asm volatile("isync" : : : "memory"); } + +/* + * Default implementation: + * do a range flush for the entire range + */ +void flush_dcache_all(void) +{ + flush_dcache_range(0, ~0); +} From patchwork Wed Jun 19 21:27:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1949857 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=qMcAqzMs; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4W4Gvw1jGZz20X8 for ; Thu, 20 Jun 2024 07:29:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1DC5F884BF; Wed, 19 Jun 2024 23:28:15 +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="qMcAqzMs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0C494884EA; Wed, 19 Jun 2024 23:28:12 +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=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) (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 EB578884C3 for ; Wed, 19 Jun 2024 23:28:09 +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-x32c.google.com with SMTP id 46e09a7af769-6f8d0a1e500so160823a34.3 for ; Wed, 19 Jun 2024 14:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1718832489; x=1719437289; 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=ionMRDmQYunEs015GAi2rPg/RRUy1ygxYkFzcbmGt7M=; b=qMcAqzMsGF0zQc6HCOilixTqAC7h+ovvGVuRtVbOmdZsNUKOXdwjhB+she5a+8Z6X5 gfuAfrsa/H7WroYPBZRpPdyUZRYuj1xNoU7T+Vr0nMKOEbuYsvIE4n+OMRXSvp7zw3H+ LGVjYs+5HY4OKRlf6nQdVkjU7F9UBrLf5iJHg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718832489; x=1719437289; 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=ionMRDmQYunEs015GAi2rPg/RRUy1ygxYkFzcbmGt7M=; b=God1sf0T5wxwUyKwTTEU6IiWNpB9hUWrJADuLEvYC5LnHzm5YLiaPoRQKeXPhRh5Bo z+HZMppzTdYosnB+PuRpzg2ydIMaXa/6nKohnkQfHAYZ2AvAAutkTZwDSYoTcLGsLsmj DvG1z0jMvSWpf5FuF2z/weTCz6lTqaEV5qUljVGRzQF21R/mLvZcHbFVrlP8ALJNwoV9 CtTToX6L2Y9+P/YNSBtFJMkCmoxmXtp2ja+TFNDXuS/AFH4wkzPh49PHasihvBEK7PC0 4KnD5x1uXlEJFZCjw5/dJ4n6DpGI/QS/gQa6u1rMSvBNg1sL4qoDFv+Vc+gSJ/oSLcXM vpSA== X-Gm-Message-State: AOJu0YyK/PJRDKxKbenkNhVEp3ZkbIpP75iVX79K40y8Hq40eWW+A71e G1U5S2TW8WbSGKjfVdEEWYOB+OsdpFqFEIbWD/LEoqczGaGJe5rOmdjoiLnEsThSh13c8GHbmW6 NC/butg== X-Google-Smtp-Source: AGHT+IHPXHwLSoCvsImYUoq10Ouye3jGje31A2riud8pyQkVgab21g8Ww1TU3eKQNe2Tdo//GePDzQ== X-Received: by 2002:a05:6830:10d9:b0:6fa:348:5fa7 with SMTP id 46e09a7af769-70075a73690mr4172109a34.31.1718832488631; Wed, 19 Jun 2024 14:28:08 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:28:08 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas Subject: [PATCH 6/7] powerpc: Add the old invalidate_icache_all function Date: Wed, 19 Jun 2024 15:27:58 -0600 Message-Id: <20240619212759.3456158-6-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 Add the old invalidate_icache_all function that prints a warning that was previously found in cmd/cache.c Signed-off-by: Tom Rini --- arch/powerpc/lib/cache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/lib/cache.c b/arch/powerpc/lib/cache.c index 130318d745aa..a9cd7b8d30ac 100644 --- a/arch/powerpc/lib/cache.c +++ b/arch/powerpc/lib/cache.c @@ -5,6 +5,7 @@ */ #include +#include #include #include @@ -52,3 +53,8 @@ void flush_dcache_all(void) { flush_dcache_range(0, ~0); } + +void invalidate_icache_all(void) +{ + puts("No arch specific invalidate_icache_all available!\n"); +} From patchwork Wed Jun 19 21:27:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1949858 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=lPWYgcZ7; 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 4W4Gw743Lwz20X8 for ; Thu, 20 Jun 2024 07:29:11 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 83325884FB; Wed, 19 Jun 2024 23:28:15 +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="lPWYgcZ7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 197C688516; Wed, 19 Jun 2024 23:28:13 +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=ham autolearn_force=no version=3.4.2 Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) (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 ADBBE87F5C for ; Wed, 19 Jun 2024 23:28:10 +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-oo1-xc35.google.com with SMTP id 006d021491bc7-5c1a6daa04bso110956eaf.0 for ; Wed, 19 Jun 2024 14:28:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1718832489; x=1719437289; 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=Iyab9n4brxTiscYvfj51byEryQbwz/zpscFbIZakAq0=; b=lPWYgcZ7GsBd7LRS5eGF7ZTQ/5cmPiAGSwGJYBH8SCFOm/Ra0mNiwv240op5cDW63p d8Pj0nWOLsI5kQglsM0Mdcj4Hq2YKTcFIHXnpZKbltZAOz7hvJfc0DZgiajUVURgBsnm x0wdJTp8u4D3cwNe7ObWqvpRwnX5CbEIcSa/U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718832489; x=1719437289; 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=Iyab9n4brxTiscYvfj51byEryQbwz/zpscFbIZakAq0=; b=UUMRYUUDr+/pinHyue9mKRtkQoWZW/1u6NLAzhkCSpgiI3WSS9RsPQWJAotZAtERei IZXuo44dVUH2aBUpNOmPjOgvFSClxpSm29sSOg+2zqC3fYz06stgSTqwIoUdU6//jCSj ivEnvmw2g5nUAWpRz72doAy3DfTbJd30NF1IpX6z4EijdYDbkf8AhEZXWV7Y8fbDT4hd yk8Vqu8DzemPz2PUCZW3LMZEPkD9L/lsJLmaJuBFRsZTY86ipb/V2otmFScDw8zpQ76B sCLe5Em+jfnxNHDVjztznJYOIypWb4uRK4CFXUhDJpj6IMPCpEWzu7epSJ2GlAp6Oowh Magw== X-Gm-Message-State: AOJu0YzmCifZ/9fvaxbjlN6xNq1gwesCWvh71f8dscehXSYt/OL6RfcR 7TjfJNVB4CBG3TsFqT9DWlcX9rF/iI9VsG8ODhO0ClLjoY/xu0Ha71+e0XoNqkpX+TbsJ5o5+3P zqURcoA== X-Google-Smtp-Source: AGHT+IEarZ+5qzDgKRwJyJj4q9TFwETyMk6tIq1qmMmERzsPZXSVYTuF22dL4XGkOmeAJGVQesUfkQ== X-Received: by 2002:a4a:3542:0:b0:5ba:f2a5:3afc with SMTP id 006d021491bc7-5c1adae6a61mr4433972eaf.1.1718832489413; Wed, 19 Jun 2024 14:28:09 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:28:09 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas Subject: [PATCH 7/7] cmd: cache: Remove weak functions Date: Wed, 19 Jun 2024 15:27:59 -0600 Message-Id: <20240619212759.3456158-7-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 It should be up to an architecture to decide how to implement cache functions, and if they need to use weak functions or not. Allowing the cache command to be built without cache functionality implemented is unhelpful. Further, guard the call to noncached_set_region with CONFIG_SYS_NONCACHED_MEMORY as that's when it's implemented and again is an architecture specific detail. Signed-off-by: Tom Rini Reviewed-by: Ilias Apalodimas --- This patch series is intended to replace https://patchwork.ozlabs.org/project/uboot/patch/20240616173105.7430-2-heinrich.schuchardt@canonical.com/ --- cmd/cache.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/cmd/cache.c b/cmd/cache.c index 0254ff17f9b2..7a2068296ef1 100644 --- a/cmd/cache.c +++ b/cmd/cache.c @@ -13,16 +13,6 @@ static int parse_argv(const char *); -void __weak invalidate_icache_all(void) -{ - /* please define arch specific invalidate_icache_all */ - puts("No arch specific invalidate_icache_all available!\n"); -} - -__weak void noncached_set_region(void) -{ -} - static int do_icache(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -52,12 +42,6 @@ static int do_icache(struct cmd_tbl *cmdtp, int flag, int argc, return 0; } -void __weak flush_dcache_all(void) -{ - puts("No arch specific flush_dcache_all available!\n"); - /* please define arch specific flush_dcache_all */ -} - static int do_dcache(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -69,7 +53,9 @@ static int do_dcache(struct cmd_tbl *cmdtp, int flag, int argc, break; case 1: dcache_enable(); +#ifdef CONFIG_SYS_NONCACHED_MEMORY noncached_set_region(); +#endif break; case 2: flush_dcache_all();