arm:replace ifdef's by runtime checks in the omap rtc driver.
Change-Id: I038f0fcf88061ae60d6d029d86c84153bf0f0020
This commit is contained in:
parent
5ec8c93e95
commit
9dec6c12f1
1 changed files with 13 additions and 9 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include <minix/mmio.h>
|
#include <minix/mmio.h>
|
||||||
#include <minix/clkconf.h>
|
#include <minix/clkconf.h>
|
||||||
#include <minix/sysutil.h>
|
#include <minix/sysutil.h>
|
||||||
|
#include <minix/board.h>
|
||||||
|
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -197,15 +198,18 @@ omap_rtc_init(void)
|
||||||
int rtc_rev, major, minor;
|
int rtc_rev, major, minor;
|
||||||
struct minix_mem_range mr;
|
struct minix_mem_range mr;
|
||||||
|
|
||||||
#ifndef AM335X
|
struct machine machine ;
|
||||||
/* Only the am335x (BeagleBone & BeagleBone Black) is supported ATM.
|
sys_getmachine(&machine);
|
||||||
* The dm37xx (BeagleBoard-xM) doesn't have a real time clock
|
|
||||||
* built-in. Instead, it uses the RTC on the PMIC. A driver for
|
if(! BOARD_IS_BB(machine.board_id)){
|
||||||
* the BeagleBoard-xM's PMIC still needs to be developed.
|
/* Only the am335x (BeagleBone & BeagleBone Black) is supported ATM.
|
||||||
*/
|
* The dm37xx (BeagleBoard-xM) doesn't have a real time clock
|
||||||
log_warn(&log, "unsupported processor\n");
|
* built-in. Instead, it uses the RTC on the PMIC. A driver for
|
||||||
return ENOSYS;
|
* the BeagleBoard-xM's PMIC still needs to be developed.
|
||||||
#endif /* !AM335X */
|
*/
|
||||||
|
log_warn(&log, "unsupported processor\n");
|
||||||
|
return ENOSYS;
|
||||||
|
}
|
||||||
|
|
||||||
if (pwr_off_in_progress)
|
if (pwr_off_in_progress)
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
Loading…
Reference in a new issue