This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch (New package) to the Ecos package to enable use of the DallasWallcolck driver as the hardware driver for the i386 platform


Hi all,
     I have written a Wallclock driver package for the i386 Platform which
essentially is a wrapper for the Dallas 12887 driver already in the CVS.
With this we can use the wallclock in the set-get mode. Probably thic could
be included into the CVS tree if not already included.

Rajagopalan T.
IBM ServeRaid Firmware Development,
Research Triangle Park, NC, USA

diff -Naur ecos-cvs/packages/devs/wallclock/i386/pc/current/cdl/i386_pc_wallclock_drivers.cdl
ecos/packages/devs/wallclock/i386/pc/current/cdl/i386_pc_wallclock_drivers.cdl
--- ecos-cvs/packages/devs/wallclock/i386/pc/current/cdl/i386_pc_wallclock_drivers.cdl     Wed Dec 31 19:00:00 1969
+++ ecos/packages/devs/wallclock/i386/pc/current/cdl/i386_pc_wallclock_drivers.cdl    Thu Sep 13 16:48:56 2001
@@ -0,0 +1,77 @@
+# ====================================================================
+#
+#      i386_pc_wallclock_drivers.cdl
+#
+#      Wallclock drivers - support for DS12887 RTC on the PC
+#
+# ====================================================================
+#####COPYRIGHTBEGIN####
+#
+# -------------------------------------------
+# The contents of this file are subject to the Red Hat eCos Public License
+# Version 1.1 (the "License"); you may not use this file except in
+# compliance with the License.  You may obtain a copy of the License at
+# http://www.redhat.com/
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the
+# License for the specific language governing rights and limitations under
+# the License.
+#
+# The Original Code is eCos - Embedded Configurable Operating System,
+# released September 30, 1998.
+#
+# The Initial Developer of the Original Code is Red Hat.
+# Portions created by Red Hat are
+# Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.
+# All Rights Reserved.
+# -------------------------------------------
+#
+#####COPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s):      rajt
+# Contributors:   rajt
+# Date:           2001-07-19
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_DEVICES_WALLCLOCK_I386_PC {
+    display       "PC board RTC Driver"
+    description   "RTC driver for PC."
+
+    parent        CYGPKG_IO_WALLCLOCK
+    active_if   CYGPKG_IO_WALLCLOCK
+    active_if     CYGPKG_HAL_I386_PC
+    requires      CYGPKG_DEVICES_WALLCLOCK_DALLAS_DS12887
+
+    include_dir   cyg/io
+
+    define_proc {
+        puts $::cdl_system_header "/***** PC RTC driver proc output start *****/"
+        puts $::cdl_system_header "#define CYGDAT_DEVS_WALLCLOCK_DALLAS_12887_INL <cyg/io/devices_wallclock_i386_pc.inl>"
+        puts $::cdl_system_header "#define CYGDAT_DEVS_WALLCLOCK_i386_PC_CFG <pkgconf/devices_wallclock_i386_pc.h>"
+        puts $::cdl_system_header "/***** PC RTC driver proc output end  *****/"
+    }
+
+    cdl_option CYGDAT_DEVS_WALLCLOCK_I386_PC_RTC_ADDRESS_PORT {
+    display         "IO port address of the ADDRESS register"
+    flavor          data
+        default_value 0x70
+        description   "
+              This option sets the io address of the address port for
+              accessing the PC RTC"
+    }
+
+    cdl_option CYGDAT_DEVS_WALLCLOCK_I386_PC_RTC_DATA_PORT {
+    display         "IO port address of the DATA register"
+    flavor          data
+        default_value 0x71
+        description   "
+              This option sets the io address of the data port for
+              accessing the PC RTC"
+    }
+}
diff -Naur ecos-cvs/packages/devs/wallclock/i386/pc/current/include/devices_wallclock_i386_pc.inl
ecos/packages/devs/wallclock/i386/pc/current/include/devices_wallclock_i386_pc.inl
--- ecos-cvs/packages/devs/wallclock/i386/pc/current/include/devices_wallclock_i386_pc.inl Wed Dec 31 19:00:00 1969
+++ ecos/packages/devs/wallclock/i386/pc/current/include/devices_wallclock_i386_pc.inl     Thu Sep 13 16:48:56 2001
@@ -0,0 +1,46 @@
+//==========================================================================
+//
+//      devs/wallclock/i386/pc/include/devs_wallclock_i386_pc.inl
+//
+//      PC RTC IO definitions
+//
+//==========================================================================
+//####COPYRIGHTBEGIN####
+//
+// -------------------------------------------
+// The contents of this file are subject to the Red Hat eCos Public License
+// Version 1.1 (the "License"); you may not use this file except in
+// compliance with the License.  You may obtain a copy of the License at
+// http://www.redhat.com/
+//
+// Software distributed under the License is distributed on an "AS IS"
+// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the
+// License for the specific language governing rights and limitations under
+// the License.
+//
+// The Original Code is eCos - Embedded Configurable Operating System,
+// released September 30, 1998.
+//
+// The Initial Developer of the Original Code is Red Hat.
+// Portions created by Red Hat are
+// Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.
+// All Rights Reserved.
+// -------------------------------------------
+//
+//####COPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):   rajt
+// Contributors:rajt
+// Date:        2001-07-19
+// Purpose:     PC RTC definitions for using DS12887
+//####DESCRIPTIONEND####
+//==========================================================================
+
+#include CYGDAT_DEVS_WALLCLOCK_i386_PC_CFG
+
+#define DS_ADDR CYGDAT_DEVS_WALLCLOCK_I386_PC_RTC_ADDRESS_PORT
+#define DS_DATA    CYGDAT_DEVS_WALLCLOCK_I386_PC_RTC_DATA_PORT
+
+// EOF devs_wallclock_i386_pc.inl
diff -Naur ecos-cvs/packages/ecos.db ecos/packages/ecos.db
--- ecos-cvs/packages/ecos.db Thu Sep 13 16:53:05 2001
+++ ecos/packages/ecos.db     Thu Sep 13 16:48:58 2001
@@ -829,6 +829,17 @@
            This package provides a wallclock driver implementation for the
            Toshiba REF4955 board."
 }
+
+package CYGPKG_DEVICES_WALLCLOCK_I386_PC {
+    alias          { "Standard PC RTC device"
+                 devs_wallclock_i386_pc_ds12887 pc_rtc }
+    hardware
+    directory devs/wallclock/i386/pc
+    script         i386_pc_wallclock_drivers.cdl
+        description     "RTC driver for standard PC. This is essentially
+               support for a Dallas DS12887 RTC."
+}
+
 package CYGPKG_DEVICES_WATCHDOG_ARM_AEB {
     alias          { "Watchdog driver for ARM/AEB board" devices_watchdog_aeb device_watchdog_aeb }
     directory devs/watchdog/arm/aeb
@@ -2109,6 +2120,8 @@
                       CYGPKG_IO_SERIAL_I386_PC
                 CYGPKG_DEVS_ETH_INTEL_I82559
                 CYGPKG_DEVS_ETH_I386_PC_I82559
+                          CYGPKG_DEVICES_WALLCLOCK_DALLAS_DS12887
+                CYGPKG_DEVICES_WALLCLOCK_I386_PC
         }
         description "
              The pc target provides the


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]