2013-08-02 16:10:30 +02:00
|
|
|
#include <minix/syslib.h>
|
|
|
|
#include <minix/drvlib.h>
|
|
|
|
#include <minix/sysutil.h>
|
|
|
|
|
|
|
|
#include <sys/mman.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
#include "omap_rtc.h"
|
2013-08-07 03:34:08 +02:00
|
|
|
#include "forward.h"
|
2013-08-02 16:10:30 +02:00
|
|
|
#include "readclock.h"
|
|
|
|
|
|
|
|
int
|
2013-08-07 03:34:08 +02:00
|
|
|
arch_setup(struct rtc *r)
|
|
|
|
{
|
|
|
|
#ifdef AM335X
|
|
|
|
r->init = omap_rtc_init;
|
|
|
|
r->get_time = omap_rtc_get_time;
|
|
|
|
r->set_time = omap_rtc_set_time;
|
|
|
|
r->pwr_off = omap_rtc_pwr_off;
|
|
|
|
r->exit = omap_rtc_exit;
|
2013-08-02 16:10:30 +02:00
|
|
|
return OK;
|
2013-08-07 03:34:08 +02:00
|
|
|
#elif DM37XX
|
|
|
|
fwd_set_label("tps65950.1.48");
|
|
|
|
r->init = fwd_init;
|
|
|
|
r->get_time = fwd_get_time;
|
|
|
|
r->set_time = fwd_set_time;
|
|
|
|
r->pwr_off = fwd_pwr_off;
|
|
|
|
r->exit = fwd_exit;
|
2013-08-02 16:10:30 +02:00
|
|
|
return OK;
|
2013-08-07 03:34:08 +02:00
|
|
|
#else
|
|
|
|
return ENOSYS;
|
|
|
|
#endif
|
2013-08-02 16:10:30 +02:00
|
|
|
}
|