os/kernelhwsrv/kernel/eka/include/drivers/dma_compat.inl
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/include/drivers/dma_compat.inl	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,62 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// include/drivers/dma_compat.inl
    1.18 +// DMA Framework - Client API definition.
    1.19 +//
    1.20 +// Inline implementations of functions which (originally) exposed DMA HAI
    1.21 +// details that are now, after the header file split into dma_v2.h and
    1.22 +// dma_hai.h, no longer meant to be visible to DMA clients. This file is only
    1.23 +// included for DMA_APIV2 clients.
    1.24 +//
    1.25 +// This file is not meant to be a permanent one, and may eventually be removed
    1.26 +// together with the deprecated functions it implements.
    1.27 +//
    1.28 +//
    1.29 +
    1.30 +
    1.31 +inline const TDmac* TDmaChannel::Controller() const
    1.32 +	{
    1.33 +	return iController;
    1.34 +	}
    1.35 +
    1.36 +static inline TUint32 RequestFlags2SrcConfigFlags(TUint aFlags)
    1.37 +	{
    1.38 +	TUint32 flags = (aFlags & KDmaMemSrc) ? KDmaMemAddr : 0;
    1.39 +	flags |= (aFlags & KDmaPhysAddrSrc) ? KDmaPhysAddr : 0;
    1.40 +	return flags;
    1.41 +	}
    1.42 +
    1.43 +static inline TUint32 RequestFlags2DstConfigFlags(TUint aFlags)
    1.44 +	{
    1.45 +	TUint32 flags = (aFlags & KDmaMemDest) ? KDmaMemAddr : 0;
    1.46 +	flags |= (aFlags & KDmaPhysAddrDest) ? KDmaPhysAddr : 0;
    1.47 +	return flags;
    1.48 +	}
    1.49 +
    1.50 +inline TInt TDmaChannel::MaxTransferSize(TUint aFlags, TUint32 aPslInfo)
    1.51 +	{
    1.52 +	TUint src_flags = RequestFlags2SrcConfigFlags(aFlags);
    1.53 +	TUint dst_flags = RequestFlags2DstConfigFlags(aFlags);
    1.54 +	return MaxTransferLength(src_flags, dst_flags, aPslInfo);
    1.55 +	}
    1.56 +
    1.57 +inline TUint TDmaChannel::MemAlignMask(TUint aFlags, TUint32 aPslInfo)
    1.58 +	{
    1.59 +	TUint src_flags = RequestFlags2SrcConfigFlags(aFlags);
    1.60 +	TUint dst_flags = RequestFlags2DstConfigFlags(aFlags);
    1.61 +	return AddressAlignMask(src_flags, dst_flags, aPslInfo);
    1.62 +	}
    1.63 +
    1.64 +
    1.65 +// ---