2013-08-02 16:10:30 +02:00
|
|
|
#include <minix/syslib.h>
|
|
|
|
#include <minix/drvlib.h>
|
|
|
|
#include <minix/sysutil.h>
|
2013-11-29 14:27:03 +01:00
|
|
|
#include <minix/type.h>
|
|
|
|
#include <minix/board.h>
|
2013-08-02 16:10:30 +02:00
|
|
|
|
|
|
|
#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)
|
|
|
|
{
|
2013-11-29 14:27:03 +01:00
|
|
|
struct machine machine ;
|
|
|
|
sys_getmachine(&machine);
|
|
|
|
|
|
|
|
if (BOARD_IS_BBXM(machine.board_id)){
|
|
|
|
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;
|
|
|
|
return OK;
|
|
|
|
} else if ( BOARD_IS_BB(machine.board_id)){
|
|
|
|
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;
|
|
|
|
return OK;
|
|
|
|
}
|
2013-08-07 03:34:08 +02:00
|
|
|
return ENOSYS;
|
2013-08-02 16:10:30 +02:00
|
|
|
}
|