btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / system / kernel / arch / m68k / arch_platform.cpp
blobbf5003b256d5b7f06747fa6d538133bc3f8e6e76
1 /*
2 * Copyright 2007, François Revol, revol@free.fr.
3 * Distributed under the terms of the MIT License.
5 * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
6 * All rights reserved. Distributed under the terms of the MIT License.
7 */
9 #include <arch_platform.h>
11 #include <new>
13 #include <KernelExport.h>
15 #include <boot/kernel_args.h>
16 //#include <platform/openfirmware/openfirmware.h>
17 #include <real_time_clock.h>
18 #include <util/kernel_cpp.h>
21 static M68KPlatform *sM68KPlatform;
24 // constructor
25 M68KPlatform::M68KPlatform(m68k_platform_type platformType)
26 : fPlatformType(platformType)
30 // destructor
31 M68KPlatform::~M68KPlatform()
35 // Default
36 M68KPlatform *
37 M68KPlatform::Default()
39 return sM68KPlatform;
43 // # pragma mark -
46 status_t
47 arch_platform_init(struct kernel_args *kernelArgs)
49 // only Atari supported for now
50 switch (kernelArgs->arch_args.platform) {
51 #if 0
52 case M68K_PLATFORM_AMIGA:
53 sM68KPlatform = instanciate_m68k_platform_amiga();
54 break;
55 #endif
56 case M68K_PLATFORM_ATARI:
57 sM68KPlatform = instanciate_m68k_platform_atari();
58 break;
59 #if 0
60 case M68K_PLATFORM_MAC:
61 sM68KPlatform = instanciate_m68k_platform_mac();
62 break;
63 case M68K_PLATFORM_NEXT:
64 sM68KPlatform = instanciate_m68k_platform_next();
65 break;
66 #endif
67 default:
68 panic("unknown platform d\n", kernelArgs->arch_args.platform);
71 return sM68KPlatform->Init(kernelArgs);
75 status_t
76 arch_platform_init_post_vm(struct kernel_args *kernelArgs)
78 return sM68KPlatform->InitPostVM(kernelArgs);
82 status_t
83 arch_platform_init_post_thread(struct kernel_args *kernelArgs)
85 return B_OK;