From patchwork Tue Jul 2 12:35:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bo Shen X-Patchwork-Id: 256395 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 1FF7E2C009C for ; Tue, 2 Jul 2013 22:37:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 20E074A03B; Tue, 2 Jul 2013 14:37:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 cOuyhHCNT6Gz; Tue, 2 Jul 2013 14:37:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B6B4D4A046; Tue, 2 Jul 2013 14:37:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3EAF44A046 for ; Tue, 2 Jul 2013 14:37:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 KCkQTCR0lzyM for ; Tue, 2 Jul 2013 14:37:19 +0200 (CEST) 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-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by theia.denx.de (Postfix) with ESMTPS id 659D54A03B for ; Tue, 2 Jul 2013 14:37:10 +0200 (CEST) Received: by mail-pa0-f47.google.com with SMTP id kl14so6245252pab.34 for ; Tue, 02 Jul 2013 05:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=48XiCcAC7zJ8hAbhrWAXYfl8cB3DjHbTP9F6Yos2lqY=; b=hmpZrtkPl7wBtviqON7vNJecwY3WhvashL4k12zIBSAHACT3Qbx7m8SSE9J3E6f7PY fXpPQla6OrqHFcUdO1W1cQasbjETFOqq3+g7PK7ws9pEGGO+vI+ZYGv7iGPbq8bHTbXd 4IkOMstMUQeHqESln6rFrBBkzDlNHeY80nCviA/+2qH7uDblo+MlETddUB1HzmyX6+xu vOwjkFoZcSAiml62eb2xUXj5pK3N9eLxv355IbgiqMDFpxM9cx2B3sAwNZNlsVAtaImB UYEiS9XKgbreut3XliyBBCoMAitgtTwlxXeDCa1y1GDSSa0It6hh8v89CH97QIJu0q3k Wtzg== X-Received: by 10.68.241.135 with SMTP id wi7mr28996546pbc.88.1372768628853; Tue, 02 Jul 2013 05:37:08 -0700 (PDT) Received: from localhost.localdomain ([123.138.49.171]) by mx.google.com with ESMTPSA id pm7sm27254384pbb.31.2013.07.02.05.37.06 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Jul 2013 05:37:07 -0700 (PDT) From: Bo Shen To: u-boot@lists.denx.de Date: Tue, 2 Jul 2013 12:35:54 +0000 Message-Id: <1372768555-12477-1-git-send-email-voice.shen@gmail.com> X-Mailer: git-send-email 1.7.10.4 Cc: Bo Shen Subject: [U-Boot] [RFC PATCH] arm: arm926ejs: flush cache before disable it X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de flush cache before disable it Signed-off-by: Bo Shen --- arch/arm/cpu/arm926ejs/cpu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c index 626384c..10aa165 100644 --- a/arch/arm/cpu/arm926ejs/cpu.c +++ b/arch/arm/cpu/arm926ejs/cpu.c @@ -46,15 +46,14 @@ int cleanup_before_linux (void) disable_interrupts (); + /* flush I/D-cache */ + cache_flush(); /* turn off I/D-cache */ icache_disable(); dcache_disable(); l2_cache_disable(); - /* flush I/D-cache */ - cache_flush(); - return 0; }