1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // include/drivers/dma_compat.inl |
|
15 // DMA Framework - Client API definition. |
|
16 // |
|
17 // Inline implementations of functions which (originally) exposed DMA HAI |
|
18 // details that are now, after the header file split into dma_v2.h and |
|
19 // dma_hai.h, no longer meant to be visible to DMA clients. This file is only |
|
20 // included for DMA_APIV2 clients. |
|
21 // |
|
22 // This file is not meant to be a permanent one, and may eventually be removed |
|
23 // together with the deprecated functions it implements. |
|
24 // |
|
25 // |
|
26 |
|
27 |
|
28 inline const TDmac* TDmaChannel::Controller() const |
|
29 { |
|
30 return iController; |
|
31 } |
|
32 |
|
33 static inline TUint32 RequestFlags2SrcConfigFlags(TUint aFlags) |
|
34 { |
|
35 TUint32 flags = (aFlags & KDmaMemSrc) ? KDmaMemAddr : 0; |
|
36 flags |= (aFlags & KDmaPhysAddrSrc) ? KDmaPhysAddr : 0; |
|
37 return flags; |
|
38 } |
|
39 |
|
40 static inline TUint32 RequestFlags2DstConfigFlags(TUint aFlags) |
|
41 { |
|
42 TUint32 flags = (aFlags & KDmaMemDest) ? KDmaMemAddr : 0; |
|
43 flags |= (aFlags & KDmaPhysAddrDest) ? KDmaPhysAddr : 0; |
|
44 return flags; |
|
45 } |
|
46 |
|
47 inline TInt TDmaChannel::MaxTransferSize(TUint aFlags, TUint32 aPslInfo) |
|
48 { |
|
49 TUint src_flags = RequestFlags2SrcConfigFlags(aFlags); |
|
50 TUint dst_flags = RequestFlags2DstConfigFlags(aFlags); |
|
51 return MaxTransferLength(src_flags, dst_flags, aPslInfo); |
|
52 } |
|
53 |
|
54 inline TUint TDmaChannel::MemAlignMask(TUint aFlags, TUint32 aPslInfo) |
|
55 { |
|
56 TUint src_flags = RequestFlags2SrcConfigFlags(aFlags); |
|
57 TUint dst_flags = RequestFlags2DstConfigFlags(aFlags); |
|
58 return AddressAlignMask(src_flags, dst_flags, aPslInfo); |
|
59 } |
|
60 |
|
61 |
|
62 // --- |
|