From patchwork Thu Apr 8 23:54:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gomez Castellanos, Ivan" X-Patchwork-Id: 91565 X-Patchwork-Delegate: omar.ramirez@ti.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o38NsDmi020655 for ; Thu, 8 Apr 2010 23:54:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933890Ab0DHXyM (ORCPT ); Thu, 8 Apr 2010 19:54:12 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:43593 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933823Ab0DHXyM convert rfc822-to-8bit (ORCPT ); Thu, 8 Apr 2010 19:54:12 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o38Ns6mR024744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Apr 2010 18:54:06 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id o38Ns6xl002256; Thu, 8 Apr 2010 18:54:06 -0500 (CDT) Received: from dlee74.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id o38Ns6Pj019419; Thu, 8 Apr 2010 18:54:06 -0500 (CDT) Received: from dlee01.ent.ti.com ([157.170.170.12]) by dlee74.ent.ti.com ([157.170.170.8]) with mapi; Thu, 8 Apr 2010 18:54:05 -0500 From: "Gomez Castellanos, Ivan" To: "linux-omap@vger.kernel.org" CC: Hiroshi DOYU , Felipe Contreras , Ameya Palande , "Menon, Nishanth" Date: Thu, 8 Apr 2010 18:54:05 -0500 Subject: [PATCH 04/13] DSPBRIDGE: Moving macros from mem.h to drv.h Thread-Topic: [PATCH 04/13] DSPBRIDGE: Moving macros from mem.h to drv.h Thread-Index: AcrXdc8tFbcrnB7vQWyaiC7ri+loqg== Message-ID: <818EF96F5A7CC84789DD014773DB09548F6481D6@dlee01.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 08 Apr 2010 23:54:13 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h b/arch/arm/plat-omap/include/dspbridge/drv.h index eeb5e23..b4bea17 100644 --- a/arch/arm/plat-omap/include/dspbridge/drv.h +++ b/arch/arm/plat-omap/include/dspbridge/drv.h @@ -468,4 +468,37 @@ extern void mem_flush_cache(void *pMemBuf, u32 byte_size, s32 FlushType); extern void mem_free_phys_mem(void *pVirtualAddress, u32 pPhysicalAddress, u32 byte_size); +/* + * ======== MEM_LINEAR_ADDRESS ======== + * Purpose: + * Get the linear address corresponding to the given physical address. + * Parameters: + * pPhysAddr: Physical address to be mapped. + * byte_size: Number of bytes in physical range to map. + * Returns: + * The corresponding linear address, or NULL if unsuccessful. + * Requires: + * MEM initialized. + * Ensures: + * Notes: + * If valid linear address is returned, be sure to call + * MEM_UNMAP_LINEAR_ADDRESS(). + */ +#define MEM_LINEAR_ADDRESS(pPhyAddr, byte_size) pPhyAddr + +/* + * ======== MEM_UNMAP_LINEAR_ADDRESS ======== + * Purpose: + * Unmap the linear address mapped in MEM_LINEAR_ADDRESS. + * Parameters: + * pBaseAddr: Ptr to mapped memory (as returned by MEM_LINEAR_ADDRESS()). + * Returns: + * Requires: + * - MEM initialized. + * - pBaseAddr is a valid linear address mapped in MEM_LINEAR_ADDRESS. + * Ensures: + * - pBaseAddr no longer points to a valid linear address. + */ +#define MEM_UNMAP_LINEAR_ADDRESS(pBaseAddr) {} + #endif /* DRV_ */ diff --git a/arch/arm/plat-omap/include/dspbridge/mem.h b/arch/arm/plat-omap/include/dspbridge/mem.h index 374b971..9f713b9 100644 --- a/arch/arm/plat-omap/include/dspbridge/mem.h +++ b/arch/arm/plat-omap/include/dspbridge/mem.h @@ -166,37 +166,4 @@ extern bool services_mem_init(void); #define MEM_IS_VALID_HANDLE(hObj, Sig) \ ((hObj != NULL) && (hObj->dw_signature == Sig)) -/* - * ======== MEM_LINEAR_ADDRESS ======== - * Purpose: - * Get the linear address corresponding to the given physical address. - * Parameters: - * pPhysAddr: Physical address to be mapped. - * byte_size: Number of bytes in physical range to map. - * Returns: - * The corresponding linear address, or NULL if unsuccessful. - * Requires: - * MEM initialized. - * Ensures: - * Notes: - * If valid linear address is returned, be sure to call - * MEM_UNMAP_LINEAR_ADDRESS(). - */ -#define MEM_LINEAR_ADDRESS(pPhyAddr, byte_size) pPhyAddr - -/* - * ======== MEM_UNMAP_LINEAR_ADDRESS ======== - * Purpose: - * Unmap the linear address mapped in MEM_LINEAR_ADDRESS. - * Parameters: - * pBaseAddr: Ptr to mapped memory (as returned by MEM_LINEAR_ADDRESS()). - * Returns: - * Requires: - * - MEM initialized. - * - pBaseAddr is a valid linear address mapped in MEM_LINEAR_ADDRESS. - * Ensures: - * - pBaseAddr no longer points to a valid linear address. - */ -#define MEM_UNMAP_LINEAR_ADDRESS(pBaseAddr) {} - #endif /* MEM_ */