1/*
2 * Copyright 2007, François Revol <revol@free.fr>.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include "pci_controller.h"
8
9#include <arch_platform.h>
10
11#include "pci_private.h"
12
13/*
14 * As we don't have any real PCI bus in any of the supported m68k platforms,
15 * we fake one, with hardcoded devices.
16 * TODO: this doesn't make any sense, as we can't share any drivers, anyway.
17 * We should better export dedicated bus managers for Zorro etc. busses on
18 * these systems.
19 * TODO: actually, there are several PCI boards for the Amiga.
20 */
21
22#include "amiga/pci_amiga.h"
23#include "apple/pci_apple.h"
24#include "atari/pci_atari.h"
25
26
27status_t
28pci_controller_init(void)
29{
30	switch (M68KPlatform::Default()->PlatformType()) {
31/*		case M68K_PLATFORM_AMIGA:
32			return m68k_amiga_pci_controller_init();
33			break;
34		case M68K_PLATFORM_APPLE:
35			return m68k_apple_pci_controller_init();
36			break;*/
37		case M68K_PLATFORM_ATARI:
38			return m68k_atari_pci_controller_init();
39			break;
40		default:
41			return EINVAL;
42	}
43	return B_OK;
44}
45
46
47void *
48pci_ram_address(const void *physical_address_in_system_memory)
49{
50	return (void *)physical_address_in_system_memory;
51}
52