summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/dmv177/tod/todcfg.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-06 00:24:52 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-06 00:24:52 +0000
commit308e18c397d4d90ee521144e1d55620b6a710049 (patch)
tree7b4c06c5fe6efdd082a68d585b1409f0fe7965a7 /c/src/lib/libbsp/powerpc/dmv177/tod/todcfg.c
parentCommented out the code which yields the CPU when the serial controller is (diff)
downloadrtems-308e18c397d4d90ee521144e1d55620b6a710049.tar.bz2
Added support for the Card Resource Register. The new probe routines
check for the presence of the DUART, SCC, and RTC. The SONIC check needs to be added in the future as the network driver is libchip'ed.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/dmv177/tod/todcfg.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/powerpc/dmv177/tod/todcfg.c b/c/src/lib/libbsp/powerpc/dmv177/tod/todcfg.c
index 50f8d34fdb..1a94bc3da5 100644
--- a/c/src/lib/libbsp/powerpc/dmv177/tod/todcfg.c
+++ b/c/src/lib/libbsp/powerpc/dmv177/tod/todcfg.c
@@ -31,12 +31,14 @@
* all others being given the name indicated.
*/
+boolean dmv177_icm7170_probe(int minor);
+
rtc_tbl RTC_Table[] = {
{
"/dev/rtc0", /* sDeviceName */
RTC_ICM7170, /* deviceType */
&icm7170_fns, /* pDeviceFns */
- rtc_probe, /* deviceProbe */
+ dmv177_icm7170_probe, /* deviceProbe */
(void *) ICM7170_AT_1_MHZ, /* pDeviceParams */
DMV170_RTC_ADDRESS, /* ulCtrlPort1 */
NULL, /* ulDataPort */
@@ -54,3 +56,21 @@ rtc_tbl RTC_Table[] = {
unsigned long RTC_Count = NUM_RTCS;
rtems_device_minor_number RTC_Minor;
+
+/*
+ * Hopefully, by checking the card resource register, this BSP
+ * will be able to operate on the DMV171, DMV176, or DMV177.
+ */
+
+boolean dmv177_icm7170_probe(int minor)
+{
+ volatile unsigned32 *card_resource_reg;
+
+ card_resource_reg = (volatile unsigned32 *) DMV170_CARD_RESORCE_REG;
+
+ if ( *card_resource_reg & DMV170_RTC_PRESENT_BIT )
+ return TRUE;
+
+ return FALSE;
+}
+