- Fix build.

- make system_time() return something sensible until platform code works.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28271 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2008-10-21 21:23:55 +00:00
parent 5430c032f4
commit d4dcbf95f6
5 changed files with 22 additions and 4 deletions
@@ -1,6 +1,11 @@
#ifndef _MFP_H
#define _MFP_H
/*
* references:
* http://alive.atari.org/hosting/docs/atari/st/MFP.htm
*/
#define MFP_GPDR 0x01
#define MFP_AER 0x03
#define MFP_DDR 0x05
@@ -3,6 +3,7 @@ SubDir HAIKU_TOP src system boot platform atari_m68k ;
SubDirHdrs $(HAIKU_TOP) headers private kernel boot platform $(TARGET_BOOT_PLATFORM) ;
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
UsePrivateHeaders [ FDirName kernel platform $(TARGET_BOOT_PLATFORM) ] ;
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
UsePrivateHeaders [ FDirName graphics common ] ;
#UsePrivateHeaders [ FDirName graphics vesa ] ;
@@ -13,6 +13,7 @@
#include <arch/cpu.h>
//#include <platform/openfirmware/openfirmware.h>
#include <platform/atari_m68k/MFP.h>
#include <platform/atari_m68k/platform_atari_m68k.h>
#include <real_time_clock.h>
#include <timer.h>
@@ -313,8 +314,6 @@ M68KAtari::ProbeHardware(struct kernel_args *kernelArgs)
fRTC = new(sRTCBuffer) M68KAtari::RTC(TT_RTC_BASE,TT_RTC_VECTOR);
} else
panic("TT RTC required!");
}
@@ -388,7 +387,7 @@ M68KAtari::InitRTC(struct kernel_args *kernelArgs,
struct real_time_data *data)
{
// XXX we should do this in the bootloader maybe...
args->arch_args.time_base_frequency = MFP_SYSTEM_TIME_RATE;
kernelArgs->arch_args.time_base_frequency = MFP_SYSTEM_TIME_RATE;
return B_OK;
}
@@ -639,7 +638,7 @@ M68KAtari::SetHardwareTimer(bigtime_t timeout)
if (timeout <= 0)
nextEventClocks = 2;
else if (timeout < MFP_MAX_TIMER_INTERVAL)
nextEventClocks = timeout * MFP_RATE / 1000000;
nextEventClocks = timeout * MFP_TIMER_RATE / 1000000;
else
nextEventClocks = 0xff;
@@ -19,6 +19,15 @@ __m68k_setup_system_time(vint32 *cvFactor)
}
//XXX: this is a hack
// remove me when platform code works
int64
__m68k_get_time_base(void)
{
static uint64 time_dilation_field = 0;
return time_dilation_field++;
}
bigtime_t
system_time(void)
{
@@ -9,7 +9,11 @@
/* int64 __m68k_get_time_base(void)
*/
#if 0
FUNCTION(__m68k_get_time_base):
#warning M68K: implement __m68k_get_time_base()
clr.l %d0
clr.l %d1
rts
FUNCTION_END(__m68k_get_time_base)
#endif