1/*
2 * Copyright 2006, Ingo Weinhold. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include "pci_io.h"
8#include "pci_private.h"
9
10
11status_t
12pci_io_init()
13{
14	return B_OK;
15}
16
17
18uint8
19pci_read_io_8(int mapped_io_addr)
20{
21	return ppc_in8((vuint8*)mapped_io_addr);
22}
23
24
25void
26pci_write_io_8(int mapped_io_addr, uint8 value)
27{
28	ppc_out8((vuint8*)mapped_io_addr, value);
29}
30
31
32uint16
33pci_read_io_16(int mapped_io_addr)
34{
35	return ppc_in16((vuint16*)mapped_io_addr);
36}
37
38
39void
40pci_write_io_16(int mapped_io_addr, uint16 value)
41{
42	ppc_out16((vuint16*)mapped_io_addr, value);
43}
44
45
46uint32
47pci_read_io_32(int mapped_io_addr)
48{
49	return ppc_in32((vuint32*)mapped_io_addr);
50}
51
52
53void
54pci_write_io_32(int mapped_io_addr, uint32 value)
55{
56	ppc_out32((vuint32*)mapped_io_addr, value);
57}
58