Index: c/src/lib/libbsp/shared/ChangeLog
===================================================================
--- c/src/lib/libbsp/shared/ChangeLog	(revision 3fb3de14ff645b2e6d0a23f3fabc2f6ada9140ee)
+++ c/src/lib/libbsp/shared/ChangeLog	(revision 7e0bd6ee20504e836bb78f353f0099aecbfe2229)
@@ -1,2 +1,6 @@
+2009-05-27	Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+	* tod.h, tod.c: Update for new RTC driver interface.
+
 2009-05-18	Joel Sherrill <joel.sherrill@OARcorp.com>
 
Index: c/src/lib/libbsp/shared/tod.c
===================================================================
--- c/src/lib/libbsp/shared/tod.c	(revision 3fb3de14ff645b2e6d0a23f3fabc2f6ada9140ee)
+++ c/src/lib/libbsp/shared/tod.c	(revision 7e0bd6ee20504e836bb78f353f0099aecbfe2229)
@@ -10,4 +10,7 @@
 
 #include <rtems.h>
+#include <rtems/rtc.h>
+#include <rtems/libio.h>
+
 #include <libchip/rtc.h>
 
@@ -35,6 +38,6 @@
 )
 {
-  rtems_device_minor_number  minor;
-  rtems_status_code          status;
+  rtems_device_minor_number minor;
+  rtems_status_code status;
 
   for (minor=0; minor < RTC_Count ; minor++) {
@@ -66,5 +69,5 @@
    */
 
-  status = rtems_io_register_name( "/dev/rtc", major, RTC_Minor );
+  status = rtems_io_register_name( RTC_DEVICE_NAME, major, RTC_Minor );
   if (status != RTEMS_SUCCESSFUL) {
     rtems_fatal_error_occurred(status);
@@ -105,4 +108,99 @@
 }
 
+rtems_device_driver rtc_read(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void *arg
+)
+{
+  int rv = 0;
+  rtems_libio_rw_args_t *rw = arg;
+  rtems_time_of_day *tod = (rtems_time_of_day *) rw->buffer;
+
+  rw->offset = 0;
+  rw->bytes_moved = 0;
+
+  if (!RTC_Present) {
+    return RTEMS_NOT_CONFIGURED;
+  }
+
+  if (rw->count != sizeof( rtems_time_of_day)) {
+    return RTEMS_INVALID_SIZE;
+  }
+
+  rv = RTC_Table [RTC_Minor].pDeviceFns->deviceGetTime(
+    RTC_Minor,
+    tod
+  );
+  if (rv != 0) {
+    return RTEMS_IO_ERROR;
+  }
+
+  rw->bytes_moved = rw->count;
+
+  return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver rtc_write(
+  rtems_device_major_number  major,
+  rtems_device_minor_number  minor,
+  void *arg
+)
+{
+  int rv = 0;
+  rtems_libio_rw_args_t *rw = arg;
+  const rtems_time_of_day *tod = (const rtems_time_of_day *) rw->buffer;
+
+  rw->offset = 0;
+  rw->bytes_moved = 0;
+
+  if (!RTC_Present) {
+    return RTEMS_NOT_CONFIGURED;
+  }
+
+  if (rw->count != sizeof( rtems_time_of_day)) {
+    return RTEMS_INVALID_SIZE;
+  }
+
+  rv = RTC_Table [RTC_Minor].pDeviceFns->deviceSetTime(
+    RTC_Minor,
+    tod
+  );
+  if (rv != 0) {
+    return RTEMS_IO_ERROR;
+  }
+
+  rw->bytes_moved = rw->count;
+
+  return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver rtc_open(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void *arg
+)
+{
+  return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver rtc_close(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void *arg
+)
+{
+  return RTEMS_SUCCESSFUL;
+}
+
+rtems_device_driver rtc_control(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void *arg
+)
+{
+  return RTEMS_NOT_IMPLEMENTED;
+}
+
 /*PAGE
  *
@@ -187,5 +285,5 @@
  */
 int setRealTime(
-  rtems_time_of_day *tod
+  const rtems_time_of_day *tod
 )
 {
Index: c/src/lib/libbsp/shared/tod.h
===================================================================
--- c/src/lib/libbsp/shared/tod.h	(revision 3fb3de14ff645b2e6d0a23f3fabc2f6ada9140ee)
+++ c/src/lib/libbsp/shared/tod.h	(revision 7e0bd6ee20504e836bb78f353f0099aecbfe2229)
@@ -26,5 +26,5 @@
 
 int setRealTime(
-  rtems_time_of_day *tod
+  const rtems_time_of_day *tod
 );
 
@@ -41,5 +41,5 @@
  */
 
-void setRealTimeToRTEMS();
+void setRealTimeToRTEMS(void);
 
 /*
@@ -47,5 +47,5 @@
  */
 
-void setRealTimeFromRTEMS();
+void setRealTimeFromRTEMS(void);
 
 /*
@@ -54,5 +54,5 @@
  */
 
-int checkRealTime();
+int checkRealTime(void);
 
 #ifdef __cplusplus
