From patchwork Sun Nov 27 22:15:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 699770 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3tRkgC6198z9t2g for ; Mon, 28 Nov 2016 09:16:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A06DFA7613; Sun, 27 Nov 2016 23:16:21 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FT6kvz2jXA2m; Sun, 27 Nov 2016 23:16:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 38A28A7616; Sun, 27 Nov 2016 23:16:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 489AAA75B4 for ; Sun, 27 Nov 2016 23:15:47 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3f2C8Z3vYsK7 for ; Sun, 27 Nov 2016 23:15:47 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.mleia.com (mleia.com [178.79.152.223]) by theia.denx.de (Postfix) with ESMTPS id 20442A7579 for ; Sun, 27 Nov 2016 23:15:44 +0100 (CET) Received: from mail.mleia.com (localhost [127.0.0.1]) by mail.mleia.com (Postfix) with ESMTP id B7617381462; Sun, 27 Nov 2016 22:15:43 +0000 (GMT) From: Vladimir Zapolskiy To: u-boot@lists.denx.de, Tom Rini Date: Mon, 28 Nov 2016 00:15:16 +0200 Message-Id: <20161127221536.9577-5-vz@mleia.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161127221536.9577-1-vz@mleia.com> References: <20161127221536.9577-1-vz@mleia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20161127_221543_777972_498804A8 X-CRM114-Status: UNSURE ( 9.23 ) X-CRM114-Notice: Please train this message. Subject: [U-Boot] [RESEND][PATCH 04/24] sh: cache use jump_to_P2() and back_to_P1() from asm/system.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Both jump_to_P2() and back_to_P1() functions are found in asm/system.h header file and functionally they are the same, don't redefine them. Signed-off-by: Vladimir Zapolskiy Reviewed-by: Simon Glass --- arch/sh/cpu/sh4/cache.c | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/arch/sh/cpu/sh4/cache.c b/arch/sh/cpu/sh4/cache.c index b3e5fd5..50695b6 100644 --- a/arch/sh/cpu/sh4/cache.c +++ b/arch/sh/cpu/sh4/cache.c @@ -7,44 +7,9 @@ #include #include -#include #include - -/* - * Jump to P2 area. - * When handling TLB or caches, we need to do it from P2 area. - */ -#define jump_to_P2() \ - do { \ - unsigned long __dummy; \ - __asm__ __volatile__( \ - "mov.l 1f, %0\n\t" \ - "or %1, %0\n\t" \ - "jmp @%0\n\t" \ - " nop\n\t" \ - ".balign 4\n" \ - "1: .long 2f\n" \ - "2:" \ - : "=&r" (__dummy) \ - : "r" (0x20000000)); \ - } while (0) - -/* - * Back to P1 area. - */ -#define back_to_P1() \ - do { \ - unsigned long __dummy; \ - __asm__ __volatile__( \ - "nop;nop;nop;nop;nop;nop;nop\n\t" \ - "mov.l 1f, %0\n\t" \ - "jmp @%0\n\t" \ - " nop\n\t" \ - ".balign 4\n" \ - "1: .long 2f\n" \ - "2:" \ - : "=&r" (__dummy)); \ - } while (0) +#include +#include #define CACHE_VALID 1 #define CACHE_UPDATED 2