1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3  * Copyright 2022 Microchip
4  */
5 
6 #include <assert.h>
7 #include <drivers/rtc.h>
8 #include <tee_api_types.h>
9 
10 struct rtc *rtc_device;
11 
rtc_register(struct rtc * rtc)12 void rtc_register(struct rtc *rtc)
13 {
14 	/* One RTC is supported only */
15 	assert(!rtc_device);
16 
17 	/* RTC should *at least* allow to get the time */
18 	assert(rtc && rtc->ops && rtc->ops->get_time);
19 
20 	rtc_device = rtc;
21 }
22