From patchwork Wed Oct 12 21:01:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton staaf X-Patchwork-Id: 119301 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 74961B6F7D for ; Thu, 13 Oct 2011 08:04:18 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C633528AAB; Wed, 12 Oct 2011 23:03:53 +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 FsnX+wjplExW; Wed, 12 Oct 2011 23:03:53 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C353728AAC; Wed, 12 Oct 2011 23:03:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D620828533 for ; Wed, 12 Oct 2011 23:02:48 +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 c2j02fpL+4Tz for ; Wed, 12 Oct 2011 23:02:48 +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 smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by theia.denx.de (Postfix) with ESMTPS id C09BB28A26 for ; Wed, 12 Oct 2011 23:02:18 +0200 (CEST) Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id p9CL27Vk026941; Wed, 12 Oct 2011 14:02:07 -0700 Received: from servo.mtv.corp.google.com (servo.mtv.corp.google.com [172.22.72.56]) by wpaz17.hot.corp.google.com with ESMTP id p9CL1xMV014395; Wed, 12 Oct 2011 14:02:04 -0700 Received: by servo.mtv.corp.google.com (Postfix, from userid 99248) id 8898A4A187; Wed, 12 Oct 2011 14:02:04 -0700 (PDT) From: Anton Staaf To: u-boot@lists.denx.de Date: Wed, 12 Oct 2011 14:01:51 -0700 Message-Id: <1318453311-31349-13-git-send-email-robotboy@chromium.org> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1318453311-31349-1-git-send-email-robotboy@chromium.org> References: <1318453311-31349-1-git-send-email-robotboy@chromium.org> X-System-Of-Record: true Cc: Anton Staaf , Ilya Yanok Subject: [U-Boot] [PATCH 12/12] cache: include asm/cache.h for ARCH_DMA_MINALIGN definition X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 ARCH_DMA_MINALIGN will be used to allocate DMA buffers that are aligned correctly. In all current cases this means that the DMA buffer will be aligned to at least the L1 data cache line size of the configured architecture. If the board configuration file does not specify the architecture L1 data cache line size then the maximum line size of the architecture is used to align DMA buffers. Signed-off-by: Anton Staaf Cc: Mike Frysinger Cc: Lukasz Majewski Cc: Wolfgang Denk Cc: Stefano Babic Cc: Ilya Yanok Cc: Laurence Withers Change-Id: I6cc14dbc4b8fce3e4820e7b3ad3a06d1f2100152 --- include/common.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/include/common.h b/include/common.h index eb19a44..74e41d4 100644 --- a/include/common.h +++ b/include/common.h @@ -814,6 +814,14 @@ int cpu_release(int nr, int argc, char * const argv[]); #define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) +/* + * ARCH_DMA_MINALIGN is defined in asm/cache.h for each architecture. It + * is used to align DMA buffers. + */ +#ifndef __ASSEMBLY__ +#include +#endif + /* Pull in stuff for the build system */ #ifdef DO_DEPS_ONLY # include