sbcv2: init the ds1302 properly
authorAlan Cox <alan@linux.intel.com>
Mon, 3 Sep 2018 20:17:03 +0000 (21:17 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 3 Sep 2018 20:17:03 +0000 (21:17 +0100)
Kernel/platform-sbcv2/Makefile
Kernel/platform-sbcv2/discard.c
Kernel/platform-sbcv2/fuzix.lnk
Kernel/platform-sbcv2/main.c

index 8e31f8e..46109a8 100644 (file)
@@ -10,7 +10,7 @@ ASRCS = sbcv2.s crt0.s
 ASRCS += tricks.s commonmem.s
 
 DISCARD_DSRCS = ../dev/devide_discard.c
-DSRCS = ../dev/blkdev.c ../dev/devide.c ../dev/mbr.c
+DSRCS = ../dev/blkdev.c ../dev/devide.c ../dev/mbr.c ../dev/ds1302_discard.c
 DSRCS += ../dev/propio2.c ../dev/ds1302.c
 DSRCS += ../dev/devfd.c ../dev/ppide_rbc.c
 
index 468ea1b..2df9d4b 100644 (file)
@@ -6,6 +6,7 @@
 #include <blkdev.h>
 #include <devide.h>
 #include <propio2.h>
+#include <devrtc.h>
 
 extern int strcmp(const char *, const char *);
 
@@ -88,4 +89,5 @@ void device_init(void)
 {
        devide_init();
        prop_sd_probe();
+       ds1302_init();
 }
index 3897313..853a4ff 100644 (file)
@@ -40,6 +40,7 @@ platform-sbcv2/devide_discard.rel
 platform-sbcv2/propio2.rel
 platform-sbcv2/ppide_rbc.rel
 platform-sbcv2/ds1302.rel
+platform-sbcv2/ds1302_discard.rel
 platform-sbcv2/ds1302_rbc.rel
 platform-sbcv2/devfd.rel
 platform-sbcv2/rbcfd9266_hw.rel
index 8945a0b..fdb4e2f 100644 (file)
@@ -73,9 +73,9 @@ void platform_discard(void)
        }
 }
 
-
 /*
- *     Logic for tickless system. If you have an RTC you can ignore this.
+ *     Logic for tickless system. If you have an RTC with a timer tick
+ *     you can ignore this.
  */
 
 static uint8_t newticks = 0xFF;