kernel/eka/include/drivers/dma_compat.inl
changeset 139 95f71bcdcdb7
parent 36 538db54a451d
equal deleted inserted replaced
109:b3a1d9898418 139:95f71bcdcdb7
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    32 
    32 
    33 static inline TUint32 RequestFlags2SrcConfigFlags(TUint aFlags)
    33 static inline TUint32 RequestFlags2SrcConfigFlags(TUint aFlags)
    34 	{
    34 	{
    35 	TUint32 flags = (aFlags & KDmaMemSrc) ? KDmaMemAddr : 0;
    35 	TUint32 flags = (aFlags & KDmaMemSrc) ? KDmaMemAddr : 0;
    36 	flags |= (aFlags & KDmaPhysAddrSrc) ? KDmaPhysAddr : 0;
    36 	flags |= (aFlags & KDmaPhysAddrSrc) ? KDmaPhysAddr : 0;
       
    37 	if ((flags & KDmaMemAddr) && (flags & KDmaPhysAddr))
       
    38 		flags |= KDmaMemIsContiguous;
    37 	return flags;
    39 	return flags;
    38 	}
    40 	}
    39 
    41 
    40 static inline TUint32 RequestFlags2DstConfigFlags(TUint aFlags)
    42 static inline TUint32 RequestFlags2DstConfigFlags(TUint aFlags)
    41 	{
    43 	{
    42 	TUint32 flags = (aFlags & KDmaMemDest) ? KDmaMemAddr : 0;
    44 	TUint32 flags = (aFlags & KDmaMemDest) ? KDmaMemAddr : 0;
    43 	flags |= (aFlags & KDmaPhysAddrDest) ? KDmaPhysAddr : 0;
    45 	flags |= (aFlags & KDmaPhysAddrDest) ? KDmaPhysAddr : 0;
       
    46 	if ((flags & KDmaMemAddr) && (flags & KDmaPhysAddr))
       
    47 		flags |= KDmaMemIsContiguous;
    44 	return flags;
    48 	return flags;
    45 	}
    49 	}
    46 
    50 
    47 inline TInt TDmaChannel::MaxTransferSize(TUint aFlags, TUint32 aPslInfo)
    51 inline TInt TDmaChannel::MaxTransferSize(TUint aFlags, TUint32 aPslInfo)
    48 	{
    52 	{