1.1 --- a/pkg/devices/lib/rtc/include/rtc-x1600.h Thu Nov 16 22:03:51 2023 +0100
1.2 +++ b/pkg/devices/lib/rtc/include/rtc-x1600.h Thu Nov 16 23:58:13 2023 +0100
1.3 @@ -28,11 +28,15 @@
1.4
1.5 #ifdef __cplusplus
1.6
1.7 +#include <l4/devices/cpm-x1600.h>
1.8 #include <l4/devices/hw_register_block.h>
1.9
1.10 class Rtc_x1600_chip
1.11 {
1.12 protected:
1.13 + /* Only use the CPM for the X1600, not other chips. */
1.14 +
1.15 + Cpm_x1600_chip *_cpm;
1.16 Hw::Register_block<32> _regs;
1.17
1.18 /* Utility methods. */
1.19 @@ -42,7 +46,7 @@
1.20 void write_enable();
1.21
1.22 public:
1.23 - explicit Rtc_x1600_chip(l4_addr_t addr);
1.24 + explicit Rtc_x1600_chip(l4_addr_t addr, Cpm_x1600_chip *cpm = NULL);
1.25
1.26 void disable();
1.27
1.28 @@ -79,7 +83,7 @@
1.29
1.30 EXTERN_C_BEGIN
1.31
1.32 -void *x1600_rtc_init(l4_addr_t rtc_base);
1.33 +void *x1600_rtc_init(l4_addr_t rtc_base, void *cpm);
1.34
1.35 void x1600_rtc_disable(void *rtc);
1.36