equal
deleted
inserted
replaced
|
1 /* |
|
2 * This component and the accompanying materials are made available |
|
3 * under the terms of the License "Eclipse Public License v1.0" |
|
4 * which accompanies this distribution, and is available |
|
5 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
6 * |
|
7 * Initial Contributors: |
|
8 * Accenture Ltd |
|
9 * |
|
10 * Contributors: |
|
11 * |
|
12 * Description: This file is a part of sound driver for Syborg adaptation. |
|
13 * |
|
14 */ |
|
15 |
|
16 #include "virtio_io.h" |
|
17 |
|
18 namespace VirtIo |
|
19 { |
|
20 |
|
21 void DIo::GetDeviceIds( TUint32 &aPeripheralId, TUint32 &aDeviceId ) |
|
22 { |
|
23 aPeripheralId = read( EIoID ); |
|
24 aDeviceId = read( EIoDevType ); |
|
25 } |
|
26 |
|
27 void DIo::SetQueueBase( TUint aQId, TAny* iDescRegion ) |
|
28 { |
|
29 TUint32 phAddr = iDescRegion?Epoc::LinearToPhysical( reinterpret_cast<TUint32>( iDescRegion ) ):0; |
|
30 write(EIoQueueSelect, aQId); |
|
31 write(EIoQueueBase, phAddr ); |
|
32 SYBORG_VIRTIO_DEBUG("SetQueueBase Q%d %x", aQId, phAddr ); |
|
33 } |
|
34 |
|
35 |
|
36 TAny* DIo::GetQueueBase( TUint aQId) |
|
37 { |
|
38 write(EIoQueueSelect, aQId); |
|
39 return reinterpret_cast<TAny*>( read(EIoQueueBase) ); |
|
40 } |
|
41 |
|
42 } // namespace VirtIo |